Expand description
Array shapes, axis keys and names, and their limits.
Structs§
- Keys
- Names for the positions on one axis. A position may have no name. The names that are present are unique.
- Lanes
- An array’s items as lanes along one axis:
outerlanes before it, eachlenitems long, withinneritems between neighbours along it. - Layout
- An array’s shape, with optional keys and a name for each axis. A layout with no keys or names holds no
Meta. - Shape
- An array’s shape: the length of each axis. Ranks 0 to 2 are held inline with no allocation, and higher ranks in one allocation of exactly their length. Convert a
Vec, an array or a slice of lengths into one, or collect it from lengths.
Enums§
- Alignment
- How the positions of one axis’s keys lie along those of a result axis, as
Keys::alignedandKeys::uniongive it.
Constants§
- FRESH
- The character between a fresh name’s stem and its random part.
showncuts a hidden name after it. - MAX_
GENERATED_ ELEMENTS - The most items in an array that a function makes.
- MAX_
RANK - The most axes an array can have.
Functions§
- agreed
- The value that every present item of
valuesequals. Absent items don’t count. Two different values give none. - coordinates
- Each axis’s coordinate of flat position
flat, from the last axis to the first.flatmust be within the shape. - count
- The number of items in an array of
shapethat already exists. Unlikeelement_count, it checks neither the rank nor overflow. Ranks 0 to 2 compute it inline. - element_
count - The number of items in an array of
shape. A Limit error whenshapehas more thanMAX_RANKaxes, or more items than ausizecounts. - exclusive_
sums - The offsets of parts of
sizeslaid end to end, each the sum of the sizes before it. - generated_
len - The number of items in an array of
shapethat a function makes. A Limit error pastMAX_GENERATED_ELEMENTS, or where the array would take the process past its memory guard’s limit (memory::admit). - hidden
- Whether an axis name is hidden: it starts with
_. Hidden and visible names are separate namespaces. - names_
conflict - Whether two axis names conflict: both are names, they differ, and they’re in the same namespace. A name meets a name from the other namespace as if that axis were unnamed.
- position
- The position among
lenthatngives, counting from the end when negative.Noneoutside the range. - repeated_
name - The first name that appears more than once in
names. - shown
nameas messages and display show it: a hidden name that holdsFRESHcut after the last one, as in_b·…. Any other name stays as it is.- strides
- The distance between neighbouring items along each axis of an array of
shape.