INET Framework for OMNeT++/OMNEST
|
Represents a set of dimensions which is used to define over which dimensions a mapping is defined (the domain of the mapping). More...
#include <MappingBase.h>
Public Types | |
typedef _Base::value_type | value_type |
typedef _Base::iterator | iterator |
typedef _Base::reverse_iterator | reverse_iterator |
typedef _Base::reverse_iterator | const_reverse_iterator |
typedef _Base::const_iterator | const_iterator |
typedef _Base::size_type | size_type |
typedef _Base::const_reference | const_reference |
Public Member Functions | |
DimensionSet () | |
Default constructor creates an empty DimensionSet. More... | |
DimensionSet (const DimensionSet &o) | |
Copy constructor. More... | |
DimensionSet & | operator= (DimensionSet const ©) |
DimensionSet assignment operator. More... | |
void | swap (DimensionSet &s) |
Swaps data with another DimensionSet. More... | |
DimensionSet (const DimensionSet::value_type &d) | |
Creates a new DimensionSet with the passed Dimension as initial Dimension. More... | |
DimensionSet (const DimensionSet::value_type &d1, const DimensionSet::value_type &d2) | |
Creates a new DimensionSet with the passed Dimensions as initial Dimensions (convenience method) More... | |
DimensionSet (const DimensionSet::value_type &d1, const DimensionSet::value_type &d2, const DimensionSet::value_type &d3) | |
Creates a new DimensionSet with the passed Dimensions as initial Dimensions (convenience method) More... | |
bool | isSubSet (const DimensionSet &other) const |
Returns true if the passed DimensionSet is a subset of this DimensionSet. More... | |
bool | isRealSubSet (const DimensionSet &other) const |
Returns true if the passed DimensionSet is a real subset of this DimensionSet. More... | |
void | addDimension (const DimensionSet::value_type &d) |
Adds the passed dimension to the DimensionSet. More... | |
bool | hasDimension (const DimensionSet::value_type &d) const |
Returns true if the passed Dimension is inside this DimensionSet. More... | |
bool | operator== (const DimensionSet &o) const |
Returns true if the dimensions of both sets are equal. More... | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
const_iterator | find (const value_type &__x) const |
size_type | size () const |
Returns the size of the DimensionSet. More... | |
template<typename _InputIterator > | |
void | insert (_InputIterator __first, _InputIterator __last) |
A template function that attempts to insert a range of elements. More... | |
iterator | insert (const_iterator __position, const value_type &__x) |
Attempts to insert an element into the DimensionSet. More... | |
bool | empty () const |
Returns true if the DimensionSet is empty. More... | |
Static Public Attributes | |
static const DimensionSet | timeDomain |
Shortcut to a DimensionSet which only contains time. More... | |
static const DimensionSet | freqDomain |
Shortcut to a DimensionSet which only contains frequency. More... | |
static const DimensionSet | timeFreqDomain |
Shortcut to a DimensionSet which contains time and frequency. More... | |
Protected Types | |
typedef std::set< Dimension > | _Base |
Protected Attributes | |
_Base | Storage |
Friends | |
std::ostream & | operator<< (std::ostream &out, const DimensionSet &d) |
Output operator for a dimension. More... | |
Represents a set of dimensions which is used to define over which dimensions a mapping is defined (the domain of the mapping).
This class actually public extends from std::set<Dimension>. So any method provided by std::set can be also used.
The dimensions are stored ordered by their ids.
Note: Unlike Arguments and Mappings, a DimensionSet does not contain "time" as dimension per default. You'll have to add it like any other dimension.
|
protected |
typedef _Base::const_iterator inet::physicallayer::DimensionSet::const_iterator |
typedef _Base::const_reference inet::physicallayer::DimensionSet::const_reference |
typedef _Base::reverse_iterator inet::physicallayer::DimensionSet::const_reverse_iterator |
typedef _Base::iterator inet::physicallayer::DimensionSet::iterator |
typedef _Base::reverse_iterator inet::physicallayer::DimensionSet::reverse_iterator |
typedef _Base::size_type inet::physicallayer::DimensionSet::size_type |
typedef _Base::value_type inet::physicallayer::DimensionSet::value_type |
|
inline |
Default constructor creates an empty DimensionSet.
|
inline |
Copy constructor.
|
inline |
Creates a new DimensionSet with the passed Dimension as initial Dimension.
|
inline |
Creates a new DimensionSet with the passed Dimensions as initial Dimensions (convenience method)
|
inline |
Creates a new DimensionSet with the passed Dimensions as initial Dimensions (convenience method)
|
inline |
Adds the passed dimension to the DimensionSet.
Referenced by inet::physicallayer::DimensionalAnalogModelBase::computeNoise(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::initialize(), and inet::physicallayer::DimensionalTransmitterBase::initialize().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns true if the passed Dimension is inside this DimensionSet.
Referenced by inet::physicallayer::DimensionalNoise::computeMaxPower(), inet::physicallayer::DimensionalSNIR::computeMin(), inet::physicallayer::DimensionalReception::computeMinPower(), inet::physicallayer::DimensionalSignalAnalogModel::computeMinPower(), inet::physicallayer::DimensionalAnalogModelBase::computeNoise(), inet::physicallayer::IsotropicDimensionalBackgroundNoise::computeNoise(), inet::physicallayer::DimensionalAnalogModelBase::computeReceptionPower(), inet::physicallayer::MappingUtils::createMapping(), and inet::physicallayer::DimensionalTransmitterBase::createPowerMapping().
|
inline |
A template function that attempts to insert a range of elements.
first | Iterator pointing to the start of the range to be inserted. |
last | Iterator pointing to the end of the range. |
Complexity similar to that of the range constructor.
Referenced by inet::physicallayer::Argument::getDimensions().
|
inline |
Attempts to insert an element into the DimensionSet.
position | An iterator that serves as a hint as to where the element should be inserted. |
x | Element to be inserted. |
This function is not concerned about whether the insertion took place, and thus does not return a boolean like the single-argument insert() does. Note that the first parameter is only a hint and can potentially improve the performance of the insertion process. A bad hint would cause no gains in efficiency.
For more on hinting, see: http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt07ch17.html
Insertion requires logarithmic time (if the hint is not taken).
|
inline |
Returns true if the passed DimensionSet is a real subset of this DimensionSet.
A DimensionSet is a real subset of this DimensionSet if every Dimension of the passed DimensionSet is defined in this DimensionSet and there is at least one Dimensions in this set which isn't in the other set.
|
inline |
Returns true if the passed DimensionSet is a subset of this DimensionSet.
A DimensionSet is a subset of this DimensionSet if every Dimension of the passed DimensionSet is defined in this DimensionSet.
Referenced by inet::physicallayer::MappingUtils::findMax(), inet::physicallayer::MappingUtils::findMin(), and inet::physicallayer::SimpleConstMappingIterator::SimpleConstMappingIterator().
|
inline |
DimensionSet assignment operator.
copy | A DimensionSet of identical element and allocator types. |
All the elements of copy are copied.
|
inline |
Returns true if the dimensions of both sets are equal.
|
inline |
Referenced by inet::physicallayer::MappingUtils::createCompatibleMapping().
|
inline |
|
inline |
Referenced by inet::physicallayer::MappingUtils::createCompatibleMapping().
|
inline |
|
inline |
Returns the size of the DimensionSet.
Referenced by inet::physicallayer::MappingUtils::createMapping(), isRealSubSet(), operator==(), and inet::physicallayer::ConstMapping::print().
|
inline |
Swaps data with another DimensionSet.
s | A DimensionSet of the same element and allocator types. |
This exchanges the elements between two DimensionSet's in constant time. Note that the global std::swap() function is specialized such that std::swap(s1,s2) will feed to this function.
Referenced by inet::physicallayer::ConstMapping::swap().
|
friend |
Output operator for a dimension.
|
static |
Shortcut to a DimensionSet which only contains frequency.
Referenced by inet::physicallayer::Dimension::Dimension().
|
protected |
Referenced by isSubSet(), and swap().
|
static |
Shortcut to a DimensionSet which only contains time.
Referenced by inet::physicallayer::Dimension::Dimension().
|
static |
Shortcut to a DimensionSet which contains time and frequency.
Referenced by inet::physicallayer::Dimension::Dimension().