Class which implements a converter between SpectrumValue which are defined over different SpectrumModel. More...
#include "spectrum-converter.h"
Public Member Functions | |
| SpectrumConverter (Ptr< const SpectrumModel > fromSpectrumModel, Ptr< const SpectrumModel > toSpectrumModel) | |
| Create a SpectrumConverter class that will be able to convert ValueVsFreq instances defined over one SpectrumModel to corresponding ValueVsFreq instances defined over a different SpectrumModel. | |
| Ptr< SpectrumValue > | Convert (Ptr< const SpectrumValue > vvf) const |
| Convert a particular ValueVsFreq instance to. | |
| Public Member Functions inherited from ns3::SimpleRefCount< SpectrumConverter > | |
| SimpleRefCount () | |
| Default constructor. | |
| uint32_t | GetReferenceCount () const |
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. | |
| void | Ref () const |
| Increment the reference count. | |
| void | Unref () const |
| Decrement the reference count. | |
Private Attributes | |
| std::vector< size_t > | m_conversionColInd |
| column of each non-zero element in m_conversionMatrix | |
| std::vector< double > | m_conversionMatrix |
| matrix of conversion coefficients stored in Compressed Row Storage format | |
| std::vector< size_t > | m_conversionRowPtr |
| offset of rows in m_conversionMatrix | |
| Ptr< const SpectrumModel > | m_fromSpectrumModel |
| the SpectrumModel this SpectrumConverter instance can convert from | |
| Ptr< const SpectrumModel > | m_toSpectrumModel |
| the SpectrumModel this SpectrumConverter instance can convert to | |
Class which implements a converter between SpectrumValue which are defined over different SpectrumModel.
In more formal terms, this class allows conversion between different function spaces. In practical terms, this allows you to mix different spectrum representation within the same channel, such as a device using a coarse spectrum representation (e.g., one frequency for each IEEE 802.11 channel) and devices using a finer representation (e.g., one frequency for each OFDM subcarrier).
Definition at line 30 of file spectrum-converter.h.
| ns3::SpectrumConverter::SpectrumConverter | ( | Ptr< const SpectrumModel > | fromSpectrumModel, |
| Ptr< const SpectrumModel > | toSpectrumModel ) |
Create a SpectrumConverter class that will be able to convert ValueVsFreq instances defined over one SpectrumModel to corresponding ValueVsFreq instances defined over a different SpectrumModel.
| fromSpectrumModel | the SpectrumModel to convert from |
| toSpectrumModel | the SpectrumModel to convert to |
Definition at line 77 of file spectrum-converter.cc.
References m_conversionColInd, m_conversionMatrix, m_conversionRowPtr, m_fromSpectrumModel, m_toSpectrumModel, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
| Ptr< SpectrumValue > ns3::SpectrumConverter::Convert | ( | Ptr< const SpectrumValue > | vvf | ) | const |
Convert a particular ValueVsFreq instance to.
| vvf | the ValueVsFreq instance to be converted |
Definition at line 127 of file spectrum-converter.cc.
References ns3::Create(), m_conversionColInd, m_conversionMatrix, m_conversionRowPtr, m_fromSpectrumModel, m_toSpectrumModel, and NS_ASSERT.
Referenced by SpectrumConverterTestSuite::SpectrumConverterTestSuite().
|
private |
column of each non-zero element in m_conversionMatrix
Definition at line 58 of file spectrum-converter.h.
Referenced by SpectrumConverter(), and Convert().
|
private |
matrix of conversion coefficients stored in Compressed Row Storage format
Definition at line 54 of file spectrum-converter.h.
Referenced by SpectrumConverter(), and Convert().
|
private |
offset of rows in m_conversionMatrix
Definition at line 56 of file spectrum-converter.h.
Referenced by SpectrumConverter(), and Convert().
|
private |
the SpectrumModel this SpectrumConverter instance can convert from
Definition at line 60 of file spectrum-converter.h.
Referenced by SpectrumConverter(), and Convert().
|
private |
the SpectrumModel this SpectrumConverter instance can convert to
Definition at line 63 of file spectrum-converter.h.
Referenced by SpectrumConverter(), and Convert().