A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::SpectrumValue Class Reference

Set of values corresponding to a given SpectrumModel. More...

#include "spectrum-value.h"

+ Inheritance diagram for ns3::SpectrumValue:
+ Collaboration diagram for ns3::SpectrumValue:

Public Types

typedef void(* TracedCallback) (Ptr< SpectrumValue > value)
 TracedCallback signature for SpectrumValue.
 

Public Member Functions

 SpectrumValue ()
 
 SpectrumValue (Ptr< const SpectrumModel > sm)
 SpectrumValue constructor.
 
Bands::const_iterator ConstBandsBegin () const
 
Bands::const_iterator ConstBandsEnd () const
 
Values::const_iterator ConstValuesBegin () const
 
Values::const_iterator ConstValuesEnd () const
 
Ptr< SpectrumValueCopy () const
 
Ptr< const SpectrumModelGetSpectrumModel () const
 
SpectrumModelUid_t GetSpectrumModelUid () const
 
ValuesGetValues ()
 Provides the direct access to the underlying std::vector<double> that stores the spectrum values.
 
const ValuesGetValues () const
 Provides the direct read-only access to the underlying std::vector<double> that stores the spectrum values.
 
uint32_t GetValuesN () const
 Get the number of values stored in the array.
 
SpectrumValueoperator*= (const SpectrumValue &rhs)
 Multiply *this by the Right Hand Side of the operator, component by component.
 
SpectrumValueoperator*= (double rhs)
 Multiply every component of *this by the value of the Right Hand Side of the operator.
 
SpectrumValueoperator+= (const SpectrumValue &rhs)
 Add the Right Hand Side of the operator to *this, component by component.
 
SpectrumValueoperator+= (double rhs)
 Add the value of the Right Hand Side of the operator to all components of *this.
 
SpectrumValueoperator-= (const SpectrumValue &rhs)
 Subtract the Right Hand Side of the operator from *this, component by component.
 
SpectrumValueoperator-= (double rhs)
 Subtract the value of the Right Hand Side of the operator from all components of *this.
 
SpectrumValueoperator/= (const SpectrumValue &rhs)
 Divide *this by the Right Hand Side of the operator, component by component.
 
SpectrumValueoperator/= (double rhs)
 Divide every component of *this by the value of the Right Hand Side of the operator.
 
SpectrumValue operator<< (int n) const
 left shift operator
 
SpectrumValueoperator= (double rhs)
 Assign each component of *this to the value of the Right Hand Side of the operator.
 
SpectrumValue operator>> (int n) const
 right shift operator
 
doubleoperator[] (size_t index)
 Access value at given frequency index.
 
const doubleoperator[] (size_t index) const
 Access value at given frequency index.
 
void SetValues (Values &&values)
 Directly set the values by moving the values from the input std::vector<double>
 
void SetValues (Values &values)
 Directly set the values using the std::vector<double>
 
const doubleValuesAt (uint32_t pos) const
 Get the value element at the position.
 
Values::iterator ValuesBegin ()
 
Values::iterator ValuesEnd ()
 
- Public Member Functions inherited from ns3::SimpleRefCount< SpectrumValue >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 

Private Member Functions

void Add (const SpectrumValue &x)
 Add a SpectrumValue (element to element addition)
 
void Add (double s)
 Add a flat value to all the current elements.
 
void ChangeSign ()
 Change the values sign.
 
void Divide (const SpectrumValue &x)
 Divides by a SpectrumValue (element to element division)
 
void Divide (double s)
 Divides by a flat value to all the current elements.
 
void Exp (double base)
 Modifies each element so that it is the base raised to each element value.
 
void Log ()
 Applies a Log to each the elements.
 
void Log10 ()
 Applies a Log10 to each the elements.
 
void Log2 ()
 Applies a Log2 to each the elements.
 
void Multiply (const SpectrumValue &x)
 Multiplies for a SpectrumValue (element to element multiplication)
 
void Multiply (double s)
 Multiplies for a flat value to all the current elements.
 
void Pow (double exp)
 Modifies each element so that it each element is raised to the exponent.
 
void ShiftLeft (int n)
 Shift the values to the left.
 
void ShiftRight (int n)
 Shift the values to the right.
 
void Subtract (const SpectrumValue &x)
 Subtracts a SpectrumValue (element by element subtraction)
 
void Subtract (double s)
 Subtracts a flat value to all the current elements.
 

Private Attributes

Ptr< const SpectrumModelm_spectrumModel
 The spectrum model.
 
Values m_values
 Set of values which implement the codomain of the functions in the Function Space defined by SpectrumValue.
 

Friends

double Integral (const SpectrumValue &arg)
 
SpectrumValue Log (const SpectrumValue &arg)
 
SpectrumValue Log10 (const SpectrumValue &arg)
 
SpectrumValue Log2 (const SpectrumValue &arg)
 
double Norm (const SpectrumValue &x)
 
bool operator!= (const SpectrumValue &lhs, const SpectrumValue &rhs)
 Compare two spectrum values.
 
SpectrumValue operator* (const SpectrumValue &lhs, const SpectrumValue &rhs)
 multiplication component-by-component (Schur product)
 
SpectrumValue operator* (const SpectrumValue &lhs, double rhs)
 multiplication by a scalar
 
SpectrumValue operator* (double lhs, const SpectrumValue &rhs)
 multiplication of a scalar
 
SpectrumValue operator+ (const SpectrumValue &lhs, const SpectrumValue &rhs)
 addition operator
 
SpectrumValue operator+ (const SpectrumValue &lhs, double rhs)
 addition operator
 
SpectrumValue operator+ (const SpectrumValue &rhs)
 unary plus operator
 
SpectrumValue operator+ (double lhs, const SpectrumValue &rhs)
 addition operator
 
SpectrumValue operator- (const SpectrumValue &lhs, const SpectrumValue &rhs)
 subtraction operator
 
SpectrumValue operator- (const SpectrumValue &lhs, double rhs)
 subtraction operator
 
SpectrumValue operator- (const SpectrumValue &rhs)
 unary minus operator
 
SpectrumValue operator- (double lhs, const SpectrumValue &rhs)
 subtraction operator
 
SpectrumValue operator/ (const SpectrumValue &lhs, const SpectrumValue &rhs)
 division component-by-component
 
SpectrumValue operator/ (const SpectrumValue &lhs, double rhs)
 division by a scalar
 
SpectrumValue operator/ (double lhs, const SpectrumValue &rhs)
 division of a scalar
 
bool operator== (const SpectrumValue &lhs, const SpectrumValue &rhs)
 Compare two spectrum values.
 
SpectrumValue Pow (const SpectrumValue &lhs, double rhs)
 
SpectrumValue Pow (double lhs, const SpectrumValue &rhs)
 
double Prod (const SpectrumValue &x)
 
double Sum (const SpectrumValue &x)
 

Detailed Description

Set of values corresponding to a given SpectrumModel.

This class implements a Function Space which can represent any function $ g: F \in {\sf
R\hspace*{-0.9ex}\rule{0.15ex}{1.5ex}\hspace*{0.9ex}}^N \rightarrow {\sf
R\hspace*{-0.9ex}\rule{0.15ex}{1.5ex}\hspace*{0.9ex}}  $

Every instance of this class represent a particular function $ g(F) $. The domain of the function space, i.e., $ F $, is implemented by Bands. The codomain of the function space is implemented by Values.

To every possible value of $ F$ corresponds a different Function Space. Mathematical operations are defined in this Function Space; these operations are implemented by means of operator overloading.

The intended use of this class is to represent frequency-dependent things, such as power spectral densities, frequency-dependent propagation losses, spectral masks, etc.

Definition at line 60 of file spectrum-value.h.

Member Typedef Documentation

◆ TracedCallback

typedef void(* ns3::SpectrumValue::TracedCallback) (Ptr< SpectrumValue > value)

TracedCallback signature for SpectrumValue.

Parameters
[in]valueValue of the traced variable.
Deprecated:
The non-const Ptr<SpectrumPhy> argument is deprecated and will be changed to Ptr<const SpectrumPhy> in a future release.

Definition at line 572 of file spectrum-value.h.

Constructor & Destructor Documentation

◆ SpectrumValue() [1/2]

ns3::SpectrumValue::SpectrumValue ( Ptr< const SpectrumModel sm)

SpectrumValue constructor.

Parameters
smpointer to the SpectrumModel which implements the set of frequencies to which the values will be referring.
Warning
the intended use if that sm points to a static object which will be there for the whole simulation. This is reasonable since the set of frequencies which are to be used in the simulation is normally known before the simulation starts. Make sure that the SpectrumModel instance which sm points to has already been initialized by the time this method is invoked. The main reason is that if you initialize the SpectrumModel instance afterwards, and the memory for the underlying std::vector gets reallocated, then sm will not be a valid reference anymore. Another reason is that m_values could end up having the wrong size.

Definition at line 35 of file spectrum-value.cc.

◆ SpectrumValue() [2/2]

ns3::SpectrumValue::SpectrumValue ( )

Definition at line 31 of file spectrum-value.cc.

Member Function Documentation

◆ Add() [1/2]

void ns3::SpectrumValue::Add ( const SpectrumValue x)
private

Add a SpectrumValue (element to element addition)

Parameters
xSpectrumValue

Definition at line 102 of file spectrum-value.cc.

References m_spectrumModel, m_values, and NS_ASSERT.

Referenced by operator+=(), and Subtract().

+ Here is the caller graph for this function:

◆ Add() [2/2]

void ns3::SpectrumValue::Add ( double  s)
private

Add a flat value to all the current elements.

Parameters
sflat value

Definition at line 119 of file spectrum-value.cc.

References m_values.

◆ ChangeSign()

void ns3::SpectrumValue::ChangeSign ( )
private

Change the values sign.

Definition at line 213 of file spectrum-value.cc.

References m_values.

◆ ConstBandsBegin()

Bands::const_iterator ns3::SpectrumValue::ConstBandsBegin ( ) const
Returns
a const iterator pointing to the beginning of the embedded Bands

Definition at line 90 of file spectrum-value.cc.

References ns3::SpectrumModel::Begin(), and m_spectrumModel.

Referenced by ns3::ShannonSpectrumErrorModel::EvaluateChunk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConstBandsEnd()

Bands::const_iterator ns3::SpectrumValue::ConstBandsEnd ( ) const
Returns
a const iterator pointing to the end of the embedded Bands

Definition at line 96 of file spectrum-value.cc.

References ns3::SpectrumModel::End(), and m_spectrumModel.

Referenced by ns3::ShannonSpectrumErrorModel::EvaluateChunk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConstValuesBegin()

Values::const_iterator ns3::SpectrumValue::ConstValuesBegin ( ) const
Returns
a const iterator pointing to the beginning of the embedded Values

Definition at line 66 of file spectrum-value.cc.

References m_values.

Referenced by ns3::LteUePhy::ComputeAvgSinr(), ns3::LteAmc::CreateCqiFeedbacks(), ns3::LteEnbPhy::CreatePuschCqiReport(), ns3::LteEnbPhy::CreateSrsCqiReport(), WifiOfdmMaskSlopesTestCase::DoRun(), ns3::ShannonSpectrumErrorModel::EvaluateChunk(), ns3::LteUePhy::GenerateCqiRsrpRsrq(), ns3::LteMiErrorModel::GetPcfichPdcchError(), ns3::operator<<(), and ns3::LteUePhy::ReportRsReceivedPower().

+ Here is the caller graph for this function:

◆ ConstValuesEnd()

Values::const_iterator ns3::SpectrumValue::ConstValuesEnd ( ) const
Returns
a const iterator pointing to the end of the embedded Values

Definition at line 72 of file spectrum-value.cc.

References m_values.

Referenced by ns3::LteUePhy::ComputeAvgSinr(), ns3::LteAmc::CreateCqiFeedbacks(), ns3::LteEnbPhy::CreatePuschCqiReport(), ns3::LteEnbPhy::CreateSrsCqiReport(), WifiOfdmMaskSlopesTestCase::DoRun(), ns3::ShannonSpectrumErrorModel::EvaluateChunk(), ns3::LteUePhy::GenerateCqiRsrpRsrq(), ns3::LteMiErrorModel::GetPcfichPdcchError(), ns3::operator<<(), and ns3::LteUePhy::ReportRsReceivedPower().

+ Here is the caller graph for this function:

◆ Copy()

Ptr< SpectrumValue > ns3::SpectrumValue::Copy ( ) const
Returns
a Ptr to a copy of this instance

Definition at line 378 of file spectrum-value.cc.

References m_spectrumModel.

Referenced by ns3::SpectrumSignalParameters::SpectrumSignalParameters(), ns3::LrWpanInterferenceHelper::GetSignalPsd(), and LteUplinkSrsSinrTestCase::ReportSinr().

+ Here is the caller graph for this function:

◆ Divide() [1/2]

void ns3::SpectrumValue::Divide ( const SpectrumValue x)
private

Divides by a SpectrumValue (element to element division)

Parameters
xSpectrumValue

Definition at line 183 of file spectrum-value.cc.

References m_spectrumModel, m_values, and NS_ASSERT.

Referenced by operator/=().

+ Here is the caller graph for this function:

◆ Divide() [2/2]

void ns3::SpectrumValue::Divide ( double  s)
private

Divides by a flat value to all the current elements.

Parameters
sflat value

Definition at line 200 of file spectrum-value.cc.

References m_values, and NS_LOG_FUNCTION.

◆ Exp()

void ns3::SpectrumValue::Exp ( double  base)
private

Modifies each element so that it is the base raised to each element value.

Parameters
basethe base

Definition at line 270 of file spectrum-value.cc.

References m_values, and NS_LOG_FUNCTION.

◆ GetSpectrumModel()

Ptr< const SpectrumModel > ns3::SpectrumValue::GetSpectrumModel ( ) const
Returns
the embedded SpectrumModel

Definition at line 60 of file spectrum-value.cc.

References m_spectrumModel.

Referenced by SpectrumValueTestCase::DoRun(), ns3::LteChunkProcessor::EvaluateChunk(), ns3::SpectrumAnalyzer::GenerateReport(), ns3::LrWpanPhy::GetRxSpectrumModel(), and ns3::HalfDuplexIdealPhy::GetRxSpectrumModel().

+ Here is the caller graph for this function:

◆ GetSpectrumModelUid()

SpectrumModelUid_t ns3::SpectrumValue::GetSpectrumModelUid ( ) const
Returns
the uid of the embedded SpectrumModel

Definition at line 54 of file spectrum-value.cc.

References ns3::SpectrumModel::GetUid(), and m_spectrumModel.

Referenced by LteDownlinkPowerControlSpectrumValueTestCase::DoRun(), LteNoisePsdTestCase::DoRun(), and LteTxPsdTestCase::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetValues() [1/2]

Values & ns3::SpectrumValue::GetValues ( )
inline

Provides the direct access to the underlying std::vector<double> that stores the spectrum values.

Returns
a reference to the stored values

Definition at line 191 of file spectrum-value.h.

References m_values.

◆ GetValues() [2/2]

const Values & ns3::SpectrumValue::GetValues ( ) const
inline

Provides the direct read-only access to the underlying std::vector<double> that stores the spectrum values.

Returns
a const reference to the stored values

Definition at line 201 of file spectrum-value.h.

References m_values.

◆ GetValuesN()

uint32_t ns3::SpectrumValue::GetValuesN ( ) const

Get the number of values stored in the array.

Returns
the values array size

Definition at line 655 of file spectrum-value.cc.

References m_values.

◆ Log()

void ns3::SpectrumValue::Log ( )
private

Applies a Log to each the elements.

Definition at line 309 of file spectrum-value.cc.

References m_values, and NS_LOG_FUNCTION.

◆ Log10()

void ns3::SpectrumValue::Log10 ( )
private

Applies a Log10 to each the elements.

Definition at line 283 of file spectrum-value.cc.

References m_values, and NS_LOG_FUNCTION.

◆ Log2()

void ns3::SpectrumValue::Log2 ( )
private

Applies a Log2 to each the elements.

Definition at line 296 of file spectrum-value.cc.

References m_values, and NS_LOG_FUNCTION.

◆ Multiply() [1/2]

void ns3::SpectrumValue::Multiply ( const SpectrumValue x)
private

Multiplies for a SpectrumValue (element to element multiplication)

Parameters
xSpectrumValue

Definition at line 154 of file spectrum-value.cc.

References m_spectrumModel, m_values, and NS_ASSERT.

Referenced by operator*=().

+ Here is the caller graph for this function:

◆ Multiply() [2/2]

void ns3::SpectrumValue::Multiply ( double  s)
private

Multiplies for a flat value to all the current elements.

Parameters
sflat value

Definition at line 171 of file spectrum-value.cc.

References m_values.

◆ operator*=() [1/2]

SpectrumValue & ns3::SpectrumValue::operator*= ( const SpectrumValue rhs)

Multiply *this by the Right Hand Side of the operator, component by component.

Parameters
rhsthe Right Hand Side
Returns
a reference to *this

Definition at line 584 of file spectrum-value.cc.

References Multiply().

+ Here is the call graph for this function:

◆ operator*=() [2/2]

SpectrumValue & ns3::SpectrumValue::operator*= ( double  rhs)

Multiply every component of *this by the value of the Right Hand Side of the operator.

Parameters
rhsthe Right Hand Side
Returns
a reference to *this

Definition at line 612 of file spectrum-value.cc.

References Multiply().

+ Here is the call graph for this function:

◆ operator+=() [1/2]

SpectrumValue & ns3::SpectrumValue::operator+= ( const SpectrumValue rhs)

Add the Right Hand Side of the operator to *this, component by component.

Parameters
rhsthe Right Hand Side
Returns
a reference to *this

Definition at line 570 of file spectrum-value.cc.

References Add().

+ Here is the call graph for this function:

◆ operator+=() [2/2]

SpectrumValue & ns3::SpectrumValue::operator+= ( double  rhs)

Add the value of the Right Hand Side of the operator to all components of *this.

Parameters
rhsthe Right Hand Side
Returns
a reference to *this

Definition at line 598 of file spectrum-value.cc.

References Add().

+ Here is the call graph for this function:

◆ operator-=() [1/2]

SpectrumValue & ns3::SpectrumValue::operator-= ( const SpectrumValue rhs)

Subtract the Right Hand Side of the operator from *this, component by component.

Parameters
rhsthe Right Hand Side
Returns
a reference to *this

Definition at line 577 of file spectrum-value.cc.

References Subtract().

+ Here is the call graph for this function:

◆ operator-=() [2/2]

SpectrumValue & ns3::SpectrumValue::operator-= ( double  rhs)

Subtract the value of the Right Hand Side of the operator from all components of *this.

Parameters
rhsthe Right Hand Side
Returns
a reference to *this

Definition at line 605 of file spectrum-value.cc.

References Subtract().

+ Here is the call graph for this function:

◆ operator/=() [1/2]

SpectrumValue & ns3::SpectrumValue::operator/= ( const SpectrumValue rhs)

Divide *this by the Right Hand Side of the operator, component by component.

Parameters
rhsthe Right Hand Side
Returns
a reference to *this

Definition at line 591 of file spectrum-value.cc.

References Divide().

+ Here is the call graph for this function:

◆ operator/=() [2/2]

SpectrumValue & ns3::SpectrumValue::operator/= ( double  rhs)

Divide every component of *this by the value of the Right Hand Side of the operator.

Parameters
rhsthe Right Hand Side
Returns
a reference to *this

Definition at line 619 of file spectrum-value.cc.

References Divide().

+ Here is the call graph for this function:

◆ operator<<()

SpectrumValue ns3::SpectrumValue::operator<< ( int  n) const

left shift operator

Parameters
nposition to shift
Returns
the value of *this left shifted by n positions. In other words, the function of the set of frequencies represented by *this is left-shifted in frequency by n positions.

Definition at line 638 of file spectrum-value.cc.

◆ operator=()

SpectrumValue & ns3::SpectrumValue::operator= ( double  rhs)

Assign each component of *this to the value of the Right Hand Side of the operator.

Parameters
rhs
Returns

Definition at line 626 of file spectrum-value.cc.

References m_values.

◆ operator>>()

SpectrumValue ns3::SpectrumValue::operator>> ( int  n) const

right shift operator

Parameters
nposition to shift
Returns
the value of *this right shifted by n positions. In other words, the function of the set of frequencies represented by *this is left-shifted in frequency by n positions.

Definition at line 647 of file spectrum-value.cc.

◆ operator[]() [1/2]

double & ns3::SpectrumValue::operator[] ( size_t  index)

Access value at given frequency index.

Parameters
indexthe given frequency index
Returns
reference to the value

Definition at line 42 of file spectrum-value.cc.

References m_values.

◆ operator[]() [2/2]

const double & ns3::SpectrumValue::operator[] ( size_t  index) const

Access value at given frequency index.

Parameters
indexthe given frequency index
Returns
const reference to the value

Definition at line 48 of file spectrum-value.cc.

References m_values.

◆ Pow()

void ns3::SpectrumValue::Pow ( double  exp)
private

Modifies each element so that it each element is raised to the exponent.

Parameters
expthe exponent

Definition at line 257 of file spectrum-value.cc.

References m_values, and NS_LOG_FUNCTION.

◆ SetValues() [1/2]

void ns3::SpectrumValue::SetValues ( Values &&  values)
inline

Directly set the values by moving the values from the input std::vector<double>

Parameters
valuesa reference to the std::vector<double> to be moved

Definition at line 178 of file spectrum-value.h.

References ns3::SpectrumModel::GetNumBands(), m_spectrumModel, m_values, and NS_ASSERT_MSG.

+ Here is the call graph for this function:

◆ SetValues() [2/2]

void ns3::SpectrumValue::SetValues ( Values values)
inline

Directly set the values using the std::vector<double>

Parameters
valuesa reference to the std::vector<double>

Definition at line 166 of file spectrum-value.h.

References ns3::SpectrumModel::GetNumBands(), m_spectrumModel, m_values, and NS_ASSERT_MSG.

+ Here is the call graph for this function:

◆ ShiftLeft()

void ns3::SpectrumValue::ShiftLeft ( int  n)
private

Shift the values to the left.

Parameters
nnumber of positions to shift

Definition at line 225 of file spectrum-value.cc.

References m_values.

◆ ShiftRight()

void ns3::SpectrumValue::ShiftRight ( int  n)
private

Shift the values to the right.

Parameters
nnumber of positions to shift

Definition at line 241 of file spectrum-value.cc.

References m_values.

◆ Subtract() [1/2]

void ns3::SpectrumValue::Subtract ( const SpectrumValue x)
private

Subtracts a SpectrumValue (element by element subtraction)

Parameters
xSpectrumValue

Definition at line 131 of file spectrum-value.cc.

References m_spectrumModel, m_values, and NS_ASSERT.

Referenced by operator-=().

+ Here is the caller graph for this function:

◆ Subtract() [2/2]

void ns3::SpectrumValue::Subtract ( double  s)
private

Subtracts a flat value to all the current elements.

Parameters
sflat value

Definition at line 148 of file spectrum-value.cc.

References Add().

+ Here is the call graph for this function:

◆ ValuesAt()

const double & ns3::SpectrumValue::ValuesAt ( uint32_t  pos) const

Get the value element at the position.

Parameters
posposition
Returns
the value element in that position (with bounds checking)

Definition at line 661 of file spectrum-value.cc.

References m_values.

◆ ValuesBegin()

Values::iterator ns3::SpectrumValue::ValuesBegin ( )
Returns
an iterator pointing to the beginning of the embedded Values

Definition at line 78 of file spectrum-value.cc.

References m_values.

◆ ValuesEnd()

Values::iterator ns3::SpectrumValue::ValuesEnd ( )
Returns
an iterator pointing to the end of the embedded Values

Definition at line 84 of file spectrum-value.cc.

References m_values.

Friends And Related Function Documentation

◆ Integral

double Integral ( const SpectrumValue arg)
friend
Parameters
argthe argument
Returns
the value of the integral $\int_F g(f) df  $

Definition at line 361 of file spectrum-value.cc.

◆ Log

SpectrumValue Log ( const SpectrumValue arg)
friend
Parameters
argthe argument
Returns
the logarithm in base e of all values in the argument

Definition at line 562 of file spectrum-value.cc.

◆ Log10

SpectrumValue Log10 ( const SpectrumValue arg)
friend
Parameters
argthe argument
Returns
the logarithm in base 10 of all values in the argument

Definition at line 546 of file spectrum-value.cc.

◆ Log2

SpectrumValue Log2 ( const SpectrumValue arg)
friend
Parameters
argthe argument
Returns
the logarithm in base 2 of all values in the argument

Definition at line 554 of file spectrum-value.cc.

◆ Norm

double Norm ( const SpectrumValue x)
friend
Parameters
xthe operand
Returns
the euclidean norm, i.e., the sum of the squares of all the values in x

Definition at line 322 of file spectrum-value.cc.

◆ operator!=

bool operator!= ( const SpectrumValue lhs,
const SpectrumValue rhs 
)
friend

Compare two spectrum values.

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
true if lhs and rhs SpectruValues are not equal

Definition at line 421 of file spectrum-value.cc.

◆ operator* [1/3]

SpectrumValue operator* ( const SpectrumValue lhs,
const SpectrumValue rhs 
)
friend

multiplication component-by-component (Schur product)

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs * rhs

Definition at line 468 of file spectrum-value.cc.

◆ operator* [2/3]

SpectrumValue operator* ( const SpectrumValue lhs,
double  rhs 
)
friend

multiplication by a scalar

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs * rhs

Definition at line 476 of file spectrum-value.cc.

◆ operator* [3/3]

SpectrumValue operator* ( double  lhs,
const SpectrumValue rhs 
)
friend

multiplication of a scalar

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs * rhs

Definition at line 484 of file spectrum-value.cc.

◆ operator+ [1/4]

SpectrumValue operator+ ( const SpectrumValue lhs,
const SpectrumValue rhs 
)
friend

addition operator

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs + rhs

Definition at line 407 of file spectrum-value.cc.

◆ operator+ [2/4]

SpectrumValue operator+ ( const SpectrumValue lhs,
double  rhs 
)
friend

addition operator

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs + rhs

Definition at line 427 of file spectrum-value.cc.

◆ operator+ [3/4]

SpectrumValue operator+ ( const SpectrumValue rhs)
friend

unary plus operator

Parameters
rhsRight Hand Side of the operator
Returns
the value of *this

Definition at line 516 of file spectrum-value.cc.

◆ operator+ [4/4]

SpectrumValue operator+ ( double  lhs,
const SpectrumValue rhs 
)
friend

addition operator

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs + rhs

Definition at line 435 of file spectrum-value.cc.

◆ operator- [1/4]

SpectrumValue operator- ( const SpectrumValue lhs,
const SpectrumValue rhs 
)
friend

subtraction operator

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs - rhs

Definition at line 443 of file spectrum-value.cc.

◆ operator- [2/4]

SpectrumValue operator- ( const SpectrumValue lhs,
double  rhs 
)
friend

subtraction operator

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs - rhs

Definition at line 452 of file spectrum-value.cc.

◆ operator- [3/4]

SpectrumValue operator- ( const SpectrumValue rhs)
friend

unary minus operator

Parameters
rhsRight Hand Side of the operator
Returns
the value of - *this

Definition at line 522 of file spectrum-value.cc.

◆ operator- [4/4]

SpectrumValue operator- ( double  lhs,
const SpectrumValue rhs 
)
friend

subtraction operator

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs - rhs

Definition at line 460 of file spectrum-value.cc.

◆ operator/ [1/3]

SpectrumValue operator/ ( const SpectrumValue lhs,
const SpectrumValue rhs 
)
friend

division component-by-component

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of lhs / rhs

Definition at line 492 of file spectrum-value.cc.

◆ operator/ [2/3]

SpectrumValue operator/ ( const SpectrumValue lhs,
double  rhs 
)
friend

division by a scalar

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of *this / rhs

Definition at line 500 of file spectrum-value.cc.

◆ operator/ [3/3]

SpectrumValue operator/ ( double  lhs,
const SpectrumValue rhs 
)
friend

division of a scalar

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
the value of *this / rhs

Definition at line 508 of file spectrum-value.cc.

◆ operator==

bool operator== ( const SpectrumValue lhs,
const SpectrumValue rhs 
)
friend

Compare two spectrum values.

Parameters
lhsLeft Hand Side of the operator
rhsRight Hand Side of the operator
Returns
true if lhs and rhs SpectruValues are equal

Definition at line 415 of file spectrum-value.cc.

◆ Pow [1/2]

SpectrumValue Pow ( const SpectrumValue lhs,
double  rhs 
)
friend
Parameters
lhsthe base
rhsthe exponent
Returns
each value in base raised to the exponent

Definition at line 538 of file spectrum-value.cc.

◆ Pow [2/2]

SpectrumValue Pow ( double  lhs,
const SpectrumValue rhs 
)
friend
Parameters
lhsthe base
rhsthe exponent
Returns
the value in base raised to each value in the exponent

Definition at line 530 of file spectrum-value.cc.

◆ Prod

double Prod ( const SpectrumValue x)
friend
Parameters
xthe operand
Returns
the product of all the values in x

Definition at line 348 of file spectrum-value.cc.

◆ Sum

double Sum ( const SpectrumValue x)
friend
Parameters
xthe operand
Returns
the sum of all the values in x

Definition at line 335 of file spectrum-value.cc.

Member Data Documentation

◆ m_spectrumModel

Ptr<const SpectrumModel> ns3::SpectrumValue::m_spectrumModel
private

◆ m_values

Values ns3::SpectrumValue::m_values
private

Set of values which implement the codomain of the functions in the Function Space defined by SpectrumValue.

There is no restriction on what these values represent (a transmission power density, a propagation loss, etc.).

Definition at line 664 of file spectrum-value.h.

Referenced by Add(), ChangeSign(), ConstValuesBegin(), ConstValuesEnd(), Divide(), Exp(), GetValues(), GetValuesN(), Log(), Log10(), Log2(), Multiply(), operator=(), operator[](), Pow(), SetValues(), ShiftLeft(), ShiftRight(), Subtract(), ValuesAt(), ValuesBegin(), and ValuesEnd().


The documentation for this class was generated from the following files: