@Override
    public Matrix[] decompose() {

        Matrix l = matrix.blankOfShape(matrix.rows(), matrix.rows());

        for (int j = 0; j < l.rows(); j++) {

            double d = 0.0;

            for (int k = 0; k < j; k++) {

                double s = 0.0;

                for (int i = 0; i < k; i++) {
                    s += l.get(k, i) * l.get(j, i);
                }

                s = (matrix.get(j, k) - s) / l.get(k, k);

                l.set(j, k, s);

                d = d + s * s;
            }

            d = matrix.get(j, j) - d;

            l.set(j, j, Math.sqrt(Math.max(d, 0.0)));

            for (int k = j + 1; k < l.rows(); k++) {
                l.set(j, k, 0.0);
            }
        }

        return new Matrix[] { l };
    }
@ Override public Matrix [ ] decompose ( ) { Matrix l = matrix . blankOfShape ( matrix . rows ( ) , matrix . rows ( ) ) ; for ( int j = 0 ; j < l . rows ( ) ; j ++ ) { double d = 0.0 ; for ( int k = 0 ; k < j ; k ++ ) { double s = 0.0 ; for ( int i = 0 ; i < k ; i ++ ) { s += l . get ( k , i ) * l . get ( j , i ) ; } s = ( matrix . get ( j , k ) - s ) / l . get ( k , k ) ; l . set ( j , k , s ) ; d = d + s * s ; } d = matrix . get ( j , j ) - d ; l . set ( j , j , Math . sqrt ( Math . max ( d , 0.0 ) ) ) ; for ( int k = j + 1 ; k < l . rows ( ) ; k ++ ) { l . set ( j , k , 0.0 ) ; } } return new Matrix [ ] { l } ; }
Returns the result of Cholesky decomposition of given matrix
<p>
See <a href="http://mathworld.wolfram.com/CholeskyDecomposition.html">
http://mathworld.wolfram.com/CholeskyDecomposition.html</a> for more
details.
</p>

@return { L }