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

Method mutableTranspose

JSAT/src/jsat/linear/GenericMatrix.java:441–453  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

439 }
440
441 @Override
442 public void mutableTranspose()
443 {
444 if (!this.isSquare())
445 throw new ArithmeticException("Can only mutable transpose square matrices");
446 for (int i = 0; i < rows() - 1; i++)
447 for (int j = i + 1; j < cols(); j++)
448 {
449 double tmp = get(j, i);
450 set(j, i, get(i, j));
451 set(i, j, tmp);
452 }
453 }
454
455 @Override
456 public void transpose(Matrix C)

Callers 1

qrMethod · 0.95

Calls 5

isSquareMethod · 0.45
rowsMethod · 0.45
colsMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected