Class DenseFieldElemDiv
java.lang.Object
org.flag4j.linalg.ops.dense.field_ops.DenseFieldElemDiv
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Field<T>>
voidDynamically chooses and applies element-wise division algorithm to use based on the number of data in the tensors.static <T extends Field<T>>
voidComputes the element-wise division of two tensors.static <T extends Field<T>>
voidelemDivConcurrent(T[] src1, Shape shape1, T[] 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, 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.- Throws:
TensorShapeException- If the tensors do not have the same shape.
-
elemDivConcurrent
public static <T extends Field<T>> void elemDivConcurrent(T[] 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.- Throws:
TensorShapeException- If the tensors do not have the same shape.
-
dispatch
public static <T extends Field<T>> void dispatch(T[] src1, Shape shape1, T[] src2, Shape shape2, T[] dest) Dynamically chooses and applies element-wise division algorithm to use based on the number of data in the tensors.- 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.- Throws:
TensorShapeException
-