public void swapRows ( int r1 , int r2 ) { int n = columns ( ) ; ItemSupplier s = supplier ; ItemConsumer c = consumer ; for ( int j = 0 ; j < n ; j ++ ) { double v = s . get ( r1 , j ) ; c . set ( r1 , j , s . get ( r2 , j ) ) ; c . set ( r2 , j , v ) ; } }
Swaps row r1 and r2