Class RealComplexDenseSparseVectorOps
java.lang.Object
org.flag4j.linalg.ops.dense_sparse.coo.real_complex.RealComplexDenseSparseVectorOps
This class provides low level methods for computing ops between a real/complex dense/sparse vector and a
complex/real sparse/dense vector.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CVector
add
(Vector src1, CooCVector src2) Adds a real dense matrix to a complex sparse matrix.static CooCVector
Compute the element-wise division between a sparse vector and a dense vector.static CooCVector
Computes the element-wise multiplication of a complex dense vector with a real sparse vector.static CVector
Subtracts a real sparse vector from a complex dense vector.static CVector
sub
(Vector src1, CooCVector src2) Subtracts a complex sparse vector from a real dense vector.static CVector
sub
(CooCVector src1, Vector src2) Subtracts a complex dense vector from a complex sparse vector.
-
Method Details
-
add
Adds a real dense matrix to a complex sparse matrix.- Parameters:
src1
- First matrix.src2
- Second matrix.- Returns:
- The result of the vector addition.
- Throws:
IllegalArgumentException
- If the vectors do not have the same shape.
-
sub
Subtracts a complex sparse vector from a real dense vector.- Parameters:
src1
- First vector.src2
- Second vector.- Returns:
- The result of the vector subtraction.
- Throws:
IllegalArgumentException
- If the vectors do not have the same shape.
-
sub
Subtracts a complex dense vector from a complex sparse vector.- Parameters:
src1
- Sparse vector.src2
- Dense vector.- Returns:
- The result of the vector subtraction.
- Throws:
IllegalArgumentException
- If the vectors do not have the same shape.
-
sub
Subtracts a real sparse vector from a complex dense vector.- Parameters:
src1
- First vector.src2
- Second vector.- Returns:
- The result of the vector subtraction.
- Throws:
IllegalArgumentException
- If the vectors do not have the same shape.
-
elemMult
Computes the element-wise multiplication of a complex dense vector with a real sparse vector.- Parameters:
src1
- Dense vector.src2
- Sparse vector.- Returns:
- The result of the element-wise multiplication.
- Throws:
IllegalArgumentException
- If the two vectors are not the same size.
-
elemDiv
Compute the element-wise division between a sparse vector and a dense vector.- Parameters:
src1
- First vector in the element-wise division.src2
- Second vector in the element-wise division.- Returns:
- The result of the element-wise vector division.
-