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 with double-precision floating point entries. Uses the :meth:`~scipy.linalg.eigvals` method from SciPy. - ``'symmetric'`` - checks that any complex matrix (i.e. with entries from :class:`~sage.rings.complex_double.CDF`) can be coerced into a real matrix (i.e. with entries from :class:`~sage.rings.real_double.RDF`), then applies the algorithm for Hermitian matrices.  This algorithm can be significantly faster than the ``'default'`` algorithm. - ``'symmetric'`` - converts the matrix into a real matrix (i.e. with entries from :class:`~sage.rings.real_double.RDF`), then applies the algorithm for Hermitian matrices.  This algorithm can be significantly faster than the ``'default'`` algorithm. - ``'hermitian'`` - uses the :meth:`~scipy.linalg.eigh` method from SciPy, which applies only to Hermitian matrices.  Since Hermitian is defined as a matrix equaling its conjugate-transpose, for a matrix with real entries this property is equivalent to being symmetric.  This algorithm can be significantly faster than the ``'default'`` algorithm. from SciPy, which applies only to real symmetric or complex Hermitian matrices.  Since Hermitian is defined as a matrix equaling its conjugate-transpose, for a matrix with real entries this property is equivalent to being symmetric. This algorithm can be significantly faster than the ``'default'`` algorithm. - ``'tol'`` - default: ``None`` - if set to a value other than ``None`` this is interpreted as a small real number used to aid in grouping eigenvalues that are numerically similar.  See the output description for more information. .. warning:: When using the ``'symmetric'`` or ``'hermitian'`` algorithms, no check is made on the input matrix, and only the entries below, and on, the main diagonal are employed in the computation. .. WARNING:: When using the ``'symmetric'`` or ``'hermitian'`` algorithms, no check is made on the input matrix, and only the entries below, and on, the main diagonal are employed in the computation. Methods such as :meth:`is_symmetric` and :meth:`is_hermitian` could be used to verify this beforehand. OUTPUT: interval containing similar eigenvalues could be as large as sum of the reciprocals of the first \$n\$ integers times ``tol``. .. warning:: Use caution when using the  ``tol`` parameter to group eigenvalues. See the examples below to see how this can go wrong. .. WARNING:: Use caution when using the  ``tol`` parameter to group eigenvalues.  See the examples below to see how this can go wrong. EXAMPLES:: sage: A.eigenvalues(algorithm='symmetric', tol=1.0e-5) [(-2.0, 4), (1.0, 5), (3.0, 1)] sage: A.eigenvalues(algorithm='symmetric', tol=1.0e-20) [(-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)] sage: A.eigenvalues(algorithm='symmetric', tol=2.5) [(-2.0, 4), (1.33333333333, 6)]