xdimension¶
Defined in xframe/xdimension.hpp
-
template<class
L
, classT
= std::size_t>
classxdimension
: private xf::xaxis<L, T, map_tag>¶ Class modeling dimensions.
The xdimension class is used for modeling the mapping of dimension names to their positions in a data tensor. This class is a special axis with a broadcast method instead of merge and intersect, thus its API is really close the one of
xaxis
.- See
- Template Parameters
L
: the type of dimension name.T
: the integer type use to represent the positions of the dimensions. Default value isstd::size_t
.
Public Functions
-
xdimension
()¶ Constructs an empty xdimension object.
-
xdimension
(const label_list &labels)¶ Constructs an xdimension object with the given list of dimension labels.
This list is copied.
- Parameters
labels
: the list of dimension names.
-
xdimension
(label_list &&labels)¶ Constructs an xdimension object with the given list of dimension labels.
This list is moved and therefore it is invalid after the xdimension object has been constructed.
- Parameters
labels
: the list of dimension names.
-
xdimension
(std::initializer_list<key_type> init)¶ Constructs an xdimension object from the given initializer list of dimension names.
- Parameters
init
: the list of dimension names.
-
template<class
L
, classT
>
boolxf
::
operator==
(const xdimension<L, T> &lhs, const xdimension<L, T> &rhs) Returns true if
lhs
andrhs
are equivalent dimension mappings, i.e.they contain the same dimension name - dimension position pairs.
- Parameters
lhs
: an xdimension object.rhs
: an xdimension obejct.
-
template<class
L
, classT
>
boolxf
::
operator!=
(const xdimension<L, T> &lhs, const xdimension<L, T> &rhs) Returns true if
lhs
andrhs
are not equivalent dimension mappings, i.e.they contain different dimension name - dimension position pairs.
- Parameters
lhs
: an xdimension object.rhs
: an xdimension obejct.