21#include <ns3/assert.h>
23#include <ns3/spectrum-model.h>
46 for (std::vector<double>::const_iterator it = centerFreqs.begin(); it != centerFreqs.end();
51 if (it == centerFreqs.begin())
53 double delta = ((*(it + 1)) - (*it)) / 2;
57 else if (it == centerFreqs.end() - 1)
59 double delta = ((*it) - (*(it - 1))) / 2;
65 e.
fl = ((*it) + (*(it - 1))) / 2;
66 e.
fh = ((*(it + 1)) + (*it)) / 2;
80 : m_bands(
std::move(bands))
113 for (Bands::const_iterator myIt =
Begin(); myIt !=
End(); ++myIt)
115 for (Bands::const_iterator otherIt = other.
Begin(); otherIt != other.
End(); ++otherIt)
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