Package org.flag4j.operations.dense.real
Class RealDenseEquals
java.lang.Object
org.flag4j.operations.dense.real.RealDenseEquals
This class provides methods for checking the equality of real dense tensors.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
matrixEquals
(Matrix A, Matrix B) Checks if two real dense matrices are equal.static boolean
tensorEquals
(double[] src1, Shape shape1, double[] src2, Shape shape2) Checks if two dense tensors are equal.static boolean
tensorEquals
(Tensor A, Tensor B) Checks if two real dense tensors are equal.static boolean
vectorEquals
(double[] src1, double[] src2) Checks if two real dense vectors are equal.
-
Constructor Details
-
RealDenseEquals
private RealDenseEquals()
-
-
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. Otherwise, returns false.
-
matrixEquals
-
tensorEquals
-
tensorEquals
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.
-