Class RealFieldDenseElemDiv
java.lang.Object
org.flag4j.linalg.ops.dense.real_field_ops.RealFieldDenseElemDiv
This class contains low-level implementations of element-wise tensor division for a dense real and dense
field tensor.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Field<T>>
voidDynamically chooses and applies the appropriate algorithm for element-wise tensor multiplication.static <T extends Field<T>>
voidDynamically chooses and applies the appropriate algorithm for element-wise tensor multiplication.static <T extends Field<T>>
voidComputes the element-wise division of two tensors.static <T extends Field<T>>
voidComputes the element-wise division of two tensors.static <T extends Field<T>>
voidelemDivConcurrent
(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Computes the element-wise division of two tensors using a concurrent algorithm.static <T extends Field<T>>
voidelemDivConcurrent
(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest) Computes the element-wise division of two tensors using a concurrent algorithm.
-
Method Details
-
elemDiv
public static <T extends Field<T>> void elemDiv(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest) 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.dest
- Array to store the result of the element-wise division in (modified). May be the same array assrc1
.- Throws:
IllegalArgumentException
- If the tensors do not have the same shape.
-
elemDivConcurrent
public static <T extends Field<T>> void elemDivConcurrent(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest) 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.dest
- Array to store the result of the element-wise division in (modified). May be the same array assrc1
.- Throws:
IllegalArgumentException
- If the tensors do not have the same shape.
-
elemDiv
public static <T extends Field<T>> void elemDiv(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) 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.dest
- Array to store the result of the element-wise division in (modified). May be the same array assrc2
.- Throws:
IllegalArgumentException
- If the tensors do not have the same shape.
-
elemDivConcurrent
public static <T extends Field<T>> void elemDivConcurrent(double[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) 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.dest
- Array to store the result of the element-wise division in (modified). May be the same array assrc2
.- Throws:
IllegalArgumentException
- If the tensors do not have the same shape.
-
dispatch
public static <T extends Field<T>> void dispatch(Shape shape1, double[] src1, Shape shape2, T[] src2, T[] dest) Dynamically chooses and applies the appropriate algorithm for element-wise tensor multiplication.- Parameters:
shape1
- Shape of first tensor.src1
- Entries of first tensor.shape2
- Shape of second tensor.src2
- Entries of second tensor.dest
- Array to store the result of the element-wise division in (modified). May be the same array assrc2
.
-
dispatch
public static <T extends Field<T>> void dispatch(T[] src1, Shape shape1, double[] src2, Shape shape2, T[] dest) Dynamically chooses and applies the appropriate algorithm for element-wise tensor multiplication.- Parameters:
src1
- Entries of first tensor.shape1
- Shape of first tensor.src2
- Entries of second tensor.shape2
- Shape of second tensor.dest
- Array to store the result of the element-wise division in (modified). May be the same array assrc1
.
-