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 thesrc
matrix is the identity matrix.static <T extends Semiring<T>>
booleanisIdentity
(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if thesrc
matrix 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:
true
if the CSR matrix is upper-triangular;false
otherwise.
-
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:
true
if the CSR matrix is lower-triangular;false
otherwise.
-
isIdentity
public static <T extends Semiring<T>> boolean isIdentity(Shape shape, T[] entries, int[] rowPointers, int[] colIndices) Checks if thesrc
matrix is the identity matrix.- Parameters:
src
- The matrix to check if it is the identity matrix.- Returns:
- True if the
src
matrix is the identity matrix. False otherwise.
-
isIdentity
Checks if thesrc
matrix is the identity matrix.- Parameters:
src
- The matrix to check if it is the identity matrix.- Returns:
- True if the
src
matrix is the identity matrix. False otherwise.
-