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

Method transpose

JSAT/src/jsat/linear/SparseMatrix.java:296–306  ·  view source on GitHub ↗
(Matrix C)

Source from the content-addressed store, hash-verified

294 }
295
296 @Override
297 public void transpose(Matrix C)
298 {
299 if(this.rows() != C.cols() || this.cols() != C.rows())
300 throw new ArithmeticException("Target matrix does not have the correct dimensions");
301
302 C.zeroOut();
303 for(int row = 0; row < rows.length; row++)
304 for(IndexValue iv : rows[row])
305 C.set(iv.getIndex(), row, iv.getValue());
306 }
307
308 @Override
309 public void transposeMultiply(Matrix B, Matrix C)

Callers

nothing calls this directly

Calls 6

rowsMethod · 0.95
colsMethod · 0.95
zeroOutMethod · 0.45
setMethod · 0.45
getIndexMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected