Class CooSemiringEquals

java.lang.Object
org.flag4j.linalg.ops.sparse.coo.semiring_ops.CooSemiringEquals

public final class CooSemiringEquals extends Object
A utility class for checking equality between COO Semiring tensors.
  • Method Details

    • cooTensorEquals

      public static <T extends Semiring<T>> boolean cooTensorEquals(AbstractCooSemiringTensor<?,?,T> a, AbstractCooSemiringTensor<?,?,T> b)
      Checks if two real sparse tensors are real. Assumes the indices of each sparse tensor are sorted. Any explicitly stored zero's will be ignored.
      Parameters:
      a - First tensor in the equality check.
      b - Second tensor in the equality check.
      Returns:
      True if the tensors are equal. False otherwise.
    • cooMatrixEquals

      public static <T extends Semiring<T>> boolean cooMatrixEquals(AbstractCooSemiringMatrix<?,?,?,T> a, AbstractCooSemiringMatrix<?,?,?,T> b)
      Checks if two real sparse matrices are real. Assumes the indices of each sparse matrix are sorted. Any explicitly stored zero's will be ignored.
      Parameters:
      a - First matrix in the equality check.
      b - Second matrix in the equality check.
      Returns:
      True if the matrices are equal. False otherwise.
    • cooVectorEquals

      public static <T extends Semiring<T>> boolean cooVectorEquals(AbstractCooSemiringVector<?,?,?,?,T> a, AbstractCooSemiringVector<?,?,?,?,T> b)
      Checks if two real sparse vectors are real. Assumes the indices of each sparse vector are sorted. Any explicitly stored zero's will be ignored.
      Parameters:
      a - First vector in the equality check.
      b - Second vector in the equality check.
      Returns:
      True if the vectors are equal. False otherwise.