jsat.linear
Class VecOps
- java.lang.Object
-
- jsat.linear.VecOps
-
public class VecOps extends java.lang.ObjectThis 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 doubleaccumulateSum(Vec w, Vec x, Vec y, Function1D f)Computes the result of ∑∀ i ∈ |w| wi f(xi-yi)static doubleweightedDot(Vec w, Vec x, Vec y)Computes the weighted dot product of ∑∀ i ∈ |w| w_i x_i y_i
-
-
-
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 resultsx- the first vector of values in the differencey- the second vector of values in the differencef- 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 accessx- the first vector of the dot producty- 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