Example usage for org.apache.commons.math3.linear CholeskyDecomposition CholeskyDecomposition

List of usage examples for org.apache.commons.math3.linear CholeskyDecomposition CholeskyDecomposition

Introduction

In this page you can find the example usage for org.apache.commons.math3.linear CholeskyDecomposition CholeskyDecomposition.

Prototype

public CholeskyDecomposition(final RealMatrix matrix, final double relativeSymmetryThreshold,
        final double absolutePositivityThreshold) 

Source Link

Document

Calculates the Cholesky decomposition of the given matrix.

Usage

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;
    }
}