21 #include <ns3/spectrum-converter.h> 22 #include <ns3/assert.h> 43 for (Bands::const_iterator toit = toSpectrumModel->
Begin (); toit != toSpectrumModel->
End (); ++toit)
46 for (Bands::const_iterator fromit = fromSpectrumModel->
Begin (); fromit != fromSpectrumModel->
End (); ++fromit)
49 NS_LOG_LOGIC (
"(" << fromit->fl <<
"," << fromit->fh <<
")" 51 "(" << toit->fl <<
"," << toit->fh <<
")" Ptr< const SpectrumModel > m_toSpectrumModel
the SpectrumModel this SpectrumConverter instance can convert to
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
double GetCoefficient(const BandInfo &from, const BandInfo &to) const
Calculate the coefficient for value conversion between elements.
std::vector< size_t > m_conversionRowPtr
offset of rows in m_conversionMatrix
Bands::const_iterator Begin() const
Const Iterator to the model Bands container start.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double fl
lower limit of subband
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
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
Ptr< SpectrumValue > Convert(Ptr< const SpectrumValue > vvf) const
Convert a particular ValueVsFreq instance to.
Values::iterator ValuesBegin()
Ptr< const SpectrumModel > m_fromSpectrumModel
the SpectrumModel this SpectrumConverter instance can convert from
double fh
upper limit of subband
The building block of a SpectrumModel.
Bands::const_iterator End() const
Const Iterator to the model Bands container end.