LayoutShape class
An immutable row-major multidimensional shape.
Dimension zero is the slowest-varying dimension and the final dimension is the fastest-varying dimension.
- Annotations
Constructors
-
LayoutShape(Iterable<
int> dimensions) -
Creates a shape from positive
dimensions.
Properties
- configurationSignature → String
-
A deterministic signature suitable for generated definition names.
no setter
-
dimensions
→ List<
int> -
The size of each dimension.
no setter
- elementCount → int
-
The total number of elements.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- rank → int
-
The number of dimensions.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
flatten(
Iterable< int> coordinates) → int -
Converts row-major
coordinatesinto a linear element index. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unflatten(
int index) → List< int> -
Converts a row-major linear
indexinto multidimensional coordinates.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override