MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / addDiag

Method addDiag

JSAT/src/jsat/linear/RowColumnOps.java:17–21  ·  view source on GitHub ↗

Updates the values along the main diagonal of the matrix by adding a constant to them @param A the matrix to perform the update on @param start the first index of the diagonals to update (inclusive) @param to the last index of the diagonals to update (exclusive) @param c the constant to add to the d

(Matrix A, int start, int to, double c)

Source from the content-addressed store, hash-verified

15 * @param c the constant to add to the diagonal
16 */
17 public static void addDiag(Matrix A, int start, int to, double c)
18 {
19 for(int i = start; i < to; i++)
20 A.increment(i, i, c);
21 }
22
23 /**
24 * Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:]+ c

Callers 2

hqr2Method · 0.95
classifyMethod · 0.95

Calls 1

incrementMethod · 0.45

Tested by

no test coverage detected