Updates the values of row i in the given matrix to be A[i,:] = A[i,:] c @param A the matrix to perform he update on @param i the row to update @param start the first index of the row to update from (inclusive) @param to the last index of the row to update (exclusive) @param c the constant
(Matrix A, int i, int start, int to, double c)
| 57 | * @param c the constant to multiply each element by |
| 58 | */ |
| 59 | public static void multRow(Matrix A, int i, int start, int to, double c) |
| 60 | { |
| 61 | for(int j = start; j < to; j++) |
| 62 | A.set(i, j, A.get(i, j)*c); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:] * c |