MatrixAlign enum
An enum representing the alignment options for matrix elements in a string representation.
MatrixAlign.left: Left-aligns the matrix elements in each column. MatrixAlign.right: Right-aligns the matrix elements in each column.
Example:
var m = Matrix([
[1, 23, 3],
[456, 5, 67],
[7, 88, 9],
[10, 111, 12],
]);
// Use MatrixAlign.left for left-aligned elements
print(m.toString(separator: ' ', alignment: MatrixAlign.left));
// Output:
// Matrix: 4x3
// ┌1 23 3 ┐
// │456 5 67 │
// │7 88 9 │
// └10 111 12 ┘
// Use MatrixAlign.right for right-aligned elements
print(m.toString(separator: ' ', alignment: MatrixAlign.right));
// Output:
// Matrix: 4x3
// ┌ 1 23 3┐
// │456 5 67│
// │ 7 88 9│
// └ 10 111 12┘
Values
- left → const MatrixAlign
- right → const MatrixAlign
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
MatrixAlign> - A constant List of the values in this enum, in order of their declaration.