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