(Matrix C)
| 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) |