NEML2 1.4.0
|
The accessor containing all the information needed to access an item in a LabeledAxis
.
More...
The accessor containing all the information needed to access an item in a LabeledAxis
.
The accessor consists of an arbitrary number of item names. The last item name can be either a variable name or a sub-axis name. All the other item names are considered to be sub-axis names.
The LabeledAxisAccessor stores the item labels and does not resolve the actual layout of the item. This way an accessor can be used access the same variable from different tensor layouts.
The item names cannot contain whitespace, ".", ",", ";", or "/".
#include <LabeledAxisAccessor.h>
|
default |
|
inline |
|
inline |
LabeledAxisAccessor | ( | const std::vector< std::string > & | names | ) |
LabeledAxisAccessor | ( | const LabeledAxisAccessor & | other | ) |
LabeledAxisAccessor append | ( | const LabeledAxisAccessor & | axis | ) | const |
Add a new item.
bool empty | ( | ) | const |
LabeledAxisAccessor on | ( | const LabeledAxisAccessor & | axis | ) | const |
Re-mount the LabeledAxisAccessor on an axis by the axis accessor.
operator std::vector< std::string > | ( | ) | const |
LabeledAxisAccessor & operator= | ( | const LabeledAxisAccessor & | other | ) |
Assignment operator.
size_t size | ( | ) | const |
LabeledAxisAccessor slice | ( | size_t | n | ) | const |
Remove the leading n
items from the labels.
LabeledAxisAccessor slice | ( | size_t | n1, |
size_t | n2 ) const |
Extract out the labels from n1
to n2
.
bool start_with | ( | const LabeledAxisAccessor & | axis | ) | const |
Check if this accessor begins with another accessor.
|
inline |
LabeledAxisAccessor with_suffix | ( | const std::string & | suffix | ) | const |
Append a suffix to the item name.