private double getHalfLogDeterminant(CholeskyDecomposition chol) {
    double[][] l = chol.getL();
    double logdet = FastMath.log(l[0][0]);
    for(int i = 1; i < l.length; i++) {
      // We get half the log(det), because we did not square values here.
      logdet += FastMath.log(l[i][i]);
    }
    return logdet;
  }
private double getHalfLogDeterminant ( CholeskyDecomposition chol ) { double [ ] [ ] l = chol . getL ( ) ; double logdet = FastMath . log ( l [ 0 ] [ 0 ] ) ; for ( int i = 1 ; i < l . length ; i ++ ) { logdet += FastMath . log ( l [ i ] [ i ] ) ; } return logdet ; }
Get 0.5 * log(det) of a cholesky decomposition.

@param chol Cholesky Decomposition
@return log determinant.