BinaryMatrix.identity constructor
- int size
Creates an identity matrix with size rows and columns.
Implementation
factory BinaryMatrix.identity(int size) {
if (size <= 0) {
throw RohdHclException('Binary matrix identity size must be positive.');
}
return BinaryMatrix(
List<BigInt>.generate(size, (index) => BigInt.one << index),
columnCount: size,
);
}