BinaryMatrix class

An immutable row-major matrix with elements in GF(2).

Each entry of rows is a packed row mask where bit i represents column i. This representation is efficient for sparse constant hardware transforms and elaboration-time algebra.

Available extensions
Annotations

Constructors

BinaryMatrix(Iterable<BigInt> rows, {required int columnCount})
Creates a matrix from packed rows.
BinaryMatrix.fromBinaryRows(Iterable<String> literals)
Creates a matrix from arbitrary-width binary row literals.
factory
BinaryMatrix.fromLogicValueArray(LogicValueArray values)
Creates a matrix from a one-dimensional array of packed row values.
factory
BinaryMatrix.fromLogicValueRows(Iterable<LogicValue> rows)
Creates a matrix from equally sized, two-state rows.
factory
BinaryMatrix.fromRadixRows(Iterable<String> literals)
Creates a matrix from ROHD width/radix-encoded row literals.
factory
BinaryMatrix.identity(int size)
Creates an identity matrix with size rows and columns.
factory

Properties

columnCount → int
The number of columns.
final
configurationSignature → String
A deterministic signature suitable for generated definition names.
no setter
hashCode → int
The hash code for this object.
no setteroverride
rank → int
Returns the rank over GF(2).
no setter
rowCount → int
The number of rows.
no setter
rows → List<BigInt>
The packed rows.
no setter
rowValueArray → LogicValueArray

Available on BinaryMatrix, provided by the BinaryMatrixHardwareConversion extension

Returns the packed rows as a one-dimensional LogicValueArray.
no setter
rowValues → List<LogicValue>

Available on BinaryMatrix, provided by the BinaryMatrixHardwareConversion extension

Returns all packed rows as two-state LogicValues.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

entry(int rowIndex, int columnIndex) → bool
Returns the entry at rowIndex, columnIndex.
multiplyVector(BigInt vector) → BigInt
Multiplies this matrix by packed vector over GF(2).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
row(int index) → BigInt
Returns packed row index.
rowConst(int index) → Const

Available on BinaryMatrix, provided by the BinaryMatrixHardwareConversion extension

Returns packed row index as a binary-preferred Const.
rowValue(int index) → LogicValue

Available on BinaryMatrix, provided by the BinaryMatrixHardwareConversion extension

Returns packed row index as a two-state LogicValue.
toLogicArray({String? name, int numUnpackedDimensions = 0}) → LogicArray

Available on BinaryMatrix, provided by the BinaryMatrixHardwareConversion extension

Returns constant packed rows as a one-dimensional LogicArray.
toString() → String
A string representation of this object.
override
transpose() → BinaryMatrix
Returns the transpose of this matrix.

Operators

operator *(BinaryMatrix right) → BinaryMatrix
Multiplies this matrix by right over GF(2).
operator +(BinaryMatrix other) → BinaryMatrix
Adds two equally shaped matrices over GF(2).
operator ==(Object other) → bool
The equality operator.
override