Class SemiringCsrProperties
java.lang.Object
org.flag4j.linalg.ops.sparse.csr.semiring_ops.SemiringCsrProperties
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Semiring<T>>
booleanisIdentity(AbstractCsrSemiringMatrix<?, ?, ?, T> src) Checks if thesrcmatrix is the identity matrix.static <T extends Semiring<T>>
booleanisIdentity(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if thesrcmatrix is the identity matrix.static <T extends Semiring<T>>
booleanChecks if a sparse CSR matrix is lower-triangular.static <T extends Semiring<T>>
booleanChecks if a sparse CSR matrix is upper-triangular.
-
Method Details
-
isTriU
public static <T extends Semiring<T>> boolean isTriU(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if a sparse CSR matrix is upper-triangular.- Parameters:
shape- Shape of the CSR matrix.entries- Non-zero data of the CSR matrix.rowPointers- Non-zero row pointers of the CSR matrix.colIndices- Non-zero column indices of the CSR Matrix.- Returns:
trueif the CSR matrix is upper-triangular;falseotherwise.
-
isTriL
public static <T extends Semiring<T>> boolean isTriL(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if a sparse CSR matrix is lower-triangular.- Parameters:
shape- Shape of the CSR matrix.entries- Non-zero data of the CSR matrix.rowPointers- Non-zero row pointers of the CSR matrix.colIndices- Non-zero column indices of the CSR Matrix.- Returns:
trueif the CSR matrix is lower-triangular;falseotherwise.
-
isIdentity
public static <T extends Semiring<T>> boolean isIdentity(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if thesrcmatrix is the identity matrix.- Parameters:
src- The matrix to check if it is the identity matrix.- Returns:
- True if the
srcmatrix is the identity matrix. False otherwise.
-
isIdentity
Checks if thesrcmatrix is the identity matrix.- Parameters:
src- The matrix to check if it is the identity matrix.- Returns:
- True if the
srcmatrix is the identity matrix. False otherwise.
-