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

Method mutableAdd

JSAT/src/jsat/linear/DenseMatrix.java:90–99  ·  view source on GitHub ↗
(double c, Matrix b)

Source from the content-addressed store, hash-verified

88 }
89
90 @Override
91 public void mutableAdd(double c, Matrix b)
92 {
93 if(!sameDimensions(this, b))
94 throw new ArithmeticException("Matrix dimensions do not agree");
95
96 for(int i = 0; i < rows(); i++)
97 for(int j = 0; j < cols(); j++)
98 this.matrix[i][j] += c*b.get(i, j);
99 }
100
101 @Override
102 public void multiply(Vec b, double z, Vec c)

Calls 4

rowsMethod · 0.95
colsMethod · 0.95
sameDimensionsMethod · 0.80
getMethod · 0.45