Ticket #11608: trac_11608-eigenvalues-symmetric-multiplicity-update-v2.patch

File trac_11608-eigenvalues-symmetric-multiplicity-update-v2.patch, 3.9 KB (added by rbeezer, 9 years ago)
  • sage/matrix/matrix_double_dense.pyx

    # HG changeset patch
    # User Rob Beezer <beezer@ups.edu>
    # Date 1336191978 25200
    # Node ID 491a1560bddfe1f9a3144210bbb87cc1e0539f6f
    # Parent  b4e3a4f911ce0905a5e200d9228419fd8095fc5a
    11608: RDF/CDF eigenvalues, symmetric matrices, multiplicities, updated
    
    diff --git a/sage/matrix/matrix_double_dense.pyx b/sage/matrix/matrix_double_dense.pyx
    a b  
    14631463            with double-precision floating point entries.
    14641464            Uses the :meth:`~scipy.linalg.eigvals` method from SciPy.
    14651465
    1466           - ``'symmetric'`` - checks that any complex matrix
    1467             (i.e. with entries from :class:`~sage.rings.complex_double.CDF`)
    1468             can be coerced into a real matrix (i.e. with entries from
    1469             :class:`~sage.rings.real_double.RDF`), then applies the
    1470             algorithm for Hermitian matrices.  This algorithm can
    1471             be significantly faster than the ``'default'`` algorithm.
     1466          - ``'symmetric'`` - converts the matrix into a real matrix
     1467            (i.e. with entries from :class:`~sage.rings.real_double.RDF`),
     1468            then applies the algorithm for Hermitian matrices.  This
     1469            algorithm can be significantly faster than the
     1470            ``'default'`` algorithm.
    14721471
    14731472          - ``'hermitian'`` - uses the :meth:`~scipy.linalg.eigh` method
    1474             from SciPy, which applies only to Hermitian matrices.  Since
    1475             Hermitian is defined as a matrix equaling its conjugate-transpose,
    1476             for a matrix with real entries this property is equivalent to
    1477             being symmetric.  This algorithm can be significantly faster
    1478             than the ``'default'`` algorithm.
     1473            from SciPy, which applies only to real symmetric or complex
     1474            Hermitian matrices.  Since Hermitian is defined as a matrix
     1475            equaling its conjugate-transpose, for a matrix with real
     1476            entries this property is equivalent to being symmetric.
     1477            This algorithm can be significantly faster than the
     1478            ``'default'`` algorithm.
    14791479
    14801480        - ``'tol'`` - default: ``None`` - if set to a value other than
    14811481          ``None`` this is interpreted as a small real number used to aid in
    14821482          grouping eigenvalues that are numerically similar.  See the output
    14831483          description for more information.
    14841484
    1485         .. warning::
    1486 
    1487         When using the ``'symmetric'`` or ``'hermitian'`` algorithms,
    1488         no check is made on the input matrix, and only the entries below,
    1489         and on, the main diagonal are employed in the computation.
     1485        .. WARNING::
     1486       
     1487           When using the ``'symmetric'`` or ``'hermitian'`` algorithms,
     1488           no check is made on the input matrix, and only the entries below,
     1489           and on, the main diagonal are employed in the computation.
     1490
     1491           Methods such as :meth:`is_symmetric` and :meth:`is_hermitian`
     1492           could be used to verify this beforehand.
    14901493
    14911494        OUTPUT:
    14921495
     
    15081511        interval containing similar eigenvalues could be as large as sum
    15091512        of the reciprocals of the first $n$ integers times ``tol``.
    15101513
    1511         .. warning::
    1512 
    1513         Use caution when using the  ``tol`` parameter to group eigenvalues.
    1514         See the examples below to see how this can go wrong.
     1514        .. WARNING::
     1515
     1516            Use caution when using the  ``tol`` parameter to group
     1517            eigenvalues.  See the examples below to see how this can go wrong.
    15151518
    15161519        EXAMPLES::
    15171520
     
    15671570            sage: A.eigenvalues(algorithm='symmetric', tol=1.0e-5)
    15681571            [(-2.0, 4), (1.0, 5), (3.0, 1)]
    15691572
    1570             sage: A.eigenvalues(algorithm='symmetric', tol=1.0e-20)
    1571             [(-2.0, 1), (-2.0, 2), (-2.0, 1), (1.0, 1), (1.0, 1), (1.0, 1), (1.0, 1), (1.0, 1), (3.0, 1)]
    1572 
    15731573            sage: A.eigenvalues(algorithm='symmetric', tol=2.5)
    15741574            [(-2.0, 4), (1.33333333333, 6)]
    15751575