public Matrix removeRow ( int i ) { if ( i >= rows || i < 0 ) { throw new IndexOutOfBoundsException ( "Illegal row number, must be 0.." + ( rows - 1 ) ) ; } Matrix result = blankOfShape ( rows - 1 , columns ) ; for ( int ii = 0 ; ii < i ; ii ++ ) { result . setRow ( ii , getRow ( ii ) ) ; } for ( int ii = i + 1 ; ii < rows ; ii ++ ) { result . setRow ( ii - 1 , getRow ( ii ) ) ; } return result ; }
Removes one row from matrix .