Class RealComplexDenseOperations
java.lang.Object
org.flag4j.operations.dense.real_complex.RealComplexDenseOperations
This class provides low level methods for computing operations with at least one real tensor
and at least one complex tensor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CNumber[]
Adds a scalar value to all entries of a tensor.static CNumber[]
Computes the element-wise addition of two tensors.static void
Adds a scalar from each entry of this tensor and stores the result in the tensor.static void
Computes element-wise addition between tensors and stores the result in the first tensor.static CNumber[]
Computes the scalar multiplication of a tensor.static CNumber[]
Computes the scalar division of a tensor.static CNumber[]
Subtracts a scalar value from all entries of a tensor.static CNumber[]
Computes the element-wise subtraction of two tensors.static CNumber[]
Subtracts a scalar value from all entries of a tensor.static CNumber[]
Computes the element-wise subtraction of two tensors.static void
Subtracts a scalar from each entry of this tensor and stores the result in the tensor.static void
Computes element-wise subtraction between tensors and stores the result in the first tensor.
-
Constructor Details
-
RealComplexDenseOperations
private RealComplexDenseOperations()
-
-
Method Details
-
add
Computes the element-wise addition of two tensors.- Parameters:
src1
- Entries of first tensor.shape1
- Shape of first tensor.src2
- Entries of second tensor.shape2
- Shape of second tensor.- Returns:
- The element wise addition of two tensors.
- Throws:
IllegalArgumentException
- If entry arrays are not the same size.
-
sub
Computes the element-wise subtraction of two tensors.- Parameters:
src1
- Entries of first tensor.shape1
- Shape of first tensor.src2
- Entries of second tensor.shape2
- Shape of second tensor.- Returns:
- The element wise subtraction of two tensors.
- Throws:
IllegalArgumentException
- If entry arrays are not the same size.
-
sub
Computes the element-wise subtraction of two tensors.- Parameters:
src1
- Entries of first tensor.shape1
- Shape of first tensor.src2
- Entries of second tensor.shape2
- Shape of second tensor.- Returns:
- The element wise subtraction of two tensors.
- Throws:
IllegalArgumentException
- If entry arrays are not the same size.
-
sub
-
subEq
Computes element-wise subtraction between tensors and stores the result in the first tensor.- Parameters:
src1
- First tensor in subtraction. Also, where the result will be stored.shape1
- Shape of the first tensor.src2
- Second tensor in the subtraction.shape2
- Shape of the second tensor.- Throws:
IllegalArgumentException
- If tensors are not the same shape.
-
subEq
Subtracts a scalar from each entry of this tensor and stores the result in the tensor.- Parameters:
src
- Tensor in subtraction. Also, where the result will be stored.b
- Scalar to subtract.
-
addEq
Computes element-wise addition between tensors and stores the result in the first tensor.- Parameters:
src1
- First tensor in addition. Also, where the result will be stored.shape1
- Shape of the first tensor.src2
- Second tensor in the addition.shape2
- Shape of the second tensor.- Throws:
IllegalArgumentException
- If tensors are not the same shape.
-
addEq
Adds a scalar from each entry of this tensor and stores the result in the tensor.- Parameters:
src
- Tensor in addition. Also, where the result will be stored.b
- Scalar to add.
-
scalDiv
-
add
-
sub
-
scalDiv
-