passagemath-flint 10.6.1rc10__cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- passagemath_flint-10.6.1rc10.dist-info/METADATA +122 -0
- passagemath_flint-10.6.1rc10.dist-info/RECORD +361 -0
- passagemath_flint-10.6.1rc10.dist-info/WHEEL +6 -0
- passagemath_flint-10.6.1rc10.dist-info/top_level.txt +2 -0
- passagemath_flint.libs/libflint-aecb9cc5.so.21.0.0 +0 -0
- passagemath_flint.libs/libgf2x-a4cdec90.so.3.0.0 +0 -0
- passagemath_flint.libs/libgfortran-8f1e9814.so.5.0.0 +0 -0
- passagemath_flint.libs/libgmp-6e109695.so.10.5.0 +0 -0
- passagemath_flint.libs/libgsl-cda90e79.so.28.0.0 +0 -0
- passagemath_flint.libs/libmpfi-e3c25853.so.0.0.0 +0 -0
- passagemath_flint.libs/libmpfr-82690d50.so.6.2.1 +0 -0
- passagemath_flint.libs/libntl-74e7d9a3.so.44.0.1 +0 -0
- passagemath_flint.libs/libopenblasp-r0-6dcb67f9.3.29.so +0 -0
- passagemath_flint.libs/libquadmath-828275a7.so.0.0.0 +0 -0
- sage/all__sagemath_flint.py +29 -0
- sage/combinat/all__sagemath_flint.py +1 -0
- sage/combinat/posets/all__sagemath_flint.py +1 -0
- sage/combinat/posets/hasse_cython_flint.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/combinat/posets/hasse_cython_flint.pyx +194 -0
- sage/data_structures/all__sagemath_flint.py +1 -0
- sage/data_structures/bounded_integer_sequences.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/data_structures/bounded_integer_sequences.pxd +62 -0
- sage/data_structures/bounded_integer_sequences.pyx +1418 -0
- sage/graphs/all__sagemath_flint.py +1 -0
- sage/graphs/chrompoly.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/graphs/chrompoly.pyx +555 -0
- sage/graphs/matchpoly.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/graphs/matchpoly.pyx +412 -0
- sage/libs/all__sagemath_flint.py +17 -0
- sage/libs/arb/__init__.py +1 -0
- sage/libs/arb/acb.pxd +154 -0
- sage/libs/arb/acb_calc.pxd +9 -0
- sage/libs/arb/acb_elliptic.pxd +25 -0
- sage/libs/arb/acb_hypgeom.pxd +74 -0
- sage/libs/arb/acb_mat.pxd +62 -0
- sage/libs/arb/acb_modular.pxd +17 -0
- sage/libs/arb/acb_poly.pxd +216 -0
- sage/libs/arb/arb.pxd +240 -0
- sage/libs/arb/arb_fmpz_poly.pxd +21 -0
- sage/libs/arb/arb_hypgeom.pxd +83 -0
- sage/libs/arb/arb_wrap.h +34 -0
- sage/libs/arb/arf.pxd +131 -0
- sage/libs/arb/arith.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/arb/arith.pyx +87 -0
- sage/libs/arb/bernoulli.pxd +6 -0
- sage/libs/arb/mag.pxd +77 -0
- sage/libs/arb/types.pxd +37 -0
- sage/libs/flint/__init__.py +1 -0
- sage/libs/flint/acb.pxd +270 -0
- sage/libs/flint/acb_calc.pxd +22 -0
- sage/libs/flint/acb_dft.pxd +51 -0
- sage/libs/flint/acb_dirichlet.pxd +112 -0
- sage/libs/flint/acb_elliptic.pxd +42 -0
- sage/libs/flint/acb_hypgeom.pxd +169 -0
- sage/libs/flint/acb_macros.pxd +9 -0
- sage/libs/flint/acb_mat.pxd +136 -0
- sage/libs/flint/acb_mat_macros.pxd +10 -0
- sage/libs/flint/acb_modular.pxd +62 -0
- sage/libs/flint/acb_poly.pxd +251 -0
- sage/libs/flint/acb_poly_macros.pxd +8 -0
- sage/libs/flint/acb_theta.pxd +124 -0
- sage/libs/flint/acf.pxd +32 -0
- sage/libs/flint/aprcl.pxd +84 -0
- sage/libs/flint/arb.pxd +382 -0
- sage/libs/flint/arb_calc.pxd +31 -0
- sage/libs/flint/arb_fmpz_poly.pxd +34 -0
- sage/libs/flint/arb_fpwrap.pxd +215 -0
- sage/libs/flint/arb_hypgeom.pxd +147 -0
- sage/libs/flint/arb_macros.pxd +9 -0
- sage/libs/flint/arb_mat.pxd +140 -0
- sage/libs/flint/arb_mat_macros.pxd +10 -0
- sage/libs/flint/arb_poly.pxd +237 -0
- sage/libs/flint/arf.pxd +167 -0
- sage/libs/flint/arith.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/arith.pxd +76 -0
- sage/libs/flint/arith.pyx +77 -0
- sage/libs/flint/arith_sage.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/arith_sage.pyx +308 -0
- sage/libs/flint/bernoulli.pxd +28 -0
- sage/libs/flint/bool_mat.pxd +52 -0
- sage/libs/flint/ca.pxd +203 -0
- sage/libs/flint/ca_ext.pxd +34 -0
- sage/libs/flint/ca_field.pxd +32 -0
- sage/libs/flint/ca_mat.pxd +117 -0
- sage/libs/flint/ca_poly.pxd +104 -0
- sage/libs/flint/ca_vec.pxd +46 -0
- sage/libs/flint/calcium.pxd +27 -0
- sage/libs/flint/d_mat.pxd +39 -0
- sage/libs/flint/d_vec.pxd +32 -0
- sage/libs/flint/dirichlet.pxd +57 -0
- sage/libs/flint/dlog.pxd +53 -0
- sage/libs/flint/double_extras.pxd +24 -0
- sage/libs/flint/double_interval.pxd +36 -0
- sage/libs/flint/fexpr.pxd +104 -0
- sage/libs/flint/fexpr_builtin.pxd +20 -0
- sage/libs/flint/fft.pxd +66 -0
- sage/libs/flint/flint.pxd +36 -0
- sage/libs/flint/flint_ntl_wrap.h +35 -0
- sage/libs/flint/flint_sage.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/flint_sage.pyx +163 -0
- sage/libs/flint/flint_wrap.h +190 -0
- sage/libs/flint/fmpq.pxd +137 -0
- sage/libs/flint/fmpq_mat.pxd +105 -0
- sage/libs/flint/fmpq_mat_macros.pxd +10 -0
- sage/libs/flint/fmpq_mpoly.pxd +165 -0
- sage/libs/flint/fmpq_mpoly_factor.pxd +30 -0
- sage/libs/flint/fmpq_poly.pxd +241 -0
- sage/libs/flint/fmpq_poly_macros.pxd +9 -0
- sage/libs/flint/fmpq_poly_sage.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/fmpq_poly_sage.pxd +31 -0
- sage/libs/flint/fmpq_poly_sage.pyx +48 -0
- sage/libs/flint/fmpq_vec.pxd +27 -0
- sage/libs/flint/fmpz.pxd +256 -0
- sage/libs/flint/fmpz_extras.pxd +32 -0
- sage/libs/flint/fmpz_factor.pxd +42 -0
- sage/libs/flint/fmpz_factor_sage.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/fmpz_factor_sage.pxd +4 -0
- sage/libs/flint/fmpz_factor_sage.pyx +29 -0
- sage/libs/flint/fmpz_lll.pxd +49 -0
- sage/libs/flint/fmpz_macros.pxd +8 -0
- sage/libs/flint/fmpz_mat.pxd +184 -0
- sage/libs/flint/fmpz_mat_macros.pxd +10 -0
- sage/libs/flint/fmpz_mod.pxd +46 -0
- sage/libs/flint/fmpz_mod_mat.pxd +71 -0
- sage/libs/flint/fmpz_mod_mpoly.pxd +161 -0
- sage/libs/flint/fmpz_mod_mpoly_factor.pxd +28 -0
- sage/libs/flint/fmpz_mod_poly.pxd +249 -0
- sage/libs/flint/fmpz_mod_poly_factor.pxd +46 -0
- sage/libs/flint/fmpz_mod_vec.pxd +27 -0
- sage/libs/flint/fmpz_mpoly.pxd +224 -0
- sage/libs/flint/fmpz_mpoly_factor.pxd +29 -0
- sage/libs/flint/fmpz_mpoly_q.pxd +57 -0
- sage/libs/flint/fmpz_poly.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/fmpz_poly.pxd +407 -0
- sage/libs/flint/fmpz_poly.pyx +19 -0
- sage/libs/flint/fmpz_poly_factor.pxd +33 -0
- sage/libs/flint/fmpz_poly_macros.pxd +8 -0
- sage/libs/flint/fmpz_poly_mat.pxd +71 -0
- sage/libs/flint/fmpz_poly_q.pxd +55 -0
- sage/libs/flint/fmpz_poly_sage.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/fmpz_poly_sage.pxd +20 -0
- sage/libs/flint/fmpz_poly_sage.pyx +500 -0
- sage/libs/flint/fmpz_vec.pxd +80 -0
- sage/libs/flint/fmpzi.pxd +52 -0
- sage/libs/flint/fq.pxd +97 -0
- sage/libs/flint/fq_default.pxd +84 -0
- sage/libs/flint/fq_default_mat.pxd +70 -0
- sage/libs/flint/fq_default_poly.pxd +97 -0
- sage/libs/flint/fq_default_poly_factor.pxd +39 -0
- sage/libs/flint/fq_embed.pxd +28 -0
- sage/libs/flint/fq_mat.pxd +83 -0
- sage/libs/flint/fq_nmod.pxd +95 -0
- sage/libs/flint/fq_nmod_embed.pxd +28 -0
- sage/libs/flint/fq_nmod_mat.pxd +83 -0
- sage/libs/flint/fq_nmod_mpoly.pxd +130 -0
- sage/libs/flint/fq_nmod_mpoly_factor.pxd +28 -0
- sage/libs/flint/fq_nmod_poly.pxd +202 -0
- sage/libs/flint/fq_nmod_poly_factor.pxd +47 -0
- sage/libs/flint/fq_nmod_vec.pxd +33 -0
- sage/libs/flint/fq_poly.pxd +204 -0
- sage/libs/flint/fq_poly_factor.pxd +47 -0
- sage/libs/flint/fq_vec.pxd +33 -0
- sage/libs/flint/fq_zech.pxd +99 -0
- sage/libs/flint/fq_zech_embed.pxd +28 -0
- sage/libs/flint/fq_zech_mat.pxd +78 -0
- sage/libs/flint/fq_zech_poly.pxd +198 -0
- sage/libs/flint/fq_zech_poly_factor.pxd +47 -0
- sage/libs/flint/fq_zech_vec.pxd +33 -0
- sage/libs/flint/gr.pxd +174 -0
- sage/libs/flint/gr_generic.pxd +215 -0
- sage/libs/flint/gr_mat.pxd +161 -0
- sage/libs/flint/gr_mpoly.pxd +68 -0
- sage/libs/flint/gr_poly.pxd +276 -0
- sage/libs/flint/gr_special.pxd +237 -0
- sage/libs/flint/gr_vec.pxd +120 -0
- sage/libs/flint/hypgeom.pxd +24 -0
- sage/libs/flint/long_extras.pxd +23 -0
- sage/libs/flint/mag.pxd +131 -0
- sage/libs/flint/mag_macros.pxd +8 -0
- sage/libs/flint/mpf_mat.pxd +36 -0
- sage/libs/flint/mpf_vec.pxd +34 -0
- sage/libs/flint/mpfr_mat.pxd +27 -0
- sage/libs/flint/mpfr_vec.pxd +25 -0
- sage/libs/flint/mpn_extras.pxd +41 -0
- sage/libs/flint/mpoly.pxd +72 -0
- sage/libs/flint/nf.pxd +19 -0
- sage/libs/flint/nf_elem.pxd +74 -0
- sage/libs/flint/nmod.pxd +35 -0
- sage/libs/flint/nmod_mat.pxd +104 -0
- sage/libs/flint/nmod_mpoly.pxd +144 -0
- sage/libs/flint/nmod_mpoly_factor.pxd +28 -0
- sage/libs/flint/nmod_poly.pxd +339 -0
- sage/libs/flint/nmod_poly_factor.pxd +44 -0
- sage/libs/flint/nmod_poly_linkage.pxi +710 -0
- sage/libs/flint/nmod_poly_mat.pxd +76 -0
- sage/libs/flint/nmod_vec.pxd +40 -0
- sage/libs/flint/ntl_interface.pxd +17 -0
- sage/libs/flint/padic.pxd +93 -0
- sage/libs/flint/padic_mat.pxd +64 -0
- sage/libs/flint/padic_poly.pxd +88 -0
- sage/libs/flint/partitions.pxd +23 -0
- sage/libs/flint/perm.pxd +26 -0
- sage/libs/flint/profiler.pxd +24 -0
- sage/libs/flint/qadic.pxd +77 -0
- sage/libs/flint/qfb.pxd +44 -0
- sage/libs/flint/qqbar.pxd +172 -0
- sage/libs/flint/qsieve.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/qsieve.pxd +41 -0
- sage/libs/flint/qsieve.pyx +21 -0
- sage/libs/flint/qsieve_sage.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/qsieve_sage.pyx +67 -0
- sage/libs/flint/thread_pool.pxd +25 -0
- sage/libs/flint/types.pxd +2076 -0
- sage/libs/flint/ulong_extras.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/ulong_extras.pxd +141 -0
- sage/libs/flint/ulong_extras.pyx +21 -0
- sage/libs/flint/ulong_extras_sage.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/libs/flint/ulong_extras_sage.pyx +21 -0
- sage/matrix/all__sagemath_flint.py +1 -0
- sage/matrix/change_ring.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/matrix/change_ring.pyx +43 -0
- sage/matrix/matrix_complex_ball_dense.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_complex_ball_dense.pxd +14 -0
- sage/matrix/matrix_complex_ball_dense.pyx +973 -0
- sage/matrix/matrix_cyclo_dense.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_cyclo_dense.pxd +16 -0
- sage/matrix/matrix_cyclo_dense.pyx +1761 -0
- sage/matrix/matrix_integer_dense.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_integer_dense.pxd +32 -0
- sage/matrix/matrix_integer_dense.pyx +5801 -0
- sage/matrix/matrix_integer_dense_hnf.py +1294 -0
- sage/matrix/matrix_integer_dense_saturation.py +346 -0
- sage/matrix/matrix_integer_sparse.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_integer_sparse.pxd +9 -0
- sage/matrix/matrix_integer_sparse.pyx +1090 -0
- sage/matrix/matrix_rational_dense.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_rational_dense.pxd +23 -0
- sage/matrix/matrix_rational_dense.pyx +2995 -0
- sage/matrix/matrix_rational_sparse.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_rational_sparse.pxd +11 -0
- sage/matrix/matrix_rational_sparse.pyx +789 -0
- sage/matrix/misc_flint.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/matrix/misc_flint.pyx +109 -0
- sage/modular/all__sagemath_flint.py +1 -0
- sage/modular/modform/all__sagemath_flint.py +1 -0
- sage/modular/modform/eis_series_cython.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/modular/modform/eis_series_cython.pyx +226 -0
- sage/modular/modsym/all__sagemath_flint.py +1 -0
- sage/modular/modsym/apply.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/modular/modsym/apply.pxd +6 -0
- sage/modular/modsym/apply.pyx +113 -0
- sage/modular/modsym/heilbronn.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/modular/modsym/heilbronn.pyx +966 -0
- sage/modular/pollack_stevens/all__sagemath_flint.py +1 -0
- sage/modular/pollack_stevens/dist.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/modular/pollack_stevens/dist.pxd +38 -0
- sage/modular/pollack_stevens/dist.pyx +1439 -0
- sage/quivers/algebra.py +691 -0
- sage/quivers/algebra_elements.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/quivers/algebra_elements.pxd +97 -0
- sage/quivers/algebra_elements.pxi +1324 -0
- sage/quivers/algebra_elements.pyx +1424 -0
- sage/quivers/all.py +1 -0
- sage/quivers/ar_quiver.py +917 -0
- sage/quivers/homspace.py +640 -0
- sage/quivers/morphism.py +1282 -0
- sage/quivers/path_semigroup.py +1155 -0
- sage/quivers/paths.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/quivers/paths.pxd +13 -0
- sage/quivers/paths.pyx +809 -0
- sage/quivers/representation.py +2975 -0
- sage/rings/all__sagemath_flint.py +37 -0
- sage/rings/cif.py +4 -0
- sage/rings/complex_arb.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/complex_arb.pxd +29 -0
- sage/rings/complex_arb.pyx +5176 -0
- sage/rings/complex_interval.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/complex_interval.pxd +30 -0
- sage/rings/complex_interval.pyx +2475 -0
- sage/rings/complex_interval_field.py +711 -0
- sage/rings/convert/all.py +1 -0
- sage/rings/convert/mpfi.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/convert/mpfi.pxd +6 -0
- sage/rings/convert/mpfi.pyx +576 -0
- sage/rings/factorint_flint.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/factorint_flint.pyx +99 -0
- sage/rings/fraction_field_FpT.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/fraction_field_FpT.pxd +28 -0
- sage/rings/fraction_field_FpT.pyx +2043 -0
- sage/rings/imaginary_unit.py +5 -0
- sage/rings/monomials.py +73 -0
- sage/rings/number_field/S_unit_solver.py +2870 -0
- sage/rings/number_field/all__sagemath_flint.py +7 -0
- sage/rings/number_field/bdd_height.py +664 -0
- sage/rings/number_field/class_group.py +762 -0
- sage/rings/number_field/galois_group.py +1307 -0
- sage/rings/number_field/homset.py +612 -0
- sage/rings/number_field/maps.py +687 -0
- sage/rings/number_field/morphism.py +272 -0
- sage/rings/number_field/number_field.py +12820 -0
- sage/rings/number_field/number_field_element.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/number_field/number_field_element.pxd +59 -0
- sage/rings/number_field/number_field_element.pyx +5735 -0
- sage/rings/number_field/number_field_element_quadratic.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/number_field/number_field_element_quadratic.pxd +34 -0
- sage/rings/number_field/number_field_element_quadratic.pyx +3185 -0
- sage/rings/number_field/number_field_ideal_rel.py +925 -0
- sage/rings/number_field/number_field_morphisms.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/number_field/number_field_morphisms.pyx +781 -0
- sage/rings/number_field/number_field_rel.py +2734 -0
- sage/rings/number_field/order.py +2981 -0
- sage/rings/number_field/order_ideal.py +804 -0
- sage/rings/number_field/selmer_group.py +715 -0
- sage/rings/number_field/small_primes_of_degree_one.py +242 -0
- sage/rings/number_field/splitting_field.py +606 -0
- sage/rings/number_field/structure.py +380 -0
- sage/rings/number_field/unit_group.py +721 -0
- sage/rings/padics/all__sagemath_flint.py +3 -0
- sage/rings/polynomial/all__sagemath_flint.py +1 -0
- sage/rings/polynomial/complex_roots.py +312 -0
- sage/rings/polynomial/evaluation_flint.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/evaluation_flint.pxd +7 -0
- sage/rings/polynomial/evaluation_flint.pyx +68 -0
- sage/rings/polynomial/hilbert.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/hilbert.pyx +602 -0
- sage/rings/polynomial/polynomial_complex_arb.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_complex_arb.pxd +7 -0
- sage/rings/polynomial/polynomial_complex_arb.pyx +963 -0
- sage/rings/polynomial/polynomial_integer_dense_flint.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_integer_dense_flint.pxd +13 -0
- sage/rings/polynomial/polynomial_integer_dense_flint.pyx +1881 -0
- sage/rings/polynomial/polynomial_number_field.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_number_field.pyx +345 -0
- sage/rings/polynomial/polynomial_rational_flint.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_rational_flint.pxd +20 -0
- sage/rings/polynomial/polynomial_rational_flint.pyx +2598 -0
- sage/rings/polynomial/polynomial_zmod_flint.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_zmod_flint.pxd +20 -0
- sage/rings/polynomial/polynomial_zmod_flint.pyx +1063 -0
- sage/rings/polynomial/real_roots.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/real_roots.pxd +81 -0
- sage/rings/polynomial/real_roots.pyx +4704 -0
- sage/rings/polynomial/refine_root.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/refine_root.pyx +142 -0
- sage/rings/polynomial/weil/all.py +4 -0
- sage/rings/polynomial/weil/power_sums.h +46 -0
- sage/rings/polynomial/weil/weil_polynomials.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/weil/weil_polynomials.pyx +596 -0
- sage/rings/qqbar.py +9025 -0
- sage/rings/real_arb.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/real_arb.pxd +21 -0
- sage/rings/real_arb.pyx +4065 -0
- sage/rings/real_interval_absolute.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/real_interval_absolute.pyx +1073 -0
- sage/rings/real_mpfi.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/rings/real_mpfi.pyx +5428 -0
- sage/schemes/all__sagemath_flint.py +1 -0
- sage/schemes/elliptic_curves/all__sagemath_flint.py +1 -0
- sage/schemes/elliptic_curves/descent_two_isogeny.cpython-310-x86_64-linux-gnu.so +0 -0
- sage/schemes/elliptic_curves/descent_two_isogeny.pyx +1387 -0
- sage/schemes/elliptic_curves/descent_two_isogeny_pari.pxd +5 -0
@@ -0,0 +1,973 @@
|
|
1
|
+
# sage_setup: distribution = sagemath-flint
|
2
|
+
# distutils: libraries = flint
|
3
|
+
r"""
|
4
|
+
Arbitrary precision complex ball matrices
|
5
|
+
|
6
|
+
AUTHORS:
|
7
|
+
|
8
|
+
- Clemens Heuberger (2014-10-25): Initial version.
|
9
|
+
|
10
|
+
This is an incomplete interface to the `acb_mat module
|
11
|
+
<https://flintlib.org/doc/acb_mat.html>`_ of FLINT; it may be useful to refer
|
12
|
+
to its documentation for more details.
|
13
|
+
|
14
|
+
TESTS::
|
15
|
+
|
16
|
+
sage: mat = matrix(CBF, 2, 2, range(4))
|
17
|
+
sage: x = polygen(QQ)
|
18
|
+
sage: pol = x^3 + 2
|
19
|
+
sage: pol(mat)
|
20
|
+
[8.000000000000000 11.00000000000000]
|
21
|
+
[22.00000000000000 41.00000000000000]
|
22
|
+
|
23
|
+
sage: mat = matrix(ComplexBallField(20), 2, 2, list(range(4)))*i/3 # needs sage.symbolic
|
24
|
+
sage: loads(dumps(mat)).identical(mat) # needs sage.symbolic
|
25
|
+
True
|
26
|
+
"""
|
27
|
+
# ****************************************************************************
|
28
|
+
# Copyright (C) 2014 Clemens Heuberger <clemens.heuberger@aau.at>
|
29
|
+
#
|
30
|
+
# This program is free software: you can redistribute it and/or modify
|
31
|
+
# it under the terms of the GNU General Public License as published by
|
32
|
+
# the Free Software Foundation, either version 2 of the License, or
|
33
|
+
# (at your option) any later version.
|
34
|
+
# http://www.gnu.org/licenses/
|
35
|
+
# ****************************************************************************
|
36
|
+
from cpython.object cimport Py_EQ, Py_NE
|
37
|
+
from cysignals.signals cimport sig_on, sig_str, sig_off
|
38
|
+
|
39
|
+
from sage.arith.power cimport generic_power_pos
|
40
|
+
from sage.libs.flint.acb cimport *
|
41
|
+
from sage.libs.flint.acb_mat cimport *
|
42
|
+
from sage.libs.gmp.mpz cimport mpz_fits_ulong_p, mpz_get_ui
|
43
|
+
from sage.matrix.constructor import matrix
|
44
|
+
from sage.matrix.args cimport SparseEntry, MatrixArgs_init
|
45
|
+
from sage.rings.complex_interval cimport ComplexIntervalFieldElement
|
46
|
+
from sage.rings.complex_arb cimport (
|
47
|
+
ComplexBall,
|
48
|
+
ComplexIntervalFieldElement_to_acb,
|
49
|
+
acb_to_ComplexIntervalFieldElement)
|
50
|
+
from sage.rings.integer cimport Integer
|
51
|
+
from sage.rings.polynomial.polynomial_complex_arb cimport Polynomial_complex_arb
|
52
|
+
from sage.structure.element cimport Element, Matrix
|
53
|
+
from sage.structure.parent cimport Parent
|
54
|
+
from sage.structure.sequence import Sequence
|
55
|
+
|
56
|
+
from sage.misc.superseded import experimental
|
57
|
+
from sage.rings.polynomial import polynomial_ring_constructor
|
58
|
+
|
59
|
+
|
60
|
+
cdef void matrix_to_acb_mat(acb_mat_t target, source) noexcept:
|
61
|
+
"""
|
62
|
+
Convert a matrix containing :class:`ComplexIntervalFieldElement` to an ``acb_mat_t``.
|
63
|
+
|
64
|
+
INPUT:
|
65
|
+
|
66
|
+
- ``target`` -- an ``acb_mat_t``
|
67
|
+
|
68
|
+
- ``source`` -- a matrix consisting of :class:`ComplexIntervalFieldElement`
|
69
|
+
|
70
|
+
OUTPUT:
|
71
|
+
|
72
|
+
None.
|
73
|
+
"""
|
74
|
+
cdef unsigned long nrows, ncols, r, c
|
75
|
+
|
76
|
+
nrows = acb_mat_nrows(target)
|
77
|
+
ncols = acb_mat_ncols(target)
|
78
|
+
|
79
|
+
for r in range(nrows):
|
80
|
+
for c in range(ncols):
|
81
|
+
ComplexIntervalFieldElement_to_acb(acb_mat_entry(target, r, c),
|
82
|
+
source[r][c])
|
83
|
+
|
84
|
+
cdef ComplexIntervalFieldElement _to_CIF(acb_t source, ComplexIntervalFieldElement template):
|
85
|
+
cdef ComplexIntervalFieldElement result
|
86
|
+
result = template._new()
|
87
|
+
acb_to_ComplexIntervalFieldElement(
|
88
|
+
result, source)
|
89
|
+
return result
|
90
|
+
|
91
|
+
cdef Matrix_generic_dense acb_mat_to_matrix(acb_mat_t source, Parent CIF):
|
92
|
+
"""
|
93
|
+
Convert an ``acb_mat_t`` to a matrix containing :class:`ComplexIntervalFieldElement`.
|
94
|
+
|
95
|
+
INPUT:
|
96
|
+
|
97
|
+
- ``source`` -- an ``acb_mat_t``
|
98
|
+
|
99
|
+
- ``precision`` -- positive integer
|
100
|
+
|
101
|
+
OUTPUT:
|
102
|
+
|
103
|
+
A :class:`~sage.matrix.matrix_generic_dense.Matrix_generic_dense`
|
104
|
+
containing :class:`ComplexIntervalFieldElement`.
|
105
|
+
"""
|
106
|
+
cdef unsigned long nrows, ncols, r, c
|
107
|
+
cdef ComplexIntervalFieldElement template
|
108
|
+
|
109
|
+
nrows = acb_mat_nrows(source)
|
110
|
+
ncols = acb_mat_ncols(source)
|
111
|
+
template = CIF(0)
|
112
|
+
|
113
|
+
return matrix(
|
114
|
+
[[_to_CIF(acb_mat_entry(source, r, c), template)
|
115
|
+
for c in range(ncols)]
|
116
|
+
for r in range(nrows)])
|
117
|
+
|
118
|
+
cdef inline long prec(Matrix_complex_ball_dense mat) noexcept:
|
119
|
+
return mat._base_ring._prec
|
120
|
+
|
121
|
+
cdef class Matrix_complex_ball_dense(Matrix_dense):
|
122
|
+
"""
|
123
|
+
Matrix over a complex ball field. Implemented using the
|
124
|
+
``acb_mat`` type of the FLINT library.
|
125
|
+
|
126
|
+
EXAMPLES::
|
127
|
+
|
128
|
+
sage: MatrixSpace(CBF, 3)(2)
|
129
|
+
[2.000000000000000 0 0]
|
130
|
+
[ 0 2.000000000000000 0]
|
131
|
+
[ 0 0 2.000000000000000]
|
132
|
+
sage: matrix(CBF, 1, 3, [1, 2, -3])
|
133
|
+
[ 1.000000000000000 2.000000000000000 -3.000000000000000]
|
134
|
+
"""
|
135
|
+
def __cinit__(self):
|
136
|
+
"""
|
137
|
+
Create and allocate memory for the matrix.
|
138
|
+
|
139
|
+
EXAMPLES::
|
140
|
+
|
141
|
+
sage: from sage.matrix.matrix_complex_ball_dense import Matrix_complex_ball_dense
|
142
|
+
sage: a = Matrix_complex_ball_dense.__new__( # indirect doctest
|
143
|
+
....: Matrix_complex_ball_dense, Mat(CBF, 2), 0, 0, 0)
|
144
|
+
sage: type(a)
|
145
|
+
<class 'sage.matrix.matrix_complex_ball_dense.Matrix_complex_ball_dense'>
|
146
|
+
"""
|
147
|
+
sig_str("FLINT exception")
|
148
|
+
acb_mat_init(self.value, self._nrows, self._ncols)
|
149
|
+
sig_off()
|
150
|
+
|
151
|
+
def __dealloc__(self):
|
152
|
+
"""
|
153
|
+
Free all the memory allocated for this matrix.
|
154
|
+
|
155
|
+
EXAMPLES::
|
156
|
+
|
157
|
+
sage: a = Matrix(CBF, 2, [1, 2, 3, 4]) # indirect doctest
|
158
|
+
sage: del a
|
159
|
+
"""
|
160
|
+
acb_mat_clear(self.value)
|
161
|
+
|
162
|
+
cdef Matrix_complex_ball_dense _new(self, Py_ssize_t nrows, Py_ssize_t ncols):
|
163
|
+
r"""
|
164
|
+
Return a new matrix over the same base ring.
|
165
|
+
"""
|
166
|
+
cdef Parent P
|
167
|
+
if nrows == self._nrows and ncols == self._ncols:
|
168
|
+
P = self._parent
|
169
|
+
else:
|
170
|
+
P = self.matrix_space(nrows, ncols)
|
171
|
+
return Matrix_complex_ball_dense.__new__(Matrix_complex_ball_dense, P, None, None, None)
|
172
|
+
|
173
|
+
def __init__(self, parent, entries=None, copy=None, bint coerce=True):
|
174
|
+
r"""
|
175
|
+
Initialize a dense matrix over the complex ball field.
|
176
|
+
|
177
|
+
INPUT:
|
178
|
+
|
179
|
+
- ``parent`` -- a matrix space over a complex ball field
|
180
|
+
|
181
|
+
- ``entries`` -- see :func:`matrix`
|
182
|
+
|
183
|
+
- ``copy`` -- ignored (for backwards compatibility)
|
184
|
+
|
185
|
+
- ``coerce`` -- if ``False``, assume without checking that the
|
186
|
+
entries lie in the base ring
|
187
|
+
|
188
|
+
EXAMPLES:
|
189
|
+
|
190
|
+
The ``__init__`` function is called implicitly in each of the
|
191
|
+
examples below to actually fill in the values of the matrix.
|
192
|
+
|
193
|
+
We create a `2 \times 2` and a `1\times 4` matrix::
|
194
|
+
|
195
|
+
sage: matrix(CBF, 2, 2, range(4))
|
196
|
+
[ 0 1.000000000000000]
|
197
|
+
[2.000000000000000 3.000000000000000]
|
198
|
+
sage: Matrix(CBF, 1, 4, range(4))
|
199
|
+
[ 0 1.000000000000000 2.000000000000000 3.000000000000000]
|
200
|
+
|
201
|
+
If the number of columns isn't given, it is determined from the
|
202
|
+
number of elements in the list. ::
|
203
|
+
|
204
|
+
sage: matrix(CBF, 2, range(4))
|
205
|
+
[ 0 1.000000000000000]
|
206
|
+
[2.000000000000000 3.000000000000000]
|
207
|
+
sage: matrix(CBF, 2, range(6))
|
208
|
+
[ 0 1.000000000000000 2.000000000000000]
|
209
|
+
[3.000000000000000 4.000000000000000 5.000000000000000]
|
210
|
+
|
211
|
+
Another way to make a matrix is to create the space of matrices and
|
212
|
+
convert lists into it. ::
|
213
|
+
|
214
|
+
sage: A = Mat(CBF, 2); A
|
215
|
+
Full MatrixSpace of 2 by 2 dense matrices over
|
216
|
+
Complex ball field with 53 bits of precision
|
217
|
+
sage: A(range(4))
|
218
|
+
[ 0 1.000000000000000]
|
219
|
+
[2.000000000000000 3.000000000000000]
|
220
|
+
|
221
|
+
Actually it is only necessary that the input can be converted to a
|
222
|
+
list, so the following also works::
|
223
|
+
|
224
|
+
sage: v = reversed(range(4)); type(v)
|
225
|
+
<...iterator'>
|
226
|
+
sage: A(v)
|
227
|
+
[3.000000000000000 2.000000000000000]
|
228
|
+
[1.000000000000000 0]
|
229
|
+
|
230
|
+
Matrices can have many rows or columns (in fact, on a 64-bit
|
231
|
+
machine they could have up to `2^{63}-1` rows or columns)::
|
232
|
+
|
233
|
+
sage: v = matrix(CBF, 1, 10^5, range(10^5))
|
234
|
+
sage: v.parent()
|
235
|
+
Full MatrixSpace of 1 by 100000 dense matrices over
|
236
|
+
Complex ball field with 53 bits of precision
|
237
|
+
|
238
|
+
TESTS::
|
239
|
+
|
240
|
+
sage: MatrixSpace(CBF, 0, 0).one()
|
241
|
+
[]
|
242
|
+
sage: Matrix(CBF, 0, 100)
|
243
|
+
0 x 100 dense matrix over Complex ball field with 53 bits
|
244
|
+
of precision (use the '.str()' method to see the entries)
|
245
|
+
sage: Matrix(CBF, 100, 0)
|
246
|
+
100 x 0 dense matrix over Complex ball field with 53 bits
|
247
|
+
of precision (use the '.str()' method to see the entries)
|
248
|
+
"""
|
249
|
+
ma = MatrixArgs_init(parent, entries)
|
250
|
+
cdef ComplexBall z
|
251
|
+
for t in ma.iter(coerce, True):
|
252
|
+
se = <SparseEntry>t
|
253
|
+
z = <ComplexBall>se.entry
|
254
|
+
acb_set(acb_mat_entry(self.value, se.i, se.j), z.value)
|
255
|
+
|
256
|
+
cdef set_unsafe(self, Py_ssize_t i, Py_ssize_t j, object x):
|
257
|
+
"""
|
258
|
+
Set position ``i``, ``j`` of this matrix to ``x``.
|
259
|
+
|
260
|
+
The object ``x`` must be of type ``ComplexBall``.
|
261
|
+
|
262
|
+
INPUT:
|
263
|
+
|
264
|
+
- ``i`` -- row
|
265
|
+
|
266
|
+
- ``j`` -- column
|
267
|
+
|
268
|
+
- ``x`` -- must be ComplexBall! The value to set ``self[i,j]`` to.
|
269
|
+
|
270
|
+
EXAMPLES::
|
271
|
+
|
272
|
+
sage: a = matrix(CBF, 2, 3, range(6)); a
|
273
|
+
[ 0 1.000000000000000 2.000000000000000]
|
274
|
+
[3.000000000000000 4.000000000000000 5.000000000000000]
|
275
|
+
sage: a[0, 0] = 10
|
276
|
+
sage: a
|
277
|
+
[10.00000000000000 1.000000000000000 2.000000000000000]
|
278
|
+
[3.000000000000000 4.000000000000000 5.000000000000000]
|
279
|
+
"""
|
280
|
+
acb_set(acb_mat_entry(self.value, i, j), (<ComplexBall> x).value)
|
281
|
+
|
282
|
+
cdef get_unsafe(self, Py_ssize_t i, Py_ssize_t j):
|
283
|
+
"""
|
284
|
+
Return ``(i, j)`` entry of this matrix as a new ComplexBall.
|
285
|
+
|
286
|
+
.. warning::
|
287
|
+
|
288
|
+
This is very unsafe; it assumes ``i`` and ``j`` are in the right
|
289
|
+
range.
|
290
|
+
|
291
|
+
EXAMPLES::
|
292
|
+
|
293
|
+
sage: a = MatrixSpace(CBF, 3)(range(9)); a
|
294
|
+
[ 0 1.000000000000000 2.000000000000000]
|
295
|
+
[3.000000000000000 4.000000000000000 5.000000000000000]
|
296
|
+
[6.000000000000000 7.000000000000000 8.000000000000000]
|
297
|
+
sage: a[1, 2]
|
298
|
+
5.000000000000000
|
299
|
+
sage: a[4, 7]
|
300
|
+
Traceback (most recent call last):
|
301
|
+
...
|
302
|
+
IndexError: matrix index out of range
|
303
|
+
sage: a[-1, 0]
|
304
|
+
6.000000000000000
|
305
|
+
"""
|
306
|
+
cdef ComplexBall z = ComplexBall.__new__(ComplexBall)
|
307
|
+
z._parent = self._base_ring
|
308
|
+
acb_set(z.value, acb_mat_entry(self.value, i, j))
|
309
|
+
return z
|
310
|
+
|
311
|
+
cpdef _richcmp_(left, right, int op):
|
312
|
+
r"""
|
313
|
+
EXAMPLES::
|
314
|
+
|
315
|
+
sage: a = matrix(CBF, [[1,2],[3,4]])
|
316
|
+
sage: b = matrix(CBF, [[1,2],[3,4]])
|
317
|
+
sage: a == b
|
318
|
+
True
|
319
|
+
sage: a + 1/3 == b + 1/3
|
320
|
+
False
|
321
|
+
sage: a < b
|
322
|
+
Traceback (most recent call last):
|
323
|
+
...
|
324
|
+
TypeError: no order is defined on complex ball matrices
|
325
|
+
|
326
|
+
TESTS::
|
327
|
+
|
328
|
+
sage: a = matrix(CBF, [1/3])
|
329
|
+
sage: b = matrix(CBF, [1/3])
|
330
|
+
sage: a == a or b == b or a[0,0] == a[0,0] or a[0,0] == b[0,0]
|
331
|
+
False
|
332
|
+
"""
|
333
|
+
cdef Matrix_complex_ball_dense lt = <Matrix_complex_ball_dense> left
|
334
|
+
cdef Matrix_complex_ball_dense rt = <Matrix_complex_ball_dense> right
|
335
|
+
if op == Py_EQ:
|
336
|
+
return acb_mat_eq(lt.value, rt.value)
|
337
|
+
elif op == Py_NE:
|
338
|
+
return acb_mat_ne(lt.value, rt.value)
|
339
|
+
else:
|
340
|
+
raise TypeError("no order is defined on complex ball matrices")
|
341
|
+
|
342
|
+
def identical(self, Matrix_complex_ball_dense other):
|
343
|
+
r"""
|
344
|
+
Test if the corresponding entries of two complex ball matrices
|
345
|
+
represent the same balls.
|
346
|
+
|
347
|
+
EXAMPLES::
|
348
|
+
|
349
|
+
sage: a = matrix(CBF, [[1/3,2],[3,4]])
|
350
|
+
sage: b = matrix(CBF, [[1/3,2],[3,4]])
|
351
|
+
sage: a == b
|
352
|
+
False
|
353
|
+
sage: a.identical(b)
|
354
|
+
True
|
355
|
+
"""
|
356
|
+
return acb_mat_equal(self.value, other.value)
|
357
|
+
|
358
|
+
def overlaps(self, Matrix_complex_ball_dense other):
|
359
|
+
r"""
|
360
|
+
Test if two matrices with complex ball entries represent overlapping
|
361
|
+
sets of complex matrices.
|
362
|
+
|
363
|
+
EXAMPLES::
|
364
|
+
|
365
|
+
sage: b = CBF(0, RBF(0, rad=0.1r)); b
|
366
|
+
[+/- 0.101]*I
|
367
|
+
sage: matrix(CBF, [0, b]).overlaps(matrix(CBF, [b, 0]))
|
368
|
+
True
|
369
|
+
sage: matrix(CBF, [1, 0]).overlaps(matrix(CBF, [b, 0]))
|
370
|
+
False
|
371
|
+
"""
|
372
|
+
return acb_mat_overlaps(self.value, other.value)
|
373
|
+
|
374
|
+
def contains(self, Matrix_complex_ball_dense other):
|
375
|
+
r"""
|
376
|
+
Test if the set of complex matrices represented by ``self`` is
|
377
|
+
contained in that represented by ``other``.
|
378
|
+
|
379
|
+
EXAMPLES::
|
380
|
+
|
381
|
+
sage: b = CBF(0, RBF(0, rad=.1r)); b
|
382
|
+
[+/- 0.101]*I
|
383
|
+
sage: matrix(CBF, [0, b]).contains(matrix(CBF, [0, 0]))
|
384
|
+
True
|
385
|
+
sage: matrix(CBF, [0, b]).contains(matrix(CBF, [b, 0]))
|
386
|
+
False
|
387
|
+
sage: matrix(CBF, [b, b]).contains(matrix(CBF, [b, 0]))
|
388
|
+
True
|
389
|
+
"""
|
390
|
+
return acb_mat_contains(self.value, other.value)
|
391
|
+
|
392
|
+
def __neg__(self):
|
393
|
+
r"""
|
394
|
+
TESTS::
|
395
|
+
|
396
|
+
sage: -matrix(CBF, [[1,2]])
|
397
|
+
[-1.000000000000000 -2.000000000000000]
|
398
|
+
"""
|
399
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, self._ncols)
|
400
|
+
sig_on()
|
401
|
+
acb_mat_neg(res.value, self.value)
|
402
|
+
sig_off()
|
403
|
+
return res
|
404
|
+
|
405
|
+
cpdef _add_(self, other):
|
406
|
+
r"""
|
407
|
+
TESTS::
|
408
|
+
|
409
|
+
sage: matrix(CBF, [[1,2]])._add_(matrix(CBF, [3,4]))
|
410
|
+
[4.000000000000000 6.000000000000000]
|
411
|
+
"""
|
412
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, self._ncols)
|
413
|
+
sig_on()
|
414
|
+
acb_mat_add(res.value, self.value, (<Matrix_complex_ball_dense> other).value, prec(self))
|
415
|
+
sig_off()
|
416
|
+
return res
|
417
|
+
|
418
|
+
cpdef _sub_(self, other):
|
419
|
+
r"""
|
420
|
+
TESTS::
|
421
|
+
|
422
|
+
sage: matrix(CBF, [[1,2]])._sub_(matrix(CBF, [3,4]))
|
423
|
+
[-2.000000000000000 -2.000000000000000]
|
424
|
+
"""
|
425
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, self._ncols)
|
426
|
+
sig_on()
|
427
|
+
acb_mat_sub(res.value, self.value, (<Matrix_complex_ball_dense> other).value, prec(self))
|
428
|
+
sig_off()
|
429
|
+
return res
|
430
|
+
|
431
|
+
cpdef _lmul_(self, Element a):
|
432
|
+
r"""
|
433
|
+
TESTS::
|
434
|
+
|
435
|
+
sage: matrix(CBF, [[1,2]])._lmul_(CBF(I))
|
436
|
+
[1.000000000000000*I 2.000000000000000*I]
|
437
|
+
"""
|
438
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, self._ncols)
|
439
|
+
sig_on()
|
440
|
+
acb_mat_scalar_mul_acb(res.value, self.value, (<ComplexBall> a).value, prec(self))
|
441
|
+
sig_off()
|
442
|
+
return res
|
443
|
+
|
444
|
+
cpdef _rmul_(self, Element a):
|
445
|
+
r"""
|
446
|
+
TESTS::
|
447
|
+
|
448
|
+
sage: matrix(CBF, [[1,2]])._rmul_(CBF(I))
|
449
|
+
[1.000000000000000*I 2.000000000000000*I]
|
450
|
+
"""
|
451
|
+
return self._lmul_(a)
|
452
|
+
|
453
|
+
cdef _matrix_times_matrix_(self, Matrix other):
|
454
|
+
r"""
|
455
|
+
TESTS::
|
456
|
+
|
457
|
+
sage: matrix(CBF, [[1,2]])*matrix([[3], [4]]) # indirect doctest
|
458
|
+
[11.00000000000000]
|
459
|
+
"""
|
460
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, other._ncols)
|
461
|
+
sig_on()
|
462
|
+
acb_mat_mul(res.value, self.value, (<Matrix_complex_ball_dense> other).value, prec(self))
|
463
|
+
sig_off()
|
464
|
+
return res
|
465
|
+
|
466
|
+
cpdef _pow_int(self, n):
|
467
|
+
r"""
|
468
|
+
Return the ``n``-th power of this matrix.
|
469
|
+
|
470
|
+
EXAMPLES::
|
471
|
+
|
472
|
+
sage: mat = matrix(CBF, [[1/2, 1/3], [1, 1]])
|
473
|
+
sage: mat**2
|
474
|
+
[[0.5833333333333...] [0.500000000000000 +/- ...e-16]]
|
475
|
+
[ 1.500000000000000 [1.333333333333333 +/- ...e-16]]
|
476
|
+
sage: mat**(-2)
|
477
|
+
[ [48.00000000000...] [-18.00000000000...]]
|
478
|
+
[[-54.0000000000...] [21.000000000000...]]
|
479
|
+
|
480
|
+
TESTS::
|
481
|
+
|
482
|
+
sage: mat**(0r)
|
483
|
+
[1.000000000000000 0]
|
484
|
+
[ 0 1.000000000000000]
|
485
|
+
|
486
|
+
sage: mat**(1/2)
|
487
|
+
Traceback (most recent call last):
|
488
|
+
...
|
489
|
+
NotImplementedError: non-integral exponents not supported
|
490
|
+
|
491
|
+
sage: (-(matrix(CBF, [2])**(-2**100))[0,0].log(2)).log(2)
|
492
|
+
[100.000000000000 +/- ...e-14]
|
493
|
+
sage: (-(matrix(CBF, [2])**(-2**64+1))[0,0].log(2)).log(2)
|
494
|
+
[64.0000000000000 +/- ...e-14]
|
495
|
+
"""
|
496
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, self._ncols)
|
497
|
+
cdef Matrix_complex_ball_dense tmp
|
498
|
+
cdef unsigned long expo
|
499
|
+
n = Integer(n)
|
500
|
+
if self._nrows != self._ncols:
|
501
|
+
raise ArithmeticError("self must be a square matrix")
|
502
|
+
|
503
|
+
neg = (n < 0)
|
504
|
+
if neg:
|
505
|
+
n = -n
|
506
|
+
if mpz_fits_ulong_p((<Integer>n).value):
|
507
|
+
expo = mpz_get_ui((<Integer>n).value)
|
508
|
+
sig_on()
|
509
|
+
acb_mat_pow_ui(res.value, self.value, expo, prec(self))
|
510
|
+
sig_off()
|
511
|
+
else:
|
512
|
+
tmp = generic_power_pos(self, n)
|
513
|
+
acb_mat_set(res.value, tmp.value)
|
514
|
+
if neg:
|
515
|
+
sig_on()
|
516
|
+
acb_mat_inv(res.value, res.value, prec(self))
|
517
|
+
sig_off()
|
518
|
+
|
519
|
+
return res
|
520
|
+
|
521
|
+
def __invert__(self):
|
522
|
+
r"""
|
523
|
+
TESTS::
|
524
|
+
|
525
|
+
sage: ~matrix(CBF, [[1/2, 1/3], [1, 1]])
|
526
|
+
[ [6.00000000000000 +/- ...e-15] [-2.00000000000000 +/- ...e-15]]
|
527
|
+
[[-6.00000000000000 +/- ...e-15] [3.00000000000000 +/- ...e-15]]
|
528
|
+
sage: ~matrix(CBF, [[1/2, 1/3]])
|
529
|
+
Traceback (most recent call last):
|
530
|
+
...
|
531
|
+
ArithmeticError: self must be a square matrix
|
532
|
+
sage: mat = matrix(CBF, [[1/3, 1/2], [0, 1]]) - 1/3
|
533
|
+
sage: ~mat
|
534
|
+
Traceback (most recent call last):
|
535
|
+
...
|
536
|
+
ZeroDivisionError: unable to compute the inverse, is the matrix singular?
|
537
|
+
"""
|
538
|
+
if not self.is_square():
|
539
|
+
raise ArithmeticError("self must be a square matrix")
|
540
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, self._ncols)
|
541
|
+
sig_on()
|
542
|
+
cdef bint success = acb_mat_inv(res.value, self.value, prec(self))
|
543
|
+
sig_off()
|
544
|
+
if success:
|
545
|
+
return res
|
546
|
+
else:
|
547
|
+
raise ZeroDivisionError("unable to compute the inverse, is the matrix singular?")
|
548
|
+
|
549
|
+
def transpose(self):
|
550
|
+
r"""
|
551
|
+
Return the transpose of ``self``.
|
552
|
+
|
553
|
+
EXAMPLES::
|
554
|
+
|
555
|
+
sage: m = matrix(CBF, 2, 3, [1, 2, 3, 4, 5, 6])
|
556
|
+
sage: m.transpose()
|
557
|
+
[1.000000000000000 4.000000000000000]
|
558
|
+
[2.000000000000000 5.000000000000000]
|
559
|
+
[3.000000000000000 6.000000000000000]
|
560
|
+
sage: m.transpose().parent()
|
561
|
+
Full MatrixSpace of 3 by 2 dense matrices over Complex ball field with 53 bits of precision
|
562
|
+
"""
|
563
|
+
cdef Py_ssize_t nc = self._ncols
|
564
|
+
cdef Py_ssize_t nr = self._nrows
|
565
|
+
cdef Matrix_complex_ball_dense trans = self._new(nc, nr)
|
566
|
+
acb_mat_transpose(trans.value, self.value)
|
567
|
+
return trans
|
568
|
+
|
569
|
+
def _solve_right_nonsingular_square(self, Matrix_complex_ball_dense rhs, check_rank=None):
|
570
|
+
r"""
|
571
|
+
TESTS::
|
572
|
+
|
573
|
+
sage: matrix(CBF, [[1/2, 1/3], [1, 1]]).solve_right(vector([-1, 1]))
|
574
|
+
([-8.00000000000000 +/- ...], [9.00000000000000 +/- ...])
|
575
|
+
sage: matrix(CBF, 2, 2, 0).solve_right(vector([-1, 1]))
|
576
|
+
Traceback (most recent call last):
|
577
|
+
...
|
578
|
+
ValueError: unable to invert this matrix
|
579
|
+
sage: b = CBF(0, RBF(0, rad=.1r))
|
580
|
+
sage: matrix(CBF, [[1, 1], [0, b]]).solve_right(vector([-1, 1]))
|
581
|
+
Traceback (most recent call last):
|
582
|
+
...
|
583
|
+
ValueError: unable to invert this matrix
|
584
|
+
"""
|
585
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, rhs._ncols)
|
586
|
+
sig_on()
|
587
|
+
success = acb_mat_solve(res.value, self.value, rhs.value, min(prec(self), prec(rhs)))
|
588
|
+
sig_off()
|
589
|
+
if success:
|
590
|
+
return res
|
591
|
+
else:
|
592
|
+
raise ValueError("unable to invert this matrix")
|
593
|
+
|
594
|
+
def determinant(self):
|
595
|
+
r"""
|
596
|
+
Compute the determinant of this matrix.
|
597
|
+
|
598
|
+
EXAMPLES::
|
599
|
+
|
600
|
+
sage: matrix(CBF, [[1/2, 1/3], [1, 1]]).determinant()
|
601
|
+
[0.1666666666666667 +/- ...e-17]
|
602
|
+
sage: matrix(CBF, [[1/2, 1/3], [1, 1]]).det()
|
603
|
+
[0.1666666666666667 +/- ...e-17]
|
604
|
+
sage: matrix(CBF, [[1/2, 1/3]]).determinant()
|
605
|
+
Traceback (most recent call last):
|
606
|
+
...
|
607
|
+
ValueError: self must be a square matrix
|
608
|
+
"""
|
609
|
+
cdef ComplexBall res = ComplexBall.__new__(ComplexBall)
|
610
|
+
res._parent = self._base_ring
|
611
|
+
if self._nrows != self._ncols:
|
612
|
+
raise ValueError("self must be a square matrix")
|
613
|
+
sig_on()
|
614
|
+
acb_mat_det(res.value, self.value, prec(self))
|
615
|
+
sig_off()
|
616
|
+
return res
|
617
|
+
|
618
|
+
def trace(self):
|
619
|
+
r"""
|
620
|
+
Compute the trace of this matrix.
|
621
|
+
|
622
|
+
EXAMPLES::
|
623
|
+
|
624
|
+
sage: matrix(CBF, [[1/3, 1/3], [1, 1]]).trace()
|
625
|
+
[1.333333333333333 +/- ...e-16]
|
626
|
+
sage: matrix(CBF, [[1/2, 1/3]]).trace()
|
627
|
+
Traceback (most recent call last):
|
628
|
+
...
|
629
|
+
ValueError: self must be a square matrix
|
630
|
+
"""
|
631
|
+
cdef ComplexBall res = ComplexBall.__new__(ComplexBall)
|
632
|
+
res._parent = self._base_ring
|
633
|
+
if self._nrows != self._ncols:
|
634
|
+
raise ValueError("self must be a square matrix")
|
635
|
+
sig_on()
|
636
|
+
acb_mat_trace(res.value, self.value, prec(self))
|
637
|
+
sig_off()
|
638
|
+
return res
|
639
|
+
|
640
|
+
def charpoly(self, var='x', algorithm=None):
|
641
|
+
r"""
|
642
|
+
Compute the characteristic polynomial of this matrix.
|
643
|
+
|
644
|
+
EXAMPLES::
|
645
|
+
|
646
|
+
sage: from sage.matrix.benchmark import hilbert_matrix
|
647
|
+
sage: mat = hilbert_matrix(5).change_ring(ComplexBallField(10))
|
648
|
+
sage: mat.charpoly()
|
649
|
+
x^5 + ([-1.8 +/- 0.0258])*x^4 + ([0.3 +/- 0.05...)*x^3 +
|
650
|
+
([+/- 0.0...])*x^2 + ([+/- 0.0...])*x + [+/- 0.0...]
|
651
|
+
|
652
|
+
TESTS::
|
653
|
+
|
654
|
+
sage: mat.charpoly(algorithm='hessenberg')
|
655
|
+
x^5 + ([-1.8 +/- 0.04...])*x^4 + ([0.3 +/- 0.08...])*x^3
|
656
|
+
+ ([+/- 0.0...])*x^2 + ([+/- ...e-4])*x + [+/- ...e-6]
|
657
|
+
sage: mat.charpoly('y')
|
658
|
+
y^5 + ([-1.8 +/- 0.02...])*y^4 + ([0.3 +/- 0.05...])*y^3 +
|
659
|
+
([+/- 0.0...])*y^2 + ([+/- 0.0...])*y + [+/- 0.0...]
|
660
|
+
"""
|
661
|
+
if self._nrows != self._ncols:
|
662
|
+
raise ValueError("self must be a square matrix")
|
663
|
+
if algorithm is not None:
|
664
|
+
return super(Matrix_dense, self).charpoly(var=var, algorithm=algorithm)
|
665
|
+
Pol = polynomial_ring_constructor._single_variate(self.base_ring(), var)
|
666
|
+
cdef Polynomial_complex_arb res = Polynomial_complex_arb(Pol)
|
667
|
+
sig_on()
|
668
|
+
acb_mat_charpoly(res._poly, self.value, prec(self))
|
669
|
+
sig_off()
|
670
|
+
return res
|
671
|
+
|
672
|
+
@experimental(issue_number=30393)
|
673
|
+
def eigenvalues(self, other=None, *, extend=None):
|
674
|
+
r"""
|
675
|
+
(Experimental.) Compute rigorous enclosures of the eigenvalues of this matrix.
|
676
|
+
|
677
|
+
INPUT:
|
678
|
+
|
679
|
+
- ``self`` -- an `n \times n` matrix
|
680
|
+
- ``other`` -- unsupported (generalized eigenvalue problem), should be ``None``
|
681
|
+
- ``extend`` -- ignored
|
682
|
+
|
683
|
+
OUTPUT:
|
684
|
+
|
685
|
+
A :class:`~sage.structure.sequence.Sequence` of complex balls of
|
686
|
+
length equal to the size of the matrix.
|
687
|
+
|
688
|
+
Each element represents one eigenvalue with the correct multiplicities
|
689
|
+
in case of overlap. The output intervals are either disjoint or
|
690
|
+
identical, and identical intervals are guaranteed to be grouped
|
691
|
+
consecutively. Each complete run of `k` identical balls thus represents
|
692
|
+
a cluster of exactly `k` eigenvalues which could not be separated from
|
693
|
+
each other at the current precision, but which could be isolated from
|
694
|
+
the other eigenvalues.
|
695
|
+
|
696
|
+
There is currently no guarantee that the algorithm converges as the
|
697
|
+
working precision is increased.
|
698
|
+
|
699
|
+
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_eig_multiple>`__
|
700
|
+
for more information.
|
701
|
+
|
702
|
+
EXAMPLES::
|
703
|
+
|
704
|
+
sage: from sage.matrix.benchmark import hilbert_matrix
|
705
|
+
sage: mat = hilbert_matrix(5).change_ring(CBF)
|
706
|
+
sage: mat.eigenvalues()
|
707
|
+
doctest:...: FutureWarning: This class/method/function is marked as experimental.
|
708
|
+
...
|
709
|
+
[[1.567050691098...] + [+/- ...]*I, [0.208534218611...] + [+/- ...]*I,
|
710
|
+
[3.287928...e-6...] + [+/- ...]*I, [0.000305898040...] + [+/- ...]*I,
|
711
|
+
[0.011407491623...] + [+/- ...]*I]
|
712
|
+
|
713
|
+
sage: mat = Permutation([2, 1, 4, 5, 3]).to_matrix().dense_matrix().change_ring(CBF)
|
714
|
+
sage: mat.eigenvalues()
|
715
|
+
Traceback (most recent call last):
|
716
|
+
...
|
717
|
+
ValueError: unable to certify the eigenvalues
|
718
|
+
sage: precond = matrix(ZZ, [[-1, -2, 2, 2, -2], [2, -2, -2, -2, 2],
|
719
|
+
....: [-2, 2, -1, 2, 1], [2, 1, -1, 0, 2], [-2, 0, 1, -1, 1]])
|
720
|
+
sage: (~precond*mat*precond).eigenvalues()
|
721
|
+
[[-0.5000000000000...] + [-0.8660254037844...]*I, [-1.000000000000...] + [+/- ...]*I,
|
722
|
+
[-0.5000000000000...] + [0.8660254037844...]*I,
|
723
|
+
[1.000000000000...] + [+/- ...]*I, [1.000000000000...] + [+/- ...]*I]
|
724
|
+
|
725
|
+
.. SEEALSO:: :meth:`eigenvectors_right`
|
726
|
+
"""
|
727
|
+
if self._nrows != self._ncols:
|
728
|
+
raise ValueError("self must be a square matrix")
|
729
|
+
cdef long n = self._ncols
|
730
|
+
cdef acb_ptr eigval_approx, eigval
|
731
|
+
cdef acb_mat_t eigvec_approx
|
732
|
+
if other is not None:
|
733
|
+
raise NotImplementedError
|
734
|
+
try:
|
735
|
+
eigval_approx = _acb_vec_init(n)
|
736
|
+
acb_mat_init(eigvec_approx, n, n)
|
737
|
+
acb_mat_approx_eig_qr(eigval_approx, NULL, eigvec_approx, self.value, NULL, 0, prec(self))
|
738
|
+
eigval = _acb_vec_init(n)
|
739
|
+
if not acb_mat_eig_multiple(eigval, self.value, eigval_approx, eigvec_approx, prec(self)):
|
740
|
+
raise ValueError("unable to certify the eigenvalues")
|
741
|
+
res = _acb_vec_to_list(eigval, n, self._parent._base)
|
742
|
+
finally:
|
743
|
+
acb_mat_clear(eigvec_approx)
|
744
|
+
_acb_vec_clear(eigval, n)
|
745
|
+
_acb_vec_clear(eigval_approx, n)
|
746
|
+
return Sequence(res)
|
747
|
+
|
748
|
+
@experimental(issue_number=30393)
|
749
|
+
def eigenvectors_right_approx(self, other=None, *, extend=None):
|
750
|
+
r"""
|
751
|
+
(Experimental.) Compute *non-rigorous* approximations of the
|
752
|
+
eigenvalues and eigenvectors of this matrix.
|
753
|
+
|
754
|
+
INPUT:
|
755
|
+
|
756
|
+
- ``self`` -- an `n \times n` matrix
|
757
|
+
- ``other`` -- unsupported (generalized eigenvalue problem), should be ``None``
|
758
|
+
- ``extend`` -- ignored
|
759
|
+
|
760
|
+
OUTPUT:
|
761
|
+
|
762
|
+
A list of triples of the form ``(eigenvalue, [eigenvector], 1)``. The
|
763
|
+
eigenvalue and the entries of the eigenvector are complex balls with
|
764
|
+
zero radius.
|
765
|
+
|
766
|
+
No guarantees are made about the accuracy of the output.
|
767
|
+
|
768
|
+
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_approx_eig_qr>`__
|
769
|
+
for more information.
|
770
|
+
|
771
|
+
EXAMPLES::
|
772
|
+
|
773
|
+
sage: from sage.matrix.benchmark import hilbert_matrix
|
774
|
+
sage: mat = hilbert_matrix(3).change_ring(CBF)
|
775
|
+
sage: eigval, eigvec, _ = mat.eigenvectors_right_approx()[0]
|
776
|
+
doctest:...: FutureWarning: This class/method/function is marked as experimental.
|
777
|
+
...
|
778
|
+
sage: eigval
|
779
|
+
[1.40831892712...]
|
780
|
+
sage: eigval.rad()
|
781
|
+
0.00000000
|
782
|
+
sage: eigvec
|
783
|
+
[([0.8270449269720...], [0.4598639043655...], [0.3232984352444...])]
|
784
|
+
sage: (mat - eigval)*eigvec[0]
|
785
|
+
([1e-15 +/- ...], [2e-15 +/- ...], [+/- ...])
|
786
|
+
|
787
|
+
.. SEEALSO:: :meth:`eigenvectors_right`
|
788
|
+
"""
|
789
|
+
if self._nrows != self._ncols:
|
790
|
+
raise ValueError("self must be a square matrix")
|
791
|
+
cdef long n = self._ncols
|
792
|
+
cdef Matrix_complex_ball_dense eigvec = self._new(n, n)
|
793
|
+
cdef acb_ptr _eigval
|
794
|
+
if other is not None:
|
795
|
+
raise NotImplementedError
|
796
|
+
try:
|
797
|
+
_eigval = _acb_vec_init(n)
|
798
|
+
acb_mat_approx_eig_qr(_eigval, NULL, eigvec.value, self.value, NULL, 0, prec(self))
|
799
|
+
eigval = _acb_vec_to_list(_eigval, n, self._parent._base)
|
800
|
+
finally:
|
801
|
+
_acb_vec_clear(_eigval, n)
|
802
|
+
return [(val, [vec], 1) for val, vec in zip(eigval, eigvec.columns())]
|
803
|
+
|
804
|
+
@experimental(issue_number=30393)
|
805
|
+
def eigenvectors_right(self, other=None, *, extend=None):
|
806
|
+
r"""
|
807
|
+
(Experimental.) Compute rigorous enclosures of the eigenvalues and
|
808
|
+
eigenvectors of this matrix.
|
809
|
+
|
810
|
+
INPUT:
|
811
|
+
|
812
|
+
- ``self`` -- an `n \times n` matrix
|
813
|
+
- ``other`` -- unsupported (generalized eigenvalue problem), should be ``None``
|
814
|
+
- ``extend`` -- ignored
|
815
|
+
|
816
|
+
OUTPUT:
|
817
|
+
|
818
|
+
A list of triples of the form ``(eigenvalue, [eigenvector], 1)``.
|
819
|
+
|
820
|
+
Unlike :meth:`eigenvalues` and :meth:`eigenvectors_right_approx`, this
|
821
|
+
method currently fails in the presence of multiple eigenvalues.
|
822
|
+
|
823
|
+
Additionally, there is currently no guarantee that the algorithm
|
824
|
+
converges as the working precision is increased.
|
825
|
+
|
826
|
+
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_eig_simple>`__
|
827
|
+
for more information.
|
828
|
+
|
829
|
+
EXAMPLES::
|
830
|
+
|
831
|
+
sage: from sage.matrix.benchmark import hilbert_matrix
|
832
|
+
sage: mat = hilbert_matrix(3).change_ring(CBF)
|
833
|
+
sage: eigval, eigvec, _ = mat.eigenvectors_right()[0]
|
834
|
+
doctest:...: FutureWarning: This class/method/function is marked as experimental.
|
835
|
+
...
|
836
|
+
sage: eigval
|
837
|
+
[1.40831892712...] + [+/- ...]*I
|
838
|
+
sage: eigvec
|
839
|
+
[([0.82704492697...] + [+/- ...]*I, [0.45986390436...] + [+/- ...]*I, [0.32329843524...] + [+/- ...]*I)]
|
840
|
+
sage: (mat - eigval)*eigvec[0]
|
841
|
+
([+/- ...] + [+/- ...]*I, [+/- ...] + [+/- ...]*I, [+/- ...] + [+/- ...]*I)
|
842
|
+
|
843
|
+
.. SEEALSO:: :meth:`eigenvectors_right_approx`, :meth:`eigenvalues`
|
844
|
+
"""
|
845
|
+
if self._nrows != self._ncols:
|
846
|
+
raise ValueError("self must be a square matrix")
|
847
|
+
cdef long n = self._ncols
|
848
|
+
cdef acb_ptr eigval_approx, _eigval
|
849
|
+
cdef acb_mat_t eigvec_approx
|
850
|
+
cdef Matrix_complex_ball_dense eigvec = self._new(n, n)
|
851
|
+
if other is not None:
|
852
|
+
raise NotImplementedError
|
853
|
+
try:
|
854
|
+
_eigval = _acb_vec_init(n)
|
855
|
+
eigval_approx = _acb_vec_init(n)
|
856
|
+
acb_mat_init(eigvec_approx, n, n)
|
857
|
+
acb_mat_approx_eig_qr(eigval_approx, NULL, eigvec_approx, self.value, NULL, 0, prec(self))
|
858
|
+
if not acb_mat_eig_simple(_eigval, NULL, eigvec.value, self.value, eigval_approx, eigvec_approx, prec(self)):
|
859
|
+
raise ValueError("unable to isolate the eigenvalues (multiple eigenvalues?)")
|
860
|
+
eigval = _acb_vec_to_list(_eigval, n, self._parent._base)
|
861
|
+
finally:
|
862
|
+
acb_mat_clear(eigvec_approx)
|
863
|
+
_acb_vec_clear(_eigval, n)
|
864
|
+
_acb_vec_clear(eigval_approx, n)
|
865
|
+
return [(val, [vec], 1) for val, vec in zip(eigval, eigvec.columns())]
|
866
|
+
|
867
|
+
def eigenvectors_left_approx(self, other=None, *, extend=None):
|
868
|
+
r"""
|
869
|
+
(Experimental.) Compute *non-rigorous* approximations of the
|
870
|
+
left eigenvalues and eigenvectors of this matrix.
|
871
|
+
|
872
|
+
INPUT:
|
873
|
+
|
874
|
+
- ``self`` -- an `n \times n` matrix
|
875
|
+
- ``other`` -- unsupported (generalized eigenvalue problem), should be ``None``
|
876
|
+
- ``extend`` -- ignored
|
877
|
+
|
878
|
+
OUTPUT:
|
879
|
+
|
880
|
+
A list of triples of the form ``(eigenvalue, [eigenvector], 1)``. The
|
881
|
+
eigenvalue and the entries of the eigenvector are complex balls with
|
882
|
+
zero radius.
|
883
|
+
|
884
|
+
No guarantees are made about the accuracy of the output.
|
885
|
+
|
886
|
+
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_approx_eig_qr>`__
|
887
|
+
for more information.
|
888
|
+
|
889
|
+
EXAMPLES::
|
890
|
+
|
891
|
+
sage: mat = matrix(CBF, 3, [2, 3, 5, 7, 11, 13, 17, 19, 23])
|
892
|
+
sage: eigval, eigvec, _ = mat.eigenvectors_left_approx()[0]
|
893
|
+
sage: eigval
|
894
|
+
[1.1052996349... +/- ...]
|
895
|
+
sage: eigvec[0]
|
896
|
+
([0.69817246751...], [-0.67419514369...], [0.240865343781...])
|
897
|
+
sage: eigvec[0] * (mat - eigval)
|
898
|
+
([+/- ...], [+/- ...], [+/- ...])
|
899
|
+
|
900
|
+
.. SEEALSO:: :meth:`eigenvectors_left`
|
901
|
+
"""
|
902
|
+
return self.transpose().eigenvectors_right_approx(other=None, extend=extend)
|
903
|
+
|
904
|
+
def eigenvectors_left(self, other=None, *, extend=True):
|
905
|
+
r"""
|
906
|
+
(Experimental.) Compute rigorous enclosures of the eigenvalues and
|
907
|
+
left eigenvectors of this matrix.
|
908
|
+
|
909
|
+
INPUT:
|
910
|
+
|
911
|
+
- ``self`` -- an `n \times n` matrix
|
912
|
+
- ``other`` -- unsupported (generalized eigenvalue problem), should be ``None``
|
913
|
+
- ``extend`` -- ignored
|
914
|
+
|
915
|
+
OUTPUT:
|
916
|
+
|
917
|
+
A list of triples of the form ``(eigenvalue, [eigenvector], 1)``.
|
918
|
+
|
919
|
+
Unlike :meth:`eigenvalues` and :meth:`eigenvectors_left_approx`, this
|
920
|
+
method currently fails in the presence of multiple eigenvalues.
|
921
|
+
|
922
|
+
Additionally, there is currently no guarantee that the algorithm
|
923
|
+
converges as the working precision is increased.
|
924
|
+
|
925
|
+
See the `FLINT documentation <https://flintlib.org/doc/acb_mat.html#c.acb_mat_eig_simple>`__
|
926
|
+
for more information.
|
927
|
+
|
928
|
+
EXAMPLES::
|
929
|
+
|
930
|
+
sage: mat = matrix(CBF, 3, [2, 3, 5, 7, 11, 13, 17, 19, 23])
|
931
|
+
sage: eigval, eigvec, _ = mat.eigenvectors_left()[0]
|
932
|
+
sage: eigval
|
933
|
+
[1.1052996349...] + [+/- ...]*I
|
934
|
+
sage: eigvec[0]
|
935
|
+
([0.69817246751...] + [+/- ...]*I, [-0.67419514369...] + [+/- ...]*I, [0.240865343781...] + [+/- ...]*I)
|
936
|
+
sage: eigvec[0] * (mat - eigval)
|
937
|
+
([+/- ...] + [+/- ...]*I, [+/- ...] + [+/- ...]*I, [+/- ...] + [+/- ...]*I)
|
938
|
+
|
939
|
+
.. SEEALSO:: :meth:`eigenvectors_right`, :meth:`eigenvalues`, :meth:`eigenvectors_left_approx`
|
940
|
+
"""
|
941
|
+
return self.transpose().eigenvectors_right(other=other, extend=extend)
|
942
|
+
|
943
|
+
def exp(self):
|
944
|
+
r"""
|
945
|
+
Compute the exponential of this matrix.
|
946
|
+
|
947
|
+
EXAMPLES::
|
948
|
+
|
949
|
+
sage: matrix(CBF, [[i*pi, 1], [0, i*pi]]).exp() # needs sage.symbolic
|
950
|
+
[[-1.00000000000000 +/- ...e-16] + [+/- ...e-16]*I [-1.00000000000000 +/- ...e-16] + [+/- ...e-16]*I]
|
951
|
+
[ 0 [-1.00000000000000 +/- ...e-16] + [+/- ...e-16]*I]
|
952
|
+
sage: matrix(CBF, [[1/2, 1/3]]).exp()
|
953
|
+
Traceback (most recent call last):
|
954
|
+
...
|
955
|
+
ValueError: self must be a square matrix
|
956
|
+
"""
|
957
|
+
cdef Matrix_complex_ball_dense res = self._new(self._nrows, self._ncols)
|
958
|
+
if self._nrows != self._ncols:
|
959
|
+
raise ValueError("self must be a square matrix")
|
960
|
+
sig_on()
|
961
|
+
acb_mat_exp(res.value, self.value, prec(self))
|
962
|
+
sig_off()
|
963
|
+
return res
|
964
|
+
|
965
|
+
cdef _acb_vec_to_list(acb_ptr vec, long n, Parent parent):
|
966
|
+
cdef ComplexBall b
|
967
|
+
res = []
|
968
|
+
for i in range(n):
|
969
|
+
b = ComplexBall.__new__(ComplexBall)
|
970
|
+
b._parent = parent
|
971
|
+
acb_set(b.value, &vec[i])
|
972
|
+
res.append(b)
|
973
|
+
return res
|