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

Method swapRows

JSAT/src/jsat/linear/DenseMatrix.java:606–616  ·  view source on GitHub ↗
(int r1, int r2)

Source from the content-addressed store, hash-verified

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

Callers 1

lupMethod · 0.95

Calls 1

rowsMethod · 0.95

Tested by

no test coverage detected