(int r1, int r2)
| 604 | } |
| 605 | |
| 606 | @Override |
| 607 | public void swapRows(int r1, int r2) |
| 608 | { |
| 609 | if(r1 >= rows() || r2 >= rows()) |
| 610 | throw new ArithmeticException("Can not swap row, matrix is smaller then requested"); |
| 611 | else if(r1 < 0 || r2 < 0) |
| 612 | throw new ArithmeticException("Can not swap row, there are no negative row indices"); |
| 613 | double[] tmp = matrix[r1]; |
| 614 | matrix[r1] = matrix[r2]; |
| 615 | matrix[r2] = tmp; |
| 616 | } |
| 617 | |
| 618 | @Override |
| 619 | public void zeroOut() |