xnamed_axis

Defined in xframe/xnamed_axis.hpp

template<class K, class T, class MT = hash_map_tag, class L = xtl::mpl::vector<int, std::size_t, char, xf::fstring>, class LT = xtl::mpl::cast_t<L, xtl::variant>>
class xnamed_axis : public xt::xexpression<xnamed_axis<K, T, MT, L, LT>>

Class modeling a dimension name - axis pair in a coordinate system.

The xnamed_axis class stores a dimension name and an xaxis as an xaxis_variant.

See

xaxis_variant, xaxis

Template Parameters
  • K: the dimension name type.

  • T: the integer type used to represent positions in the underlying xaxis_variant.

Public Functions

template<class A>
xnamed_axis(const name_type &name, A &&axis)

Builds an xnamed_axis.

Parameters
  • name: the dimension name.

  • axis: the underlying xaxis.

template<class A>
xnamed_axis(name_type &&name, A &&axis)

Builds an xnamed_axis.

Parameters
  • name: the dimension name.

  • axis: the underlying xaxis.

auto name() const &

Returns the name of the xnamed_axis.

Return

the dimension name.

auto axis() const &

Returns the underlying xaxis_variant.

Return

the xaxis_variant.

See

xaxis_variant

auto label(size_type i) const &

Returns the label at the given position of the underlying xaxis.

Return

the label at the given position of the underlying xaxis.

Parameters
  • i: the position.

template<class K, class A>
auto xf::named_axis(const K &name, A &&axis)

Builder function which creates an xnamed_axis.

Return

the created xnamed_axis.

Parameters
  • name: the dimension name.

  • axis: the xaxis that you want to store in the xnamed_axis.

Template Parameters
  • K: the dimension name type.

  • A: the axis type.