Class DenseCooFieldEquals

java.lang.Object
org.flag4j.linalg.ops.dense_sparse.coo.field_ops.DenseCooFieldEquals

public final class DenseCooFieldEquals extends Object
This class provides methods for checking the equality of a dense field tensor with a sparse field tensor.
  • Method Details

    • matrixEquals

      public static <T extends Field<T>> boolean matrixEquals(AbstractDenseFieldMatrix<?,?,T> A, AbstractCooFieldMatrix<?,?,?,T> B)
      Checks if two real dense matrices are equal.
      Parameters:
      A - First matrix.
      B - Second matrix.
      Returns:
      True if the two matrices are element-wise equivalent.
    • vectorEquals

      public static <T extends Field<T>> boolean vectorEquals(AbstractDenseFieldVector<?,?,T> src1, AbstractCooFieldVector<?,?,?,?,T> src2)
      Checks if a complex dense vector is equal to a complex sparse vector.
      Parameters:
      src1 - Entries of dense vector.
      src2 - Non-zero Entries of sparse vector.
      indices - Indices of non-zero data in the sparse vector.
      sparseSize - Size of the sparse vector.
      Returns:
      True if the two vectors are equal. Returns false otherwise.
    • tensorEquals

      public static <T extends Field<T>> boolean tensorEquals(AbstractDenseFieldTensor<?,T> A, AbstractCooFieldTensor<?,?,T> B)
      Checks if a complex dense tensor is equal to a complex sparse tensor.
      Parameters:
      A - Complex dense tensor.
      B - Complex sparse tensor.
      Returns:
      True if the two tensors are element-wise equivalent.