eig_multiple; doc edits

This commit is contained in:
fredrik 2018-12-04 11:29:46 +01:00
parent e7eba6be30
commit 1d6ab79610
5 changed files with 69 additions and 29 deletions

View file

@ -424,6 +424,7 @@ int acb_mat_eig_simple(acb_ptr E, acb_mat_t L, acb_mat_t R,
const acb_mat_t A, acb_srcptr E_approx, const acb_mat_t R_approx, slong prec);
int acb_mat_eig_multiple_rump(acb_ptr E, const acb_mat_t A, acb_srcptr E_approx, const acb_mat_t R_approx, slong prec);
int acb_mat_eig_multiple(acb_ptr E, const acb_mat_t A, acb_srcptr E_approx, const acb_mat_t R_approx, slong prec);
/* Special functions */

33
acb_mat/eig_multiple.c Normal file
View file

@ -0,0 +1,33 @@
/*
Copyright (C) 2018 Fredrik Johansson
This file is part of Arb.
Arb is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version. See <http://www.gnu.org/licenses/>.
*/
#include "acb_mat.h"
int
acb_mat_eig_multiple(acb_ptr E, const acb_mat_t A, acb_srcptr E_approx, const acb_mat_t R_approx, slong prec)
{
slong n;
acb_ptr F;
int success;
n = arb_mat_nrows(A);
F = _acb_vec_init(n);
success = acb_mat_eig_simple_vdhoeven_mourrain(F, NULL, NULL, A, E_approx, R_approx, prec);
if (!success)
success = acb_mat_eig_multiple_rump(F, A, E_approx, R_approx, prec);
_acb_vec_set(E, F, n);
_acb_vec_clear(F, n);
return success;
}

View file

@ -16,12 +16,12 @@ int main()
slong iter;
flint_rand_t state;
flint_printf("eig_multiple_rump....");
flint_printf("eig_multiple....");
fflush(stdout);
flint_randinit(state);
for (iter = 0; iter < 2000 * arb_test_multiplier(); iter++)
for (iter = 0; iter < 3000 * arb_test_multiplier(); iter++)
{
acb_mat_t A, R;
acb_ptr E, F;
@ -88,7 +88,10 @@ int main()
}
}
result = acb_mat_eig_multiple_rump(F, A, E, R, prec);
if (n_randint(state, 2))
result = acb_mat_eig_multiple_rump(F, A, E, R, prec);
else
result = acb_mat_eig_multiple(F, A, E, R, prec);
if (result)
{

View file

@ -668,9 +668,9 @@ than necessary. Manually balancing badly scaled matrices may help.
enclosures of the corresponding
right eigenvectors are written to the columns of *R*.
The left eigenvectors are normalized so that `L = R^{-1}`.
This produces a diagonalization `LAR = D` where *D* is the
diagonal matrix with the entries in *E* on the diagonal
(further, `L = R^{-1}`).
diagonal matrix with the entries in *E* on the diagonal.
The user supplies approximations *E_approx* and *R_approx*
of the eigenvalues and the right eigenvectors.
@ -696,10 +696,13 @@ than necessary. Manually balancing badly scaled matrices may help.
By design, these functions terminate instead of attempting to
compute eigenvalue clusters if some eigenvalues cannot be isolated.
To compute all eigenvalues of a matrix allowing for overlap,
:func:`acb_mat_eig_multiple_rump` may be used as a fallback.
:func:`acb_mat_eig_multiple_rump` may be used as a fallback,
or :func:`acb_mat_eig_multiple` may be used in the first place.
.. function:: int acb_mat_eig_multiple_rump(acb_ptr E, const acb_mat_t A, acb_srcptr E_approx, const acb_mat_t R_approx, slong prec)
.. function:: int acb_mat_eig_multiple(acb_ptr E, const acb_mat_t A, acb_srcptr E_approx, const acb_mat_t R_approx, slong prec)
Computes all the eigenvalues of the given *n* by *n* matrix *A*.
On success, the output vector *E* contains *n* complex intervals,
each representing one eigenvalue of *A* with the correct
@ -718,6 +721,11 @@ than necessary. Manually balancing badly scaled matrices may help.
No assumptions are made about the structure of *A* or the
quality of the given approximations.
This function groups approximate eigenvalues that are close and
calls :func:`acb_mat_eig_enclosure_rump` repeatedly to validate
The *rump* algorithm groups approximate eigenvalues that are close
and calls :func:`acb_mat_eig_enclosure_rump` repeatedly to validate
each cluster. The complexity is `O(m n^3)` for *m* clusters.
The default version, as currently implemented, first attempts to
call :func:`acb_mat_eig_simple_vdhoeven_mourrain` hoping that the
eigenvalues are actually simple. It then uses the *rump* algorithm as
a fallback.

View file

@ -168,30 +168,25 @@ The output of the example program should be something like the following::
Computer algebra systems and wrappers
-------------------------------------------------------------------------------
Python-FLINT (https://github.com/fredrik-johansson/python-flint) is a
convenient Python interface to both FLINT and Arb, without any other
dependencies.
* Python-FLINT (https://github.com/fredrik-johansson/python-flint) is a
convenient Python interface to both FLINT and Arb.
SageMath (http://sagemath.org/) includes Arb as a standard package and
contains a high-level Python interface. Refer to the SageMath documentation:
* SageMath (http://sagemath.org/) includes Arb as a standard package and
contains a high-level Python interface. Refer to the SageMath documentation:
* RealBallField: http://doc.sagemath.org/html/en/reference/rings_numerical/sage/rings/real_arb.html
* ComplexBallField: http://doc.sagemath.org/html/en/reference/rings_numerical/sage/rings/complex_arb.html
* RealBallField: http://doc.sagemath.org/html/en/reference/rings_numerical/sage/rings/real_arb.html
* ComplexBallField: http://doc.sagemath.org/html/en/reference/rings_numerical/sage/rings/complex_arb.html
Nemo (http://nemocas.org/) is a computer algebra package for the
Julia programming language which includes a high-level Julia interface to Arb.
The Nemo installation script will create a local installation of
Arb along with other dependencies.
* Nemo (http://nemocas.org/) is a computer algebra package for the
Julia programming language which includes a high-level Julia interface to Arb.
The Nemo installation script will create a local installation of
Arb along with other dependencies.
* Real balls: http://nemocas.github.io/Nemo.jl/latest/arb.html
* Complex balls: http://nemocas.github.io/Nemo.jl/latest/acb.html
* Real balls: http://nemocas.github.io/Nemo.jl/latest/arb.html
* Complex balls: http://nemocas.github.io/Nemo.jl/latest/acb.html
Other wrappers are also available:
* A Java wrapper using JNA: https://github.com/crowlogic/arb/
* Another Julia interface: https://github.com/JuliaArbTypes/ArbFloats.jl
Since the various wrappers add some overhead and do not expose all the
functionality in Arb, you may consider using them to try out Arb and prototype
algorithms while doing a final implementation in C.
* Other wrappers include:
* ArbNumerics (Julia): https://github.com/JeffreySarnoff/ArbNumerics.jl
* ArbFloats (Julia): https://github.com/JuliaArbTypes/ArbFloats.jl
* A Java wrapper using JNA: https://github.com/crowlogic/arb/