code: public static DenseMatrix eye(int k)
      {
          DenseMatrix eye = new DenseMatrix(k, k);
          for(int i = 0; i < k; i++ )
              eye.set(i, i, 1);
          return eye;
      }
docs: Creates a new dense identity matrix with <i>k</i> rows and columns.
  @param k the number of rows / columns
  @return a new dense identity matrix <i>I<sub>k</sub></i>