Class RealFieldDenseVectorOps

java.lang.Object
org.flag4j.linalg.ops.dense.real_field_ops.RealFieldDenseVectorOps

public final class RealFieldDenseVectorOps extends Object
This class provides low level implementations for vector ops with one dense real vector and one dense field vector.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends Field<T>>
    void
    add(double[] src, T a, T[] dest)
    Adds a scalar value to all data of a tensor.
    static <T extends Field<T>>
    T
    inner(double[] src1, T[] src2)
    Computes the vector inner product for a real dense vector and a complex dense vector.
    static <T extends Field<T>>
    T
    inner(T[] src1, double[] src2)
    Computes the vector inner product for a complex dense vector and a real dense vector.
    static <T extends Field<T>>
    void
    outerProduct(double[] src1, T[] src2, T[] dest)
    Computes the vector outer product between two real dense vectors.
    static <T extends Field<T>>
    void
    outerProduct(T[] src1, double[] src2, T[] dest)
    Computes the vector outer product between two real dense vectors.

    Methods inherited from class java.lang.Object

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

    • inner

      public static <T extends Field<T>> T inner(double[] src1, T[] src2)
      Computes the vector inner product for a real dense vector and a complex dense vector.
      Parameters:
      src1 - Entries of the first vector.
      src2 - Entries of the second vector.
      Returns:
      The inner product of the two vectors.
    • inner

      public static <T extends Field<T>> T inner(T[] src1, double[] src2)
      Computes the vector inner product for a complex dense vector and a real dense vector.
      Parameters:
      src1 - Entries of the first vector.
      src2 - Entries of the second vector.
      Returns:
      The inner product of the two vectors.
    • outerProduct

      public static <T extends Field<T>> void outerProduct(double[] src1, T[] src2, T[] dest)
      Computes the vector outer product between two real dense vectors.
      Parameters:
      src1 - Entries of first vector.
      src2 - Entries of second vector.
      dest - Array to store the result of the vector outer product in. Must have length src1.length*src2.length.
    • outerProduct

      public static <T extends Field<T>> void outerProduct(T[] src1, double[] src2, T[] dest)
      Computes the vector outer product between two real dense vectors.
      Parameters:
      src1 - Entries of first vector.
      src2 - Entries of second vector.
      dest - Array to store the result of the vector outer product in. Must have length src1.length*src2.length.
    • add

      public static <T extends Field<T>> void add(double[] src, T a, T[] dest)
      Adds a scalar value to all data of a tensor.
      Parameters:
      src - Entries of first tensor.
      a - Scalar to add to all data of this tensor.
      dest - Array to store the result of the vector-scalar addition. Must have length equal to src.length.