BinaryMatrix.fromLogicValueRows constructor

BinaryMatrix.fromLogicValueRows(
  1. Iterable<LogicValue> rows
)

Creates a matrix from equally sized, two-state rows.

Each LogicValue.width becomes the matrix columnCount, preserving leading zeroes. Values containing x or z are rejected.

Implementation

factory BinaryMatrix.fromLogicValueRows(Iterable<LogicValue> rows) =>
    BinaryMatrix._fromParsedRows([
      for (final row in rows) parseBinaryMathLogicValue(row),
    ]);