isLowerTriangular property
bool
get
isLowerTriangular
Tests if this Matrix is a lower triangular matrix, with non-zero values only in the lower-triangle of the matrix.
Implementation
bool get isLowerTriangular {
final isEqual = dataType.equality.isEqual;
final additiveIdentity = dataType.field.additiveIdentity;
for (var r = 0; r < rowCount; r++) {
for (var c = r + 1; c < colCount; c++) {
if (!isEqual(getUnchecked(r, c), additiveIdentity)) {
return false;
}
}
}
return true;
}