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

Method transpose

JSAT/src/jsat/linear/GenericMatrix.java:455–466  ·  view source on GitHub ↗
(Matrix C)

Source from the content-addressed store, hash-verified

453 }
454
455 @Override
456 public void transpose(Matrix C)
457 {
458 if(this.rows() != C.cols() || this.cols() != C.rows())
459 throw new ArithmeticException("Target matrix does not have the correct dimensions");
460
461 for (int i0 = 0; i0 < rows(); i0 += NB2)
462 for (int j0 = 0; j0 < cols(); j0 += NB2)
463 for (int i = i0; i < min(i0+NB2, rows()); i++)
464 for (int j = j0; j < min(j0+NB2, cols()); j++)
465 C.set(j, i, this.get(i, j));
466 }
467
468 @Override
469 public void swapRows(int r1, int r2)

Callers 1

qrMethod · 0.95

Calls 5

rowsMethod · 0.45
colsMethod · 0.45
minMethod · 0.45
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected