Class RealDenseEquals

java.lang.Object
org.flag4j.linalg.ops.dense.real.RealDenseEquals

public final class RealDenseEquals extends Object
This class provides methods for checking the equality of real dense tensors.
  • Method Details

    • vectorEquals

      public static boolean vectorEquals(double[] src1, double[] src2)
      Checks if two real dense vectors are equal.
      Parameters:
      src1 - Entries of first vector.
      src2 - Entries of second vector.
      Returns:
      true if the two vectors are element-wise numerically equal; false otherwise.
    • matrixEquals

      public static boolean matrixEquals(Matrix A, Matrix 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.
    • tensorEquals

      public static boolean tensorEquals(Tensor A, Tensor B)
      Checks if two real dense tensors are equal.
      Parameters:
      A - First tensor in comparison.
      B - Second tensor in comparison.
      Returns:
      True if the two tensors are numerically element-wise equivalent.
    • tensorEquals

      public static boolean tensorEquals(double[] src1, Shape shape1, double[] src2, Shape shape2)
      Checks if two dense tensors are equal. For the purposes of this method, Double.NaN values are considered equal.
      Parameters:
      src1 - Entries of first tensor.
      shape1 - Shape of first tensor.
      src2 - Entries of second tensor.
      shape2 - Shape of second tensor.
      Returns:
      True if the two tensors are the same shape and numerically element-wise equivalent.