Class ComplexDenseElemDiv
java.lang.Object
org.flag4j.operations.dense.complex.ComplexDenseElemDiv
This class contains low-level implementations of complex element-wise tensor multiplication.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
Minimum number of entries in each tensor to apply concurrent algorithm. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CNumber[]
Dynamically chooses and applies element-wise division algorithm to use based on the number of entries in the tensors.static CNumber[]
Computes the element-wise division of two tensors.static CNumber[]
elemDivConcurrent
(CNumber[] src1, Shape shape1, CNumber[] src2, Shape shape2) Computes the element-wise division of two tensors using a concurrent algorithm.
-
Field Details
-
CONCURRENT_THRESHOLD
private static final int CONCURRENT_THRESHOLDMinimum number of entries in each tensor to apply concurrent algorithm.- See Also:
-
-
Constructor Details
-
ComplexDenseElemDiv
private ComplexDenseElemDiv()
-
-
Method Details
-
elemDiv
Computes the element-wise division of two tensors.- Parameters:
src1
- First tensor in element-wise division.shape1
- Shape of the first tensor.src2
- Second tensor in element-wise division.shape2
- Shape of the second tensor.- Returns:
- The element-wise division of the two tensors.
- Throws:
IllegalArgumentException
- If the tensors do not have the same shape.
-
elemDivConcurrent
public static CNumber[] elemDivConcurrent(CNumber[] src1, Shape shape1, CNumber[] src2, Shape shape2) Computes the element-wise division of two tensors using a concurrent algorithm.- Parameters:
src1
- First tensor in element-wise division.shape1
- Shape of the first tensor.src2
- Second tensor in element-wise division.shape2
- Shape of the second tensor.- Returns:
- The element-wise division of the two tensors.
- Throws:
IllegalArgumentException
- If the tensors do not have the same shape.
-
dispatch
Dynamically chooses and applies element-wise division algorithm to use based on the number of entries in the 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 division of the two tensors.
-