Class RealDenseSparseEquals
java.lang.Object
org.flag4j.operations.dense_sparse.coo.real.RealDenseSparseEquals
This class contains methods for checking the equality of a real dense and real sparse tensors.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
matrixEquals
(Matrix A, CooMatrix B) Checks if a real dense matrix is equal to a real sparse matrix.static boolean
tensorEquals
(Tensor A, CooTensor B) Checks if a real dense tensor is equal to a real sparse tensor.static boolean
vectorEquals
(double[] src1, double[] src2, int[] indices, int sparseSize) Checks if a real dense vector is equal to a sparse vector equals.
-
Constructor Details
-
RealDenseSparseEquals
private RealDenseSparseEquals()
-
-
Method Details
-
vectorEquals
public static boolean vectorEquals(double[] src1, double[] src2, int[] indices, int sparseSize) Checks if a real dense vector is equal to a sparse vector equals.- Parameters:
src1
- Entries of dense vector.src2
- Non-zero Entries of sparse vector.indices
- Indices of non-zero entries in the sparse vector.sparseSize
- Size of the sparse vector.- Returns:
- True if the two matrices are equal. Returns false otherwise.
-
matrixEquals
-
tensorEquals
-