Module ojalgo

Class RawEigenvalue.Symmetric

    • Field Detail

      • myInverse

        private transient MatrixStore<java.lang.Double> myInverse
      • myS

        private transient MatrixStore<java.lang.Double> myS
      • myU

        private transient MatrixStore<java.lang.Double> myU
    • Constructor Detail

      • Symmetric

        Symmetric()
    • 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]
      • 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>
        Specified by:
        ftran in interface SingularValue<java.lang.Double>
        Parameters:
        arg - [b] transformed into [x]
      • getCovariance

        public MatrixStore<java.lang.Double> getCovariance()
        Specified by:
        getCovariance in interface SingularValue<java.lang.Double>
        Returns:
        [[A]T[A]]-1 Where [A] is the original matrix.
      • getFrobeniusNorm

        public double getFrobeniusNorm()
        Description copied from interface: SingularValue
        Sometimes also called the Schatten 2-norm or Hilbert-Schmidt norm.
        Specified by:
        getFrobeniusNorm in interface SingularValue<java.lang.Double>
        Returns:
        The square root of the sum of squares of the singular values.
      • getKyFanNorm

        public double getKyFanNorm​(int k)
        Description copied from interface: SingularValue

        Ky Fan k-norm.

        The first Ky Fan k-norm is the operator norm (the largest singular value), and the last is called the trace norm (the sum of all singular values).

        Specified by:
        getKyFanNorm in interface SingularValue<java.lang.Double>
        Parameters:
        k - The number of singular values to add up.
        Returns:
        The sum of the k largest singular values.
      • getOperatorNorm

        public double getOperatorNorm()
        Specified by:
        getOperatorNorm in interface SingularValue<java.lang.Double>
        Returns:
        2-norm
      • getS

        public MatrixStore<java.lang.Double> getS()
        Specified by:
        getS in interface SingularValue<java.lang.Double>
        Returns:
        The diagonal matrix of singular values.
      • getSingularValues

        public Array1D<java.lang.Double> getSingularValues()
        Specified by:
        getSingularValues in interface SingularValue<java.lang.Double>
        Returns:
        The singular values ordered in descending order.
      • getU

        public MatrixStore<java.lang.Double> getU()
        Description copied from interface: SingularValue
        If [A] is m-by-n and its rank is r, then:
        • The first r columns of [U] span the column space, range or image of [A].
        • The last m-r columns of [U] span the left nullspace or cokernel of [A].
        Calculating the QR decomposition of [A] is a faster alternative.
        Specified by:
        getU in interface SingularValue<java.lang.Double>
      • isHermitian

        public boolean isHermitian()
        Description copied from interface: Eigenvalue
        If [A] is hermitian then [V][D][V]-1 becomes [Q][D][Q]H...
        Specified by:
        isHermitian in interface Eigenvalue<java.lang.Double>
      • isOrdered

        public boolean isOrdered()
        Description copied from interface: Eigenvalue
        The eigenvalues in D (and the eigenvectors in V) are not necessarily ordered. This is a property of the algorithm/implementation, not the data.
        Specified by:
        isOrdered in interface Eigenvalue<java.lang.Double>
        Specified by:
        isOrdered in interface MatrixDecomposition.Ordered<java.lang.Double>
        Returns:
        true if they are ordered
      • 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: Eigenvalue.Spectral
        A symmetric (Hermitian) matrix is positive definite if all its eigenvalues are positive.
        Specified by:
        isSPD in interface Eigenvalue.Spectral<java.lang.Double>
      • preallocate

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

        protected boolean doDecompose​(double[][] data,
                                      boolean valuesOnly)
        Specified by:
        doDecompose in class RawEigenvalue