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

Method mutablePairwiseMultiply

JSAT/src/jsat/linear/Vec.java:368–374  ·  view source on GitHub ↗

Mutates this by multiplying each value by the value in b that has the same index. This method should be overloaded for a serious implementation. @param b the vector to pairwise multiply by

(Vec b)

Source from the content-addressed store, hash-verified

366 * @param b the vector to pairwise multiply by
367 */
368 public void mutablePairwiseMultiply(Vec b)
369 {
370 if(length() != b.length())
371 throw new ArithmeticException("Vector lengths do not agree " + length() + " vs " + b.length());
372 for(int i = 0; i < length(); i++)
373 set(i, get(i)*b.get(i));
374 }
375
376 /**
377 * Mutates {@code this *= c}

Callers 7

solveMethod · 0.95
pairwiseMultiplyMethod · 0.95
trainNNMethod · 0.95
mutableTransformMethod · 0.95
trainCMethod · 0.45
trainMethod · 0.45

Calls 3

lengthMethod · 0.95
setMethod · 0.95
getMethod · 0.95

Tested by 1