Class MR3

  • All Implemented Interfaces:
    Spectrum

    public class MR3
    extends Object
    implements Spectrum
    Computes eigenvalues and eigenvectors of a given symmetric tridiagonal matrix T using "Algorithm of Multiple Relatively Robust Representations" (MRRR).
    See Also:
    • "Dhillon, Inderjit S. and Parlett, Beresford N., "Multiple representations to compute orthogonal eigenvectors of symmetric tridiagonal matrices", Linear Algebra and its Applications, 2004, 387, pp. 1-28."
    • "Marques, Osni A., Riedy E. Jason, and Vomel Christof, "LAPACK working note 172: Benefits of IEEE-754 features in modern symmetric tridiagonal eigensolvers", Technical Report UCB// CSD-05-1414, 2005."
    • "Dhillon, Inderjit S., Parlett, Beresford N. and Vomel, Christof, "The design and implementation of the MRRR algorithm", ACM Transactions on mathematical Software, December 2006, Vol. 32 No.4, pp.533-560."
    • Field Detail

      • DEFAULT_MIN_RELATIVE_GAP

        public static final double DEFAULT_MIN_RELATIVE_GAP
        Default value for the minimum relative gap threshold. This threshold is used to determine if two eigenvalues are too close.

        When a child is inside a tight cluster, it can be difficult to find an RRR. A partial remedy from the user's point of view is to make this threshold smaller and recompute. However, as the orthogonality of the computed vectors is proportional to the reciprocal of this threshold, decreasing the value of this threshold will also decreases the precision of the computed eigenvectors.

        See Also:
        Constant Field Values
    • Constructor Detail

      • MR3

        public MR3​(Vector D,
                   Vector E)
        Creates an instance for computing eigenvalues and eigenvectors of a given symmetric tridiagonal matrix T.
        Parameters:
        D - the diagonal entries of T
        E - the sub-diagonal entries of T
      • MR3

        public MR3​(Vector D,
                   Vector E,
                   boolean wantEigenvector)
        Creates an instance for computing eigenvalues (and eigenvectors) of a given symmetric tridiagonal matrix T.
        Parameters:
        D - the diagonal entries of T
        E - the sub-diagonal entries of T
        wantEigenvector - true if eigenvectors are required
      • MR3

        public MR3​(Vector D,
                   Vector E,
                   boolean wantEigenvector,
                   double minRelativeGap)
        Creates an instance for computing eigenvalues (and eigenvectors) of a given symmetric tridiagonal matrix T.
        Parameters:
        D - the diagonal entries of T
        E - the sub-diagonal entries of T
        wantEigenvector - true if eigenvectors are required
        minRelativeGap - the threshold to determine if two eigenvalues are too close
    • Method Detail

      • getEigenvalues

        public List<Double> getEigenvalues()
        Gets all the eigenvalues in descending order.
        Specified by:
        getEigenvalues in interface Spectrum
        Returns:
        the list of eigenvalues in descending order
      • getEigenvectors

        public List<Vector> getEigenvectors()
        Gets all the eigenvectors which corresponds to the list of eigenvalues.
        Returns:
        the list of eigenvectors
      • getEigenvectorMatrix

        public Matrix getEigenvectorMatrix()
        Gets the eigenvector matrix, each column is an eigenvector.
        Returns:
        the eigenvector matrix