Class ComplexDenseSparseOperations
java.lang.Object
org.flag4j.operations.dense_sparse.coo.complex.ComplexDenseSparseOperations
This class contains methods to apply common binary operations to a complex dense/sparse matrix and to a complex sparse/dense matrix.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CTensor
add
(CTensor src1, CooCTensor src2) Computes element-wise addition of a complex dense tensor with a complex sparse tensor.static CTensor
add
(CooCTensor src1, CNumber b) Adds a scalar to a complex sparse COO tensor.static void
addEq
(CTensor src1, CooCTensor src2) Computes element-wise addition of a complex dense tensor with a complex sparse tensor.static CooCTensor
elemMult
(CTensor src1, CooCTensor src2) Computes the element-wise tensor multiplication between a complex dense tensor and a complex sparse tensor.static CTensor
sub
(CTensor src1, CooCTensor src2) Computes the element-wise tensor a complex sparse tensor from a complex dense tensor.static CTensor
sub
(CooCTensor src1, CTensor src2) Subtracts a complex dense tensor from a complex sparse tensor.static void
subEq
(CTensor src1, CooCTensor src2) Computes element-wise subtraction of a complex dense tensor with a complex sparse tensor.
-
Constructor Details
-
ComplexDenseSparseOperations
private ComplexDenseSparseOperations()
-
-
Method Details
-
add
Computes element-wise addition of a complex dense tensor with a complex sparse tensor.- Parameters:
src1
- Complex dense tensor.src2
- Complex sparse tensor.- Returns:
- The result of the element-wise subtraction.
-
addEq
Computes element-wise addition of a complex dense tensor with a complex sparse tensor.- Parameters:
src1
- Complex dense tensor.src2
- Complex sparse tensor.
-
sub
Computes the element-wise tensor a complex sparse tensor from a complex dense tensor.- Parameters:
src1
- Complex dense tensor.src2
- Complex sparse tensor.- Returns:
- The result of the element-wise tensor subtraction.
-
sub
Subtracts a complex dense tensor from a complex sparse tensor.- Parameters:
src1
- First tensor in the sum.src2
- Second tensor in the sum.- Returns:
- The result of the tensor addition.
- Throws:
IllegalArgumentException
- If the tensors do not have the same shape.t
-
subEq
Computes element-wise subtraction of a complex dense tensor with a complex sparse tensor.- Parameters:
src1
- Complex dense tensor.src2
- Complex sparse tensor.
-
elemMult
Computes the element-wise tensor multiplication between a complex dense tensor and a complex sparse tensor.- Parameters:
src1
- Complex dense tensor.src2
- Complex sparse tensor.- Returns:
- THe result of the element-wise tensor multiplication.
-
add
Adds a scalar to a complex sparse COO tensor.- Parameters:
src1
- Sparse tensor in sum.b
- Scalar in sum.- Returns:
- A dense tensor which is the sum of
src1
andb
such thatb
is added to each element ofsrc1
.
-