Class DenseFieldElemDiv

java.lang.Object
org.flag4j.linalg.ops.dense.field_ops.DenseFieldElemDiv

public final class DenseFieldElemDiv extends Object
This class contains low-level implementations of element-wise tensor division between two Field tensors.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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