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)
| 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 |