public static void addColTimes(Matrix matrix,long diag,long fromRow,long col,double factor){
  long rows=matrix.getRowCount();
  for (long row=fromRow; row < rows; row++) {
    matrix.setAsDouble(matrix.getAsDouble(row,col) - factor * matrix.getAsDouble(row,diag),row,col);
  }
}

public static void addColTimes ( Matrix matrix , long diag , long fromRow , long col , double factor ) { long rows = matrix . getRowCount ( ) ; for ( long row = fromRow ; row < rows ; row ++ ) { matrix . setAsDouble ( matrix . getAsDouble ( row , col ) - factor * matrix . getAsDouble ( row , diag ) , row , col ) ; } }
add a factor times one column to another column
