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

Method multiply

JSAT/src/jsat/linear/SparseMatrix.java:148–161  ·  view source on GitHub ↗
(Vec b, double z, Vec c)

Source from the content-addressed store, hash-verified

146 }
147
148 @Override
149 public void multiply(Vec b, double z, Vec c)
150 {
151 if(this.cols() != b.length())
152 throw new ArithmeticException("Matrix dimensions do not agree, [" + rows() +"," + cols() + "] x [" + b.length() + ",1]" );
153 if(this.rows() != c.length())
154 throw new ArithmeticException("Target vector dimension does not agree with matrix dimensions. Matrix has " + rows() + " rows but tagert has " + c.length());
155
156 for(int i = 0; i < rows(); i++)
157 {
158 SparseVector row = rows[i];
159 c.increment(i, row.dot(b)*z);
160 }
161 }
162
163 @Override
164 public void multiply(Matrix B, Matrix C)

Callers

nothing calls this directly

Calls 14

colsMethod · 0.95
rowsMethod · 0.95
dotMethod · 0.95
mutableAddMethod · 0.95
canMultiplyMethod · 0.80
submitMethod · 0.80
logMethod · 0.80
getNameMethod · 0.65
lengthMethod · 0.45
incrementMethod · 0.45
getRowViewMethod · 0.45
getIndexMethod · 0.45

Tested by

no test coverage detected