MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / dot

Method dot

JSAT/src/jsat/linear/DenseVector.java:250–264  ·  view source on GitHub ↗
(Vec v)

Source from the content-addressed store, hash-verified

248 }
249
250 @Override
251 public double dot(Vec v)
252 {
253 if(this.length() != v.length())
254 throw new ArithmeticException("Vectors must have the same length");
255
256 if(v.isSparse())
257 return v.dot(this);
258
259 double dot = 0;
260 for(int i = startIndex; i < endIndex; i++)
261 dot += array[i] * v.get(i-startIndex);
262
263 return dot;
264 }
265
266 public DenseVector deepCopy()
267 {

Callers 6

getLinearRegressionMethod · 0.95
multiplyMethod · 0.95
trainProxSDCAMethod · 0.95
updateMethod · 0.95
updateMethod · 0.95
fitMethod · 0.95

Calls 3

lengthMethod · 0.95
isSparseMethod · 0.45
getMethod · 0.45

Tested by 1

getLinearRegressionMethod · 0.76