Class RealComplexCooTensorOps
java.lang.Object
org.flag4j.linalg.ops.sparse.coo.real_complex.RealComplexCooTensorOps
Utility class for computing ops between a complex sparse COO tensor and a real coo tensor.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CooCTensoradd(CooCTensor src1, CooTensor src2) Sums two sparse COO tensors and stores result in a new COO tensor.static CooCTensorelemMult(CooCTensor src1, CooTensor src2) Computes the element-wise multiplication between two sparse COO tensors.static CooCTensorelemMult(CooTensor src1, CooCTensor src2) Computes the element-wise multiplication between two sparse COO tensors.static CooCTensorsub(CooCTensor src1, CooTensor src2) Computes difference of two sparse COO tensors and stores result in a new COO tensor.static CooCTensorsub(CooTensor src1, CooCTensor src2) Computes difference of two sparse COO tensors and stores result in a new COO tensor.
-
Method Details
-
add
Sums two sparse COO tensors and stores result in a new COO tensor.- Parameters:
src1- First tensor in the sum.src2- Second tensor in the sum.- Returns:
- The element-wise tensor sum of
src1andsrc2. - Throws:
LinearAlgebraException- If the tensorssrc1andsrc2do not have the same shape.
-
sub
Computes difference of two sparse COO tensors and stores result in a new COO tensor.- Parameters:
src1- First tensor in the difference.src2- Second tensor in the difference.- Returns:
- The element-wise tensor difference of
src1andsrc2. - Throws:
LinearAlgebraException- If the tensorssrc1andsrc2do not have the same shape.
-
sub
Computes difference of two sparse COO tensors and stores result in a new COO tensor.- Parameters:
src1- First tensor in the difference.src2- Second tensor in the difference.- Returns:
- The element-wise tensor difference of
src1andsrc2. - Throws:
LinearAlgebraException- If the tensorssrc1andsrc2do not have the same shape.
-
elemMult
Computes the element-wise multiplication between two sparse COO tensors.
Assumes indices of both tensors are sorted lexicographically.
- Parameters:
src1- First tensor in the element-wise multiplication.src2- Second tensor in the element-wise multiplication.- Returns:
- The element-wise product of
src1andsrc2.
-
elemMult
Computes the element-wise multiplication between two sparse COO tensors.
Assumes indices of both tensors are sorted lexicographically.
- Parameters:
src1- First tensor in the element-wise multiplication.src2- Second tensor in the element-wise multiplication.- Returns:
- The element-wise product of
src1andsrc2.
-