public class VecOps extends Object
Constructor and Description |
---|
VecOps() |
Modifier and Type | Method and Description |
---|---|
static double |
accumulateSum(Vec w,
Vec x,
Vec y,
Function 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
|
public static double accumulateSum(Vec w, Vec x, Vec y, Function f)
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 computedpublic static double weightedDot(Vec w, Vec x, Vec y)
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 productCopyright © 2017. All rights reserved.