List of usage examples for org.apache.commons.math3.linear CholeskyDecomposition CholeskyDecomposition
public CholeskyDecomposition(final RealMatrix matrix, final double relativeSymmetryThreshold, final double absolutePositivityThreshold)
From source file:edu.oregonstate.eecs.mcplan.ml.MatrixAlgorithms.java
public static boolean isPositiveDefinite(final RealMatrix M, final double absolute_positivity_threshold) { try {/*from w ww . jav a 2 s . com*/ final CholeskyDecomposition chol = new CholeskyDecomposition(M, CholeskyDecomposition.DEFAULT_RELATIVE_SYMMETRY_THRESHOLD, absolute_positivity_threshold); return true; } catch (final NonPositiveDefiniteMatrixException ex) { return false; } }