Alters the matrix A so that it contains the result of A times a sparse matrix represented by only its diagonal values or A = A diag( b ) . This is equivalent to the code A = A#multiply(jsat.linear.Matrix) .multiply (#diag(jsat.linear.Vec) diag(b)) </co
(Matrix A, Vec b)
| 1030 | * @param b the diagonal value vector |
| 1031 | */ |
| 1032 | public static void diagMult(Matrix A, Vec b) |
| 1033 | { |
| 1034 | if(A.cols() != b.length()) |
| 1035 | throw new ArithmeticException("Could not multiply, matrix dimensions must agree"); |
| 1036 | for(int i = 0; i < A.rows(); i++) |
| 1037 | RowColumnOps.multRow(A, i, b); |
| 1038 | } |
| 1039 | |
| 1040 | /** |
| 1041 | * Alters the matrix <i>A</i> so that it contains the result of |