public static void addDiag ( Matrix A , int start , int to , double c ) { for ( int i = start ; i < to ; i ++ ) A . increment ( i , i , ) ; }
Updates the values along the main diagonal of the matrix by adding a constant to them