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

Method getThisSideMatrix

JSAT/src/jsat/linear/Matrix.java:150–160  ·  view source on GitHub ↗

Returns an appropriate matrix to use for some operation A op B, where A = this @param B the other matrix, may be null @return a matrix that can be mutated to take the place of A

(Matrix B)

Source from the content-addressed store, hash-verified

148 * @return a matrix that can be mutated to take the place of A
149 */
150 private Matrix getThisSideMatrix(Matrix B)
151 {
152 if(this.canBeMutated())
153 return this.clone();
154 else//so far, only other option in JSAT is a dense matrix
155 {
156 DenseMatrix dm = new DenseMatrix(rows(), cols());
157 dm.mutableAdd(this);
158 return dm;
159 }
160 }
161
162 /**
163 * Creates a new Matrix that stores the result of <i>A-B</i>

Callers 3

addMethod · 0.95
subtractMethod · 0.95
multiplyMethod · 0.95

Calls 5

canBeMutatedMethod · 0.95
cloneMethod · 0.95
rowsMethod · 0.95
colsMethod · 0.95
mutableAddMethod · 0.95

Tested by

no test coverage detected