lib/ops.js
function cholesky(A) {
    if (A.shape.length !== 2) {
        throw new Error('A is not a matrix');
    }
    if (A.shape[0] !== A.shape[1]) {
        throw new Error('Input is not square matrix');
    }
    var copyA = A.clone();
    copyA.swapOrder();
    lapack.potrf(copyA.data, copyA.shape[0]);
    copyA.swapOrder();
    return tril(copyA);
}
function cholesky(A) {
    if (A.shape.length !== 2) {
        throw new Error('A is not a matrix');
    }
    if (A.shape[0] !== A.shape[1]) {
        throw new Error('Input is not square matrix');
    }
    var copyA = A.clone();
    copyA.swapOrder();
    lapack.potrf(copyA.data, copyA.shape[0]);
    copyA.swapOrder();
    return tril(copyA);
}
function cholesky ( A ) { if ( A . shape . length !== 2 ) { throw new Error ( 'A is not a matrix' ) ; } if ( A . shape [ 0 ] !== A . shape [ 1 ] ) { throw new Error ( 'Input is not square matrix' ) ; } var copyA = A . clone ( ) ; copyA . swapOrder ( ) ; lapack . potrf ( copyA . data , copyA . shape [ 0 ] ) ; copyA . swapOrder ( ) ; return tril ( copyA ) ; }
Perform Cholesky decomposition on given Matrix
Perform Cholesky decomposition on given Matrix