Class CooRingTensorOps
java.lang.Object
org.flag4j.linalg.ops.sparse.coo.ring_ops.CooRingTensorOps
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V extends Ring<V>>
SparseTensorData<V> sub
(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices) Sums two complex sparse COO tensors and stores result in a new COO tensor.
-
Method Details
-
sub
public static <V extends Ring<V>> SparseTensorData<V> sub(Shape shape1, V[] src1Entries, int[][] src1Indices, Shape shape2, V[] src2Entries, int[][] src2Indices) Sums two complex sparse COO tensors and stores result in a new COO tensor.- Parameters:
shape1
- Shape of the first tensor.src1Entries
- Non-zero data of the first tensor.src1Indices
- Non-zero indices of the first tensor.shape2
- Shape of the second tensor.src2Entries
- Non-zero data of the second tensor.src2Indices
- Non-zero indices of the second tensor.- Returns:
- The element-wise tensor sum of the two tensors.
- Throws:
LinearAlgebraException
- If the tensorssrc1
andsrc2
do not have the same shape.
-