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

Method multiply

JSAT/src/jsat/linear/DenseVector.java:271–285  ·  view source on GitHub ↗
(double c, Matrix A, Vec b)

Source from the content-addressed store, hash-verified

269 }
270
271 @Override
272 public void multiply(double c, Matrix A, Vec b)
273 {
274 if(this.length() != A.rows())
275 throw new ArithmeticException("Vector x Matrix dimensions do not agree [1," + this.length() + "] x [" + A.rows() + ", " + A.cols() + "]");
276 if(b.length() != A.cols())
277 throw new ArithmeticException("Destination vector is not the right size");
278
279 for(int i = 0; i < this.length(); i++)
280 {
281 double this_i = c*this.array[i+this.startIndex];
282 for(int j = 0; j < A.cols(); j++)
283 b.increment(j, this_i*A.get(i, j));
284 }
285 }
286
287 @Override
288 public void mutableAdd(double c)

Callers 5

hessMethod · 0.95
transformMethod · 0.95

Calls 5

lengthMethod · 0.95
rowsMethod · 0.45
colsMethod · 0.45
incrementMethod · 0.45
getMethod · 0.45