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

Method diagMult

JSAT/src/jsat/linear/Matrix.java:1032–1038  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 8

getPseudoInverseMethod · 0.95
solveMethod · 0.95
trainMethod · 0.95
trainMethod · 0.95
setUpTransformMethod · 0.95
fitMethod · 0.95

Calls 5

multRowMethod · 0.95
colsMethod · 0.45
lengthMethod · 0.45
rowsMethod · 0.45
getMethod · 0.45

Tested by 2