public double[][] toDenseArray() {
        double[][] m = new double[values.length][values.length];
        for (int r = 0; r < values.length; ++r) {
            m[r][r] = values[r];
        }
        return m;
    }
public double [ ] [ ] toDenseArray ( ) { double [ ] [ ] m = new double [ values . length ] [ values . length ] ; for ( int r = 0 ; r < values . length ; ++ r ) { m [ r ] [ r ] = values [ r ] ; } return m ; }
{@inheritDoc}