Module ojalgo

Class RawCholesky

    • Field Detail

      • myMaxDiag

        private double myMaxDiag
      • myMinDiag

        private double myMinDiag
      • mySPD

        private boolean mySPD
    • Constructor Detail

      • RawCholesky

        RawCholesky()
        Not recommended to use this constructor directly. Consider using the static factory method org.ojalgo.matrix.decomposition.Cholesky#make(Access2D) instead.
    • Method Detail

      • btran

        public void btran​(PhysicalStore<java.lang.Double> arg)
        Description copied from interface: InvertibleFactor
        Backwards-transformation

        Solve [x]T[A] = [b]T (equivalent to [A]T[x] = [b]) by transforming [b] into [x] in-place.

        Specified by:
        btran in interface InvertibleFactor<java.lang.Double>
        Parameters:
        arg - [b] transformed into [x]
      • checkAndDecompose

        public boolean checkAndDecompose​(MatrixStore<java.lang.Double> matrix)
        Description copied from interface: MatrixDecomposition.Hermitian
        Absolutely must check if the matrix is hermitian or not. Then, depending on the result different paths can be chosen - compute or not / choose different algorithms...
        Specified by:
        checkAndDecompose in interface MatrixDecomposition.Hermitian<java.lang.Double>
        Parameters:
        matrix - A matrix to check and then (maybe) decompose
        Returns:
        true if the hermitian check passed and decomposition succeeded; false if not
      • countSignificant

        public int countSignificant​(double threshold)
        Specified by:
        countSignificant in interface MatrixDecomposition.RankRevealing<java.lang.Double>
        Parameters:
        threshold - Significance limit
        Returns:
        The number of elements in the diagonal matrix that are greater than the threshold
      • ftran

        public void ftran​(PhysicalStore<java.lang.Double> arg)
        Description copied from interface: InvertibleFactor
        Forward-transformation

        Solve [A][x] = [b] by transforming [b] into [x] in-place.

        Specified by:
        ftran in interface InvertibleFactor<java.lang.Double>
        Parameters:
        arg - [b] transformed into [x]
      • isSolvable

        public boolean isSolvable()
        Description copied from interface: MatrixDecomposition.Solver
        Please note that producing a pseudoinverse and/or a least squares solution is ok! The return value, of this method, is not an indication of if the decomposed matrix is square, has full rank, is postive definite or whatever. It's that in combination with the specific decomposition algorithm's capabilities.
        Specified by:
        isSolvable in interface MatrixDecomposition.Solver<java.lang.Double>
        Overrides:
        isSolvable in class AbstractDecomposition<java.lang.Double,​R064Store>
        Returns:
        true if this matrix decomposition is in a state to be able to deliver an inverse or an equation system solution (with some degree of numerical stability).
      • isSPD

        public boolean isSPD()
        Description copied from interface: Cholesky
        To use the Cholesky decomposition rather than the LU decomposition the matrix must be symmetric and positive definite. It is recommended that the decomposition algorithm checks for this during calculation. Possibly the matrix could be assumed to be symmetric (to improve performance) but tests should be made to assure the matrix is positive definite.
        Specified by:
        isSPD in interface Cholesky<java.lang.Double>
        Returns:
        true if the tests did not fail.
      • preallocate

        public PhysicalStore<java.lang.Double> preallocate​(int nbEquations,
                                                           int nbVariables,
                                                           int nbSolutions)
        Specified by:
        preallocate in interface SolverTask<java.lang.Double>
      • doDecompose

        private boolean doDecompose​(double[][] data,
                                    Access2D<?> input)