Class RealSparseMatrixProperties

java.lang.Object
org.flag4j.linalg.ops.sparse.coo.real.RealSparseMatrixProperties

public final class RealSparseMatrixProperties extends Object
This class contains low level implementations for methods to evaluate certain properties of a real sparse matrix. (i.e. if the matrix is symmetric).
  • Method Details

    • isIdentity

      public static boolean isIdentity(CooMatrix src)
      Checks if a real sparse matrix is the identity matrix.
      Parameters:
      src - Matrix to check if it is the identity matrix.
      Returns:
      true if the src matrix is the identity matrix; false otherwise.
    • isCloseToIdentity

      public static boolean isCloseToIdentity(CooMatrix src)
      Checks if a real sparse matrix is close to the identity matrix.
      Parameters:
      src - Matrix to check if it is the identity matrix.
      Returns:
      true if the src matrix is the identity matrix; false otherwise.
    • isSymmetric

      public static boolean isSymmetric(Shape shape, double[] data, int[] rowIndices, int[] colIndices)
      Checks if a sparse COO matrix is symmetric.
      Parameters:
      shape - The shape of the COO matrix.
      data - Non-zero entries of the COO matrix.
      rowIndices - Non-zero row indices of the COO matrix.
      colIndices - Non-zero column indices of the COO matrix.
      Returns:
      true if the specified COO matrix is symmetric (i.e. equal to its transpose); false otherwise.
    • isAntiSymmetric

      public static boolean isAntiSymmetric(Shape shape, double[] data, int[] rowIndices, int[] colIndices)
      Checks if a sparse COO matrix is symmetric.
      Parameters:
      shape - The shape of the COO matrix.
      data - Non-zero entries of the COO matrix.
      rowIndices - Non-zero row indices of the COO matrix.
      colIndices - Non-zero column indices of the COO matrix.
      Returns:
      true if the specified COO matrix is symmetric (i.e. equal to its transpose); false otherwise.