Class DenseEquals

java.lang.Object
org.flag4j.linalg.ops.dense.DenseEquals

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

    • tensorEquals

      public static <T> boolean tensorEquals(T[] src1, Shape shape1, T[] 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.