Class RingOps

java.lang.Object
org.flag4j.linalg.ops.common.ring_ops.RingOps

public final class RingOps extends Object
Utility class useful for computing ops on Ring tensors.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends Ring<T>>
    void
    abs(T[] src, double[] dest)
    Computes the element-wise absolute value of an array.
    static <T extends Ring<T>>
    void
    conj(T[] src, T[] dest)
    Computes the element-wise conjugation of an array.
    static <T extends Ring<T>>
    void
    sub(T[] src, T scalar, T[] dest)
    Subtracts a scalar value from each entry of an array.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • sub

      public static <T extends Ring<T>> void sub(T[] src, T scalar, T[] dest)
      Subtracts a scalar value from each entry of an array.
      Parameters:
      src - Array to subtract scalar from.
      scalar - Scalar value to subtract from src.
      dest - Array to store the result in. May be the same array as src.
      Throws:
      ArrayIndexOutOfBoundsException - If dest.length < src.length.
    • abs

      public static <T extends Ring<T>> void abs(T[] src, double[] dest)
      Computes the element-wise absolute value of an array.
      Parameters:
      src - Array to compute element-wise absolute value of.
      dest - Array to store the result in. May be the same array as src.
      Throws:
      ArrayIndexOutOfBoundsException - If dest.length < src.length.
    • conj

      public static <T extends Ring<T>> void conj(T[] src, T[] dest)
      Computes the element-wise conjugation of an array.
      Parameters:
      src - Array to compute element-wise conjugation of.
      dest - Array to store the result in. May be the same array as src.
      Throws:
      ArrayIndexOutOfBoundsException - If dest.length < src.length.