22 #include <ns3/spectrum-value.h> 35 : m_spectrumModel (sof),
36 m_values (sof->GetNumBands ())
68 Values::const_iterator
74 Values::const_iterator
109 Values::iterator it1 =
m_values.begin ();
110 Values::const_iterator it2 =
x.m_values.begin ();
127 Values::iterator it1 =
m_values.begin ();
141 Values::iterator it1 =
m_values.begin ();
142 Values::const_iterator it2 =
x.m_values.begin ();
167 Values::iterator it1 =
m_values.begin ();
168 Values::const_iterator it2 =
x.m_values.begin ();
185 Values::iterator it1 =
m_values.begin ();
200 Values::iterator it1 =
m_values.begin ();
201 Values::const_iterator it2 =
x.m_values.begin ();
219 Values::iterator it1 =
m_values.begin ();
234 Values::iterator it1 =
m_values.begin ();
283 Values::iterator it1 =
m_values.begin ();
287 *it1 = std::pow (*it1, exp);
297 Values::iterator it1 =
m_values.begin ();
301 *it1 = std::pow (base, *it1);
311 Values::iterator it1 =
m_values.begin ();
315 *it1 = std::log10 (*it1);
324 Values::iterator it1 =
m_values.begin ();
338 Values::iterator it1 =
m_values.begin ();
342 *it1 = std::log (*it1);
351 Values::const_iterator it1 =
x.ConstValuesBegin ();
352 while (it1 !=
x.ConstValuesEnd ())
354 s += (*it1) * (*it1);
357 return std::sqrt (s);
365 Values::const_iterator it1 =
x.ConstValuesBegin ();
366 while (it1 !=
x.ConstValuesEnd ())
380 Values::const_iterator it1 =
x.ConstValuesBegin ();
381 while (it1 !=
x.ConstValuesEnd ())
398 i += (*vit) * (bit->fh - bit->fl);
667 Values::iterator it1 =
m_values.begin ();
SpectrumValue & operator*=(const SpectrumValue &rhs)
Multiply *this by the Right Hand Side of the operator, component by component.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint32_t SpectrumModelUid_t
Uid for SpectrumModels.
void ChangeSign()
Change the values sign.
SpectrumValue & operator/=(const SpectrumValue &rhs)
Divide *this by the Right Hand Side of the operator, component by component.
double Integral(const SpectrumValue &arg)
int64x64_t operator+(const int64x64_t &lhs)
Unary plus operator.
void Subtract(const SpectrumValue &x)
Subtracts a SpectrumValue (element by element subtraction)
SpectrumValue & operator+=(const SpectrumValue &rhs)
Add the Right Hand Side of the operator to *this, component by component.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
int64x64_t operator-(const int64x64_t &lhs)
Unary negation operator (change sign operator).
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
SpectrumValue operator>>(int n) const
right shift operator
Values::iterator ValuesEnd()
friend SpectrumValue Log(const SpectrumValue &arg)
void Divide(const SpectrumValue &x)
Divides by a SpectrumValue (element to element division)
Values::const_iterator ConstValuesBegin() const
void Multiply(const SpectrumValue &x)
Multiplies for a SpectrumValue (element to element multiplication)
SpectrumModelUid_t GetUid() const
friend SpectrumValue Log10(const SpectrumValue &arg)
int64x64_t operator*(const int64x64_t &lhs, const int64x64_t &rhs)
Multiplication operator.
SpectrumValue & operator-=(const SpectrumValue &rhs)
Subtract the Right Hand Side of the operator from *this, component by component.
friend SpectrumValue Pow(const SpectrumValue &lhs, double rhs)
void Add(const SpectrumValue &x)
Add a SpectrumValue (element to element addition)
SpectrumValue Pow(double lhs, const SpectrumValue &rhs)
Ptr< const SpectrumModel > m_spectrumModel
The spectrum model.
void ShiftRight(int n)
Shift the values to the right.
Ptr< SpectrumValue > Copy() const
int64x64_t operator/(const int64x64_t &lhs, const int64x64_t &rhs)
Division operator.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Bands::const_iterator Begin() const
Const Iterator to the model Bands container start.
void Log2()
Applies a Log2 to each the elements.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Values::const_iterator ConstValuesEnd() const
Ptr< const SpectrumModel > GetSpectrumModel() const
void Log()
Applies a Log to each the elements.
void Log10()
Applies a Log10 to each the elements.
SpectrumValue Log10(const SpectrumValue &arg)
Values m_values
Set of values which implement the codomain of the functions in the Function Space defined by Spectrum...
friend SpectrumValue Log2(const SpectrumValue &arg)
double & operator[](size_t index)
Access value at given frequency index.
Values::iterator ValuesBegin()
SpectrumValue Log(const SpectrumValue &arg)
double Norm(const SpectrumValue &x)
SpectrumValue & operator=(double rhs)
Assign each component of *this to the value of the Right Hand Side of the operator.
void ShiftLeft(int n)
Shift the values to the left.
double Sum(const SpectrumValue &x)
Bands::const_iterator ConstBandsEnd() const
SpectrumValue operator<<(int n) const
left shift operator
SpectrumValue Log2(const SpectrumValue &arg)
Set of values corresponding to a given SpectrumModel.
void Exp(double base)
Modifies each element so that it is the base raised to each element value.
SpectrumModelUid_t GetSpectrumModelUid() const
Bands::const_iterator End() const
Const Iterator to the model Bands container end.
Bands::const_iterator ConstBandsBegin() const
double Prod(const SpectrumValue &x)