xcoordinate¶
Defined in xframe/xcoordinate.hpp
-
template<class
K, classL= xtl::mpl::vector<int, std::size_t, char, xf::fstring>, classS= std::size_t, classMT= hash_map_tag>
classxcoordinate: public xf::xcoordinate_base<K, xaxis_variant<L, S, MT>>¶ Class modeling coordinates.
The xcoordinate class is used for modeling coordinates. Coordinates are mapping of dimension names to axes. Axes in a xcoordinate object can have different label types.
- Template Parameters
K: the type of dimension names.L: the type list of axes labels.S: the integer type used to represent positions in axes. Default value isstd::size_t.MT: the tag used for choosing the map type which holds the label- position pairs in the axes. Possible values aremap_tagandhash_map_tag. Default value ishash_map_tag.
Public Functions
-
xcoordinate(const map_type &axes)¶ Constructs an xcoordinate object with the given mapping of dimension names to axes.
This mapping is copied.
- Parameters
axes: the dimension names to axes mapping.
-
xcoordinate(map_type &&axes)¶ Constructs an xcoordinate object with the given mapping of dimension names to axes.
This mapping is moved and therefore it is invalid after the xcoordinate has been constructed.
- Parameters
axes: the dimension names to axes mapping.
-
xcoordinate(std::initializer_list<value_type> init)¶ Constructs an xcoordinate object from the given initializer list of dimension names - axes pairs.
-
template<class
K= fstring, classL= xtl::mpl::vector<int, std::size_t, char, xf::fstring>, classS= std::size_t, classMT= hash_map_tag>
xcoordinate<K, L, S, MT>xf::coordinate(const std::map<K, xaxis_variant<L, S, MT>> &axes) Builds and returns an xcoordinate object from the specified mapping of dimension names to axes.
The map is copied.
- Parameters
axes: the dimension names to axes mapping.
-
template<class
K= fstring, classL= xtl::mpl::vector<int, std::size_t, char, xf::fstring>, classS= std::size_t, classMT= hash_map_tag>
xcoordinate<K, L, S, MT>xf::coordinate(std::map<K, xaxis_variant<L, S, MT>> &&axes) Builds and returns an xcoordinate object from the specified mapping of dimension names to axes.
The map is moved, therefore it is invalid after the xcoordinate object has been built.
- Parameters
axes: the dimension names to axes mapping.
-
template<class
K, class ...K1, classS, classMT, classL, classLT, class ...LT1>
xcoordinate<K, L, S, MT>xf::coordinate(xnamed_axis<K, S, MT, L, LT> axis, xnamed_axis<K1, S, MT, L, LT1>... axes) Builds and returns an xcoordinate object from the specified list of named axes.
- Parameters
axes: the list of named axes.
-
template<class
Join, classK, classL, classS, classMT, class ...Args>
xtrivial_broadcastxf::broadcast_coordinates(xcoordinate<K, L, S, MT> &output, const Args&... coordinates) Broadcast a list of coordinates to the specified output coordinate.
- Parameters
output: the xcoordinate result.coordinates: the list of xcoordinate objects to broadcast.