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

Method eye

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

Creates a new dense identity matrix with k rows and columns. @param k the number of rows / columns @return a new dense identity matrix I k

(int k)

Source from the content-addressed store, hash-verified

974 * @return a new dense identity matrix <i>I<sub>k</sub></i>
975 */
976 public static DenseMatrix eye(int k)
977 {
978 DenseMatrix eye = new DenseMatrix(k, k);
979 for(int i = 0; i < k; i++ )
980 eye.set(i, i, 1);
981 return eye;
982 }
983
984 /**
985 * Creates a new dense matrix filled with random values from

Callers 15

FixedProblemsClass · 0.95
get2ClassLinear2DMethod · 0.95
testEyeMethod · 0.95
testDiagMethod · 0.95
testQr_0argsMethod · 0.95
testSolve_5argsMethod · 0.95
testSetCovarianceMethod · 0.95

Calls 1

setMethod · 0.95

Tested by 15

get2ClassLinear2DMethod · 0.76
testEyeMethod · 0.76
testDiagMethod · 0.76
testQr_0argsMethod · 0.76
testSolve_5argsMethod · 0.76
testSetCovarianceMethod · 0.76
testTransformMethod · 0.76