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 Member Functions | |
DimensionSet () | |
Default constructor creates an empty DimensionSet. | |
DimensionSet (const Dimension &d) | |
Creates a new DimensionSet with the passed Dimension as initial Dimension. | |
DimensionSet (const Dimension &d1, const Dimension &d2) | |
Creates a new DimensionSet with the passed Dimensions as initial Dimensions (convenience method). | |
DimensionSet (const Dimension &d1, const Dimension &d2, const Dimension &d3) | |
Creates a new DimensionSet with the passed Dimensions as initial Dimensions (convenience method). | |
bool | isSubSet (const DimensionSet &other) const |
Returns true if the passed DimensionSet is a subset of this DimensionSet. | |
bool | isRealSubSet (const DimensionSet &other) const |
Returns true if the passed DimensionSet is a real subset of this DimensionSet. | |
void | addDimension (const Dimension &d) |
Adds the passed dimension to the DimensionSet. | |
bool | hasDimension (const Dimension &d) const |
Returns true if the passed Dimension is inside this DimensionSet. | |
bool | operator== (const DimensionSet &o) |
Returns true if the dimensions of both sets are equal. | |
Static Public Attributes | |
static const DimensionSet | timeDomain |
Shortcut to a DimensionSet which only contains time. | |
static const DimensionSet | timeFreqDomain |
Shortcut to a DimensionSet which contains time and frequency. |
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.
Definition at line 173 of file MappingBase.h.
bool DimensionSet::isRealSubSet | ( | const DimensionSet & | other | ) | const [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.
Definition at line 235 of file MappingBase.h.
{ if(this->size() <= other.size()) return false; return std::includes(this->begin(), this->end(), other.begin(), other.end()); }
bool DimensionSet::isSubSet | ( | const DimensionSet & | other | ) | const [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.
Definition at line 219 of file MappingBase.h.
Referenced by MappingUtils::findMax(), MappingUtils::findMin(), and SimpleConstMappingIterator::SimpleConstMappingIterator().
{ if(this->size() < other.size()) return false; return std::includes(this->begin(), this->end(), other.begin(), other.end()); }