24 #include <ns3/spectrum-model.h>
26 #include <ns3/assert.h>
46 for (std::vector<double>::const_iterator it = centerFreqs.begin ();
47 it != centerFreqs.end ();
52 if (it == centerFreqs.begin ())
54 double delta = ((*(it + 1)) - (*it)) / 2;
58 else if (it == centerFreqs.end () - 1 )
60 double delta = ((*it) - (*(it - 1))) / 2;
66 e.
fl = ((*it) + (*(it - 1))) / 2;
67 e.
fh = ((*(it + 1)) + (*it)) / 2;
81 : m_bands (std::move (bands))
114 for (Bands::const_iterator myIt =
Begin ();
118 for (Bands::const_iterator otherIt = other.
Begin ();
119 otherIt != other.
End ();
Set of frequency values implementing the domain of the functions in the Function Space defined by Spe...
bool IsOrthogonal(const SpectrumModel &other) const
Check if another SpectrumModels has bands orthogonal to our bands.
static SpectrumModelUid_t m_uidCount
counter to assign m_uids
SpectrumModelUid_t m_uid
unique id for a given set of frequencies
SpectrumModel(const std::vector< double > ¢erFreqs)
This constructs a SpectrumModel based on a given set of frequencies, which is assumed to be sorted by...
Bands::const_iterator End() const
Const Iterator to the model Bands container end.
size_t GetNumBands() const
Bands::const_iterator Begin() const
Const Iterator to the model Bands container start.
SpectrumModelUid_t GetUid() const
Bands m_bands
Actual definition of frequency bands within this SpectrumModel.
#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.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator==(const EventId &a, const EventId &b)
std::vector< BandInfo > Bands
Container of BandInfo.
uint32_t SpectrumModelUid_t
Uid for SpectrumModels.
The building block of a SpectrumModel.
double fc
center frequency
double fl
lower limit of subband
double fh
upper limit of subband