strata::Slice¶
Part of Views and expressions.
E at fixed indices along Axes, an axis less for each: element i... is the operand's at i... with the fixed indices put in at Axes.
What slice<Axes...> gives for a node that has no slice of its own: it reads through the operand, and its cursor is the operand's, moved to the fixed indices once. A node with a better way, a view whose slice is another view, gives that instead.
Template parameters
| Name | Description |
|---|---|
E | The operand as it is held, capture_t of what was given: borrowed for an lvalue owner, owned for a temporary one, which makes the slice moved and never copied, else by value. |
Axes | The axes that are fixed, axes of the operand, in increasing order. |
Members¶
indices_type¶
The fixed indices, one for each of Axes, in their order.
Slice¶
operand at indices along Axes.
Precondition
Each index is less than the operand's extent along its axis.
operand¶
The operand that is sliced.
indices¶
The fixed indices, one for each of Axes.
shape¶
The operand's shape without Axes.
cursor¶
Where a traversal starts: the operand's cursor, moved to the fixed indices along Axes.
operator[]¶
The element at a position of the slice: the operand's, with the fixed indices along Axes.
Precondition
Each index is within the extent of its axis; the operand checks it.
slice¶
template <std::size_t... Outer>
constexpr auto slice(const Slice &sliced, const std::array<std::size_t, sizeof...(Outer)> &indices)
The slice of the slice: one slice of the operand, along the axes both cut, each at its index.