Documentation of 'jsat.linear.VecOps' Java class
VecOps
jsat.linear

Class VecOps



  • public class VecOps
    extends java.lang.Object
    This class provides efficient implementations of use full vector operations and updates. The implementations are efficient for both dense and sparse vectors.
    • Constructor Summary

      Constructors 
      Constructor and Description
      VecOps() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double accumulateSum(Vec w, Vec x, Vec y, Function1D f)
      Computes the result of ∀ i ∈ |w| wi f(xi-yi)
      static double weightedDot(Vec w, Vec x, Vec y)
      Computes the weighted dot product of ∀ i ∈ |w| w_i x_i y_i
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VecOps

        public VecOps()
    • Method Detail

      • accumulateSum

        public static double accumulateSum(Vec w,
                                           Vec x,
                                           Vec y,
                                           Function1D f)
        Computes the result of ∀ i ∈ |w| wi f(xi-yi)
        Parameters:
        w - the vector of weight values to multiply on the results
        x - the first vector of values in the difference
        y - the second vector of values in the difference
        f - the single variate function to apply to the difference computed
        Returns:
        the accumulated sum of the evaluations
      • weightedDot

        public static double weightedDot(Vec w,
                                         Vec x,
                                         Vec y)
        Computes the weighted dot product of ∀ i ∈ |w| w_i x_i y_i
        Parameters:
        w - the vector containing the weights, it is assumed to be random access
        x - the first vector of the dot product
        y - the second vector of the dot product
        Returns:
        the weighted dot product, which is equivalent to the sum of the products of each index for each vector

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.