Class DenseSemiringVectorOps

java.lang.Object
org.flag4j.linalg.ops.dense.semiring_ops.DenseSemiringVectorOps

public final class DenseSemiringVectorOps extends Object
This utility class contains methods for computing ops on dense Semiring Vectors.
  • Method Details

    • dotProduct

      public static <T extends Semiring<T>> T dotProduct(T[] src1, T[] src2)
      Computes the vector dot product for two vectors.
      Parameters:
      src1 - Entries of the first vector.
      src2 - Entries of the second vector.
      Returns:
      The dot product of the two vectors.
    • outerProduct

      public static <T extends Semiring<T>> void outerProduct(T[] 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 (modified).
    • outerProductConcurrent

      public static <T extends Semiring<T>> void outerProductConcurrent(T[] src1, T[] src2, T[] dest)
      Computes the vector outer product between two real dense vectors using a concurrent implementation.
      Parameters:
      src1 - Entries of first vector.
      src2 - Entries of second vector.
      dest - Array to store the result of the vector outer product in (modified). Must have length src1.length*src2.length.