├── sage ├── ext │ ├── __init__.py │ ├── interpreters │ │ └── __init__.py │ ├── solaris_fixes.h │ ├── fast_callable.pxd │ ├── multi_modular.h │ └── pthread.pxi ├── groups │ ├── __init__.py │ ├── abelian_gps │ │ └── __init__.py │ ├── matrix_gps │ │ ├── __init__.py │ │ └── all.py │ ├── perm_gps │ │ ├── __init__.py │ │ ├── partn_ref │ │ │ └── __init__.py │ │ └── permgroup_element.pxd │ ├── additive_abelian │ │ ├── __init__.py │ │ └── all.py │ ├── group.pxd │ └── all.py ├── gsl │ ├── stdio.pxi │ ├── __init__.py │ ├── README.txt │ ├── gsl_elljac.pxi │ ├── gsl_dawson.pxi │ ├── gsl_clausen.pxi │ ├── ode.pxd │ ├── gsl_pow_int.pxi │ ├── gsl_mode.pxi │ ├── gsl_elementary.pxi │ ├── gsl_sf_result.pxi │ ├── gsl_dilog.pxi │ ├── gsl_array.pxd │ ├── dwt.pxd │ ├── gsl_lambert.pxi │ ├── gsl_synchrotron.pxi │ ├── interpolation.pxd │ ├── fft.pxd │ ├── gsl_diff.pxi │ ├── callback.pyx │ ├── gsl_debye.pxi │ ├── gsl_transport.pxi │ ├── gsl_zeta.pxi │ ├── gsl_psi.pxi │ ├── gsl_log.pxi │ ├── math.pxi │ ├── gsl_laguerre.pxi │ ├── all.py │ ├── gsl_qrng.pxi │ └── gsl_erf.pxi ├── libs │ ├── __init__.py │ ├── flint │ │ ├── __init__.py │ │ ├── flint.pxd │ │ ├── flint.pyx │ │ ├── fmpz_poly.pxd │ │ ├── ntl_interface.pxd │ │ └── fmpz.pxi │ ├── fplll │ │ ├── __init__.py │ │ └── fplll.pxd │ ├── linbox │ │ └── __init__.py │ ├── pari │ │ ├── misc.pxi │ │ ├── to_gen.pxi │ │ ├── __init__.py │ │ ├── gen.pxi │ │ ├── pari_err.pxi │ │ └── all.py │ ├── gmp │ │ ├── __init__.py │ │ └── all.pxd │ ├── lrcalc │ │ └── __init__.py │ ├── mpmath │ │ ├── __init__.py │ │ ├── ext_main.pxd │ │ └── utils.pxd │ ├── mwrank │ │ ├── __init__.py │ │ └── mwrank_embed.h │ ├── ntl │ │ ├── __init__.py │ │ ├── ntl_GF2.pxd │ │ ├── ntl_GF2X.pxd │ │ ├── ntl_vec_ZZ_pE_decl.pxd │ │ ├── ntl_vec_ZZ_p_decl.pxd │ │ ├── ntl_mat_ZZ.pxd │ │ ├── ntl_ZZ.pxd │ │ ├── ntl_lzz_pContext.pxd │ │ ├── ntl_ZZX.pxd │ │ ├── ntl_mat_GF2.pxd │ │ ├── ntl_GF2E.pxd │ │ ├── ntl_GF2EContext.pxd │ │ ├── ntl_ZZ_pEContext.pxd │ │ ├── ntl_GF2EX.pxd │ │ ├── ntl_mat_GF2E.pxd │ │ ├── ntl_ZZ_p.pxd │ │ ├── ntl_lzz_p.pxd │ │ ├── ntl_ZZ_pEX.pxd │ │ ├── ntl_ZZ_pE.pxd │ │ ├── ntl_lzz_pX.pxd │ │ ├── ntl_ZZ_pContext.pxd │ │ ├── ntl_ZZ_pX.pxd │ │ ├── ntl_ZZ_pContext_decl.pxd │ │ └── ntl_lzz_pContext_decl.pxd │ ├── cremona │ │ ├── __init__.py │ │ └── all.py │ ├── symmetrica │ │ ├── __init__.py │ │ └── symmetrica.pyx │ ├── lcalc │ │ └── __init__.py │ ├── polybori │ │ └── __init__.py │ ├── singular │ │ ├── singular.pxi │ │ ├── __init__.py │ │ └── decl.pxd │ └── all.py ├── misc │ ├── __init__.py │ ├── test_cpickle_sage.py │ ├── misc_c.pxd │ ├── proof.py │ ├── nested_class.pxd │ ├── allocator.pxd │ ├── darwin_memory_usage.h │ ├── copying.py │ ├── attach.py │ ├── refcount.pyx │ ├── randstate.pxd │ └── classcall_metaclass.pxd ├── server │ ├── __init__.py │ ├── nodoctest.py │ ├── simple │ │ ├── __init__.py │ │ └── nodoctest.py │ ├── notebook │ │ ├── __init__.py │ │ ├── compress │ │ │ ├── all.py │ │ │ ├── nodoctest.py │ │ │ └── __init__.py │ │ ├── nodoctest.py │ │ └── templates │ │ │ ├── notebook │ │ │ ├── doc_page.html │ │ │ ├── debug_window.html │ │ │ ├── plain_text_worksheet.html │ │ │ └── user_controls.tmpl │ │ │ ├── worksheet │ │ │ ├── time_last_edited.html │ │ │ ├── time_since_last_edited.html │ │ │ ├── attached.html │ │ │ ├── published_worksheet.html │ │ │ └── save_discard_buttons.html │ │ │ ├── template_error.html │ │ │ ├── search.html │ │ │ ├── yes_no.html │ │ │ ├── error_message.html │ │ │ ├── list_top.html │ │ │ ├── command_history.html │ │ │ ├── banner.html │ │ │ ├── base_authenticated.html │ │ │ ├── history.html │ │ │ └── base.html │ ├── trac │ │ ├── __init__.py │ │ └── all.py │ └── all.py ├── sets │ ├── __init__.py │ └── all.py ├── algebras │ ├── __init__.py │ ├── steenrod │ │ ├── __init__.py │ │ └── all.py │ └── quatalg │ │ ├── all.py │ │ └── __init__.py ├── combinat │ ├── __init__.py │ ├── sf │ │ └── __init__.py │ ├── root_system │ │ ├── type_None.py │ │ ├── __init__.py │ │ └── all.py │ ├── species │ │ ├── __init__.py │ │ └── all.py │ ├── words │ │ ├── __init__.py │ │ └── all.py │ ├── matrices │ │ ├── __init__.py │ │ └── all.py │ ├── debruijn_sequence.pxd │ ├── posets │ │ └── __init__.py │ ├── iet │ │ ├── __init__.py │ │ └── all.py │ ├── permutation_cython.pxd │ ├── combinat_cython.pxd │ ├── designs │ │ ├── __init__.py │ │ └── all.py │ ├── crystals │ │ ├── __init__.py │ │ └── all.py │ ├── partitions_c.h │ ├── family.py │ └── enumeration_mod_permgroup.pxd ├── databases │ └── __init__.py ├── interfaces │ ├── __init__.py │ └── notes │ │ └── mayr-groebner_examples.txt ├── modular │ ├── __init__.py │ ├── hecke │ │ ├── __init__.py │ │ └── all.py │ ├── modsym │ │ ├── __init__.py │ │ ├── solaris_fix.h │ │ ├── apply.pxd │ │ └── all.py │ ├── local_comp │ │ ├── __init__.py │ │ └── all.py │ ├── abvar │ │ ├── __init__.py │ │ └── all.py │ ├── modform │ │ ├── __init__.py │ │ ├── defaults.py │ │ └── periods.py │ ├── ssmod │ │ ├── __init__.py │ │ └── all.py │ ├── overconvergent │ │ ├── __init__.py │ │ └── all.py │ ├── quatalg │ │ ├── all.py │ │ └── __init__.py │ ├── arithgroup │ │ └── __init__.py │ └── congroup_element.py ├── modules │ ├── __init__.py │ ├── fg_pid │ │ └── __init__.py │ ├── module.pxd │ ├── vector_real_double_dense.pxd │ ├── vector_complex_double_dense.pxd │ ├── vector_modn_sparse_h.pxi │ ├── module_element.py │ ├── vector_integer_dense.pxd │ ├── vector_rational_dense.pxd │ ├── vector_mod2_dense.pxd │ ├── vector_modn_dense.pxd │ ├── vector_integer_sparse_h.pxi │ ├── vector_rational_sparse_h.pxi │ ├── free_module_element.pxd │ ├── vector_double_dense.pxd │ └── real_double_vector.py ├── plot │ ├── plot3d │ │ ├── __init__.py │ │ ├── base.pxd │ │ ├── examples.py │ │ ├── parametric_surface.pxd │ │ ├── help.pyx │ │ ├── transform.pxd │ │ └── shapes.pxd │ └── __init__.py ├── rings │ ├── __init__.py │ ├── function_field │ │ ├── __init__.py │ │ └── all.py │ ├── number_field │ │ ├── __init__.py │ │ └── number_field_base.pxd │ ├── notes │ │ └── multi-polynomial_nonsense.txt │ ├── semirings │ │ ├── __init__.py │ │ └── all.py │ ├── padics │ │ ├── __init__.py │ │ ├── padic_generic_element.pxi │ │ ├── local_generic_element.pxd │ │ ├── padic_ZZ_pX_element.pxd │ │ ├── all.py │ │ ├── padic_base_generic_element.pxd │ │ ├── padic_ZZ_pX_FM_element.pxd │ │ └── pow_computer.pxd │ ├── real_double.pxi │ ├── polynomial │ │ ├── __init__.py │ │ ├── padics │ │ │ └── __init__.py │ │ ├── multi_polynomial.pxd │ │ ├── symmetric_reduction.pxd │ │ ├── multi_polynomial_ideal_libsingular.pxd │ │ ├── polynomial_gf2x.pxd │ │ ├── polynomial_zz_pex.pxd │ │ ├── polynomial_template_header.pxi │ │ ├── polynomial_integer_dense_ntl.pxd │ │ ├── multi_polynomial_ring_generic.pxd │ │ ├── laurent_polynomial.pxd │ │ ├── polydict.pxd │ │ ├── polynomial_integer_dense_flint.pxd │ │ └── polynomial_zmod_flint.pxd │ ├── finite_rings │ │ ├── __init__.py │ │ ├── element_base.pxd │ │ ├── stdint.h │ │ └── finite_field_base.pxd │ ├── integer_ring_python.py │ ├── rational.pxi │ ├── laurent_series_ring_element.pxd │ ├── power_series_poly.pxd │ ├── power_series_mpoly.pxd │ ├── bernmm │ │ └── README2.txt │ ├── solaris_fix.h │ ├── integer_ring.pxd │ ├── power_series_ring_element.pxd │ ├── complex_number.pxd │ ├── rational.pxd │ ├── complex_mpc.pxd │ ├── complex_interval.pxd │ ├── real_double.pxd │ └── real_interval_field.py ├── schemes │ ├── __init__.py │ ├── elliptic_curves │ │ └── __init__.py │ ├── generic │ │ ├── __init__.py │ │ ├── notes │ │ │ └── homset.txt │ │ └── all.py │ ├── toric │ │ ├── __init__.py │ │ └── all.py │ ├── jacobians │ │ ├── __init__.py │ │ ├── all.py │ │ └── notes.txt │ ├── plane_conics │ │ └── __init__.py │ ├── plane_curves │ │ └── __init__.py │ ├── plane_quartics │ │ ├── __init__.py │ │ └── all.py │ └── hyperelliptic_curves │ │ ├── __init__.py │ │ ├── all.py │ │ ├── hypellfrob │ │ └── README │ │ └── hyperelliptic_g2_finite_field.py ├── homology │ ├── __init__.py │ └── all.py ├── __init__.py ├── coding │ ├── __init__.py │ └── source_coding │ │ ├── __init__.py │ │ └── all.py ├── geometry │ ├── polyhedron │ │ ├── __init__.py │ │ └── all.py │ ├── __init__.py │ ├── triangulation │ │ ├── __init__.py │ │ ├── all.py │ │ ├── functions.pxd │ │ ├── functions.h │ │ ├── data.pxd │ │ ├── triangulations.pxd │ │ └── functions.cc │ ├── polyhedra.py │ └── all.py ├── media │ ├── __init__.py │ └── all.py ├── stats │ ├── __init__.py │ ├── hmm │ │ ├── __init__.py │ │ ├── util.pxd │ │ └── hmm.pxd │ ├── test.py │ ├── all.py │ └── intlist.pxd ├── tensor │ ├── __init__.py │ └── all.py ├── tests │ ├── __init__.py │ ├── french_book │ │ ├── README │ │ └── __init__.py │ ├── all.py │ └── startup.py ├── calculus │ ├── __init__.py │ └── todo.txt ├── categories │ ├── examples │ │ ├── __init__.py │ │ └── coxeter_groups.py │ ├── functor.pxd │ ├── category_singleton.pxd │ ├── morphism.pxd │ └── action.pxd ├── functions │ └── __init__.py ├── graphs │ ├── base │ │ ├── __init__.py │ │ ├── all.py │ │ └── static_sparse_graph.pxd │ ├── __init__.py │ ├── modular_decomposition │ │ └── __init__.py │ ├── graph_decompositions │ │ └── __init__.py │ ├── distances_all_pairs.pxd │ ├── trees.pxd │ └── convexity_properties.pxd ├── interacts │ ├── __init__.py │ └── statistics.py ├── lfunctions │ ├── __init__.py │ └── all.py ├── monoids │ └── __init__.py ├── numerical │ ├── __init__.py │ ├── backends │ │ └── __init__.py │ └── all.py ├── probability │ ├── __init__.py │ └── all.py ├── sandpiles │ ├── __init__.py │ └── all.py ├── logic │ ├── all.py │ └── __init__.py ├── quadratic_forms │ ├── __init__.py │ ├── genera │ │ ├── __init__.py │ │ └── all.py │ └── all.py ├── structure │ ├── proof │ │ └── __init__.py │ ├── sage_object.pxd │ ├── __init__.py │ ├── element_py.py │ ├── coerce_dict.pxd │ ├── wrapper_parent.pxd │ ├── parent_base.pxd │ ├── coerce_maps.pxd │ ├── coerce_actions.pxd │ ├── mutability.pxd │ └── nonexact.py ├── crypto │ ├── block_cipher │ │ ├── __init__.py │ │ └── all.py │ ├── public_key │ │ ├── __init__.py │ │ └── all.py │ ├── __init__.py │ ├── mq │ │ └── __init__.py │ └── all.py ├── symbolic │ ├── __init__.py │ ├── integration │ │ └── __init__.py │ ├── constants_c.pxd │ ├── getitem.pxd │ ├── all.py │ ├── expression.pxd │ └── pynac_cc.h ├── games │ ├── __init__.py │ └── all.py ├── parallel │ ├── all.py │ └── __init__.py ├── finance │ ├── __init__.py │ ├── time_series.pxd │ └── all.py ├── version.py └── matrix │ ├── matrix1.pxd │ ├── __init__.py │ ├── matrix_domain_dense.pxd │ ├── matrix_sparse.pxd │ ├── matrix_domain_sparse.pxd │ ├── matrix_domain_sparse.pyx │ ├── matrix_generic_dense.pxd │ ├── matrix_symbolic_dense.pxd │ ├── template.pxd │ ├── matrix_dense.pxd │ ├── matrix_generic_sparse.pxd │ ├── matrix_complex_double_dense.pxd │ ├── matrix_window_modn_dense.pxd │ ├── matrix_modn_dense_double.pxd │ ├── matrix_modn_dense_float.pxd │ ├── matrix_real_double_dense.pxd │ ├── matrix_mpolynomial_dense.pxd │ ├── matrix_modn_sparse.pxd │ ├── matrix_integer_2x2.pxd │ ├── all.py │ ├── matrix_integer_sparse.pxd │ ├── matrix_rational_sparse.pxd │ ├── matrix_double_dense.pxd │ ├── action.pxd │ ├── matrix_cyclo_dense.pxd │ ├── matrix.pxd │ ├── matrix_mod2_dense.pxd │ ├── matrix_modn_dense_template_header.pxi │ └── matrix_mod2e_dense.pxd ├── doc ├── common │ ├── __init__.py │ ├── themes │ │ └── sage │ │ │ └── static │ │ │ ├── favicon.ico │ │ │ ├── sageicon.png │ │ │ └── sagelogo.png │ ├── update-python-inv.sh │ └── build_options.py ├── en │ ├── introspect │ │ ├── __init__.py │ │ ├── static │ │ │ └── empty │ │ ├── templates │ │ │ └── layout.html │ │ └── conf.py │ ├── bordeaux_2008 │ │ ├── birch.png │ │ ├── modpcurve.png │ │ ├── number_fields.rst │ │ ├── birds_eye_view.rst │ │ ├── index.rst │ │ └── modular_forms.rst │ ├── website │ │ ├── static │ │ │ └── pdf.png │ │ └── index.rst │ ├── a_tour_of_sage │ │ ├── sin_plot.png │ │ └── eigen_plot.png │ ├── thematic_tutorials │ │ └── media │ │ │ ├── 1.png │ │ │ ├── KR_A.png │ │ │ ├── KR_B.png │ │ │ ├── KR_C.png │ │ │ ├── KR_D.png │ │ │ ├── wcf1.png │ │ │ ├── KR_E6.png │ │ │ ├── a1box.png │ │ │ ├── a1tag.png │ │ │ ├── a2box.png │ │ │ ├── a2rho.png │ │ │ ├── a2tag.png │ │ │ ├── ab2tag.png │ │ │ ├── b2box.png │ │ │ ├── stand-a.png │ │ │ ├── stand-b.png │ │ │ ├── stand-c.png │ │ │ ├── stand-d.png │ │ │ ├── stand-g.png │ │ │ ├── tensor.png │ │ │ ├── lp_flot1.png │ │ │ ├── lp_flot2.png │ │ │ ├── standard1.png │ │ │ ├── tableau1.png │ │ │ ├── tableau2.png │ │ │ ├── tableau3.png │ │ │ ├── tableau4.png │ │ │ ├── tableaux.png │ │ │ ├── KR_Atwisted.png │ │ │ ├── KR_Atwisted1.png │ │ │ ├── KR_Dtwisted.png │ │ │ ├── a2rho_color.png │ │ │ ├── sandpile │ │ │ ├── C_6.png │ │ │ ├── btw.png │ │ │ ├── example1.png │ │ │ ├── initial.png │ │ │ ├── random.png │ │ │ └── C_6-parallel.png │ │ │ ├── KR_Atwisted_dual.png │ │ │ ├── KR_C_exceptional.png │ │ │ └── KR_Dtwisted_exceptional.png │ ├── reference │ │ ├── media │ │ │ ├── homology │ │ │ │ ├── rp2.png │ │ │ │ ├── klein.png │ │ │ │ ├── torus.png │ │ │ │ ├── simplices.png │ │ │ │ └── torus_labelled.png │ │ │ ├── heawood-graph-latex.png │ │ │ └── modular │ │ │ │ └── arithgroup │ │ │ │ └── pairing.png │ │ ├── logic.rst │ │ ├── constants.rst │ │ ├── semirings.rst │ │ ├── probability.rst │ │ ├── tensor.rst │ │ ├── finance.rst │ │ ├── quat_algebras.rst │ │ ├── coding.rst │ │ ├── games.rst │ │ ├── stats.rst │ │ ├── combinat │ │ │ ├── designs.rst │ │ │ ├── tableaux.rst │ │ │ ├── posets.rst │ │ │ ├── iet.rst │ │ │ ├── developer.rst │ │ │ ├── algebra.rst │ │ │ ├── crystals.rst │ │ │ └── words.rst │ │ ├── polynomial_rings_laurent.rst │ │ ├── lfunctions.rst │ │ ├── parallel.rst │ │ ├── polynomial_rings_toy_implementations.rst │ │ ├── polynomial_rings_infinite.rst │ │ ├── quadratic_forms.rst │ │ ├── cmd.rst │ │ ├── functions.rst │ │ ├── function_fields.rst │ │ ├── todolist.rst │ │ ├── rings_standard.rst │ │ ├── power_series.rst │ │ ├── monoids.rst │ │ ├── rings.rst │ │ ├── polynomial_rings.rst │ │ ├── algebras.rst │ │ ├── plot3d.rst │ │ ├── modabvar.rst │ │ ├── other │ │ │ └── sagetex.rst │ │ ├── cryptography.rst │ │ ├── numerical.rst │ │ ├── modsym.rst │ │ ├── modmisc.rst │ │ ├── modules.rst │ │ └── calculus.rst │ └── numerical_sage │ │ ├── parallel_computation.rst │ │ └── installation.rst ├── fr │ └── a_tour_of_sage │ │ ├── sin_plot.png │ │ └── eigen_plot.png └── tr │ └── a_tour_of_sage │ ├── sin_plot.png │ └── eigen_plot.png ├── README.txt ├── pull ├── sage-push ├── c_lib └── include │ ├── mpz_longlong.h │ ├── convert.h │ ├── mpz_pylong.h │ └── gmp_globals.h ├── export └── install /sage/ext/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/groups/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/gsl/stdio.pxi: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/libs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/misc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/server/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/sets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/common/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/algebras/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/combinat/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/databases/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/interfaces/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/libs/flint/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/libs/fplll/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/libs/linbox/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/libs/pari/misc.pxi: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/libs/pari/to_gen.pxi: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/modular/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/plot/plot3d/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/rings/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/schemes/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/homology/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/libs/gmp/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/misc/test_cpickle_sage.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/modular/hecke/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/modular/modsym/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/server/nodoctest.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/server/simple/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/en/introspect/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /doc/en/introspect/static/empty: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = ['all'] 2 | -------------------------------------------------------------------------------- /sage/coding/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/combinat/sf/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/ext/interpreters/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/geometry/polyhedron/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/groups/abelian_gps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/groups/matrix_gps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/gsl/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/libs/lrcalc/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/libs/mpmath/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/media/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/modular/local_comp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/modules/fg_pid/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/plot/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/rings/function_field/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/rings/number_field/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/server/notebook/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/server/notebook/compress/all.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/server/notebook/nodoctest.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/server/simple/nodoctest.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/stats/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/tensor/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/tests/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | This is the SAGE source install. -------------------------------------------------------------------------------- /sage/calculus/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/categories/examples/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/functions/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/geometry/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/graphs/base/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/interacts/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/lfunctions/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/libs/mwrank/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/libs/ntl/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/libs/pari/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/monoids/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/numerical/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/probability/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/sandpiles/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/schemes/elliptic_curves/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/server/trac/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/stats/hmm/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/combinat/root_system/type_None.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/combinat/species/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/combinat/words/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/graphs/__init__.py: -------------------------------------------------------------------------------- 1 | import dot2tex_utils 2 | -------------------------------------------------------------------------------- /sage/groups/perm_gps/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/groups/perm_gps/partn_ref/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/libs/cremona/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/libs/symmetrica/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/logic/all.py: -------------------------------------------------------------------------------- 1 | from logic import SymbolicLogic -------------------------------------------------------------------------------- /sage/modular/abvar/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/modular/modform/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/modular/ssmod/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/quadratic_forms/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/rings/notes/multi-polynomial_nonsense.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sage/rings/semirings/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/schemes/generic/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/schemes/toric/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/server/notebook/compress/nodoctest.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sage/structure/proof/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/algebras/steenrod/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/coding/source_coding/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/combinat/matrices/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/crypto/block_cipher/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/crypto/public_key/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/media/all.py: -------------------------------------------------------------------------------- 1 | from wav import Wave as wave 2 | -------------------------------------------------------------------------------- /sage/schemes/jacobians/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/schemes/plane_conics/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/schemes/plane_curves/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/server/trac/all.py: -------------------------------------------------------------------------------- 1 | from trac import trac 2 | -------------------------------------------------------------------------------- /sage/symbolic/__init__.py: -------------------------------------------------------------------------------- 1 | #this file is not empty 2 | -------------------------------------------------------------------------------- /sage/games/__init__.py: -------------------------------------------------------------------------------- 1 | # init file 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/geometry/triangulation/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/groups/additive_abelian/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/libs/pari/gen.pxi: -------------------------------------------------------------------------------- 1 | cdef extern gen (pari(object )) 2 | -------------------------------------------------------------------------------- /sage/quadratic_forms/genera/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/schemes/plane_quartics/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/server/notebook/compress/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/libs/mpmath/ext_main.pxd: -------------------------------------------------------------------------------- 1 | from ext_impl cimport * 2 | 3 | -------------------------------------------------------------------------------- /sage/numerical/backends/__init__.py: -------------------------------------------------------------------------------- 1 | # not an empty file 2 | -------------------------------------------------------------------------------- /sage/rings/padics/__init__.py: -------------------------------------------------------------------------------- 1 | # padic initialization file 2 | -------------------------------------------------------------------------------- /sage/schemes/hyperelliptic_curves/__init__.py: -------------------------------------------------------------------------------- 1 | import all 2 | -------------------------------------------------------------------------------- /sage/coding/source_coding/all.py: -------------------------------------------------------------------------------- 1 | from huffman import Huffman 2 | -------------------------------------------------------------------------------- /sage/modular/overconvergent/__init__.py: -------------------------------------------------------------------------------- 1 | pass 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/modular/quatalg/all.py: -------------------------------------------------------------------------------- 1 | 2 | from brandt import BrandtModule 3 | -------------------------------------------------------------------------------- /sage/parallel/all.py: -------------------------------------------------------------------------------- 1 | from decorate import parallel, fork 2 | 3 | -------------------------------------------------------------------------------- /sage/rings/real_double.pxi: -------------------------------------------------------------------------------- 1 | cdef extern RealDoubleField_class RDF 2 | -------------------------------------------------------------------------------- /sage/symbolic/integration/__init__.py: -------------------------------------------------------------------------------- 1 | #this file is not empty 2 | -------------------------------------------------------------------------------- /pull: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sage -hg pull http://www.sagemath.org/hg/sage-main 3 | -------------------------------------------------------------------------------- /sage/combinat/debruijn_sequence.pxd: -------------------------------------------------------------------------------- 1 | include "../misc/bitset_pxd.pxi" 2 | -------------------------------------------------------------------------------- /sage/finance/__init__.py: -------------------------------------------------------------------------------- 1 | # Quantitative Finance 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/modular/arithgroup/__init__.py: -------------------------------------------------------------------------------- 1 | # do nothing 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/modular/local_comp/all.py: -------------------------------------------------------------------------------- 1 | from local_comp import LocalComponent 2 | -------------------------------------------------------------------------------- /sage/version.py: -------------------------------------------------------------------------------- 1 | """nodoctests""" 2 | version='5.1'; date='2012-07-09' 3 | -------------------------------------------------------------------------------- /sage/crypto/public_key/all.py: -------------------------------------------------------------------------------- 1 | from blum_goldwasser import BlumGoldwasser 2 | -------------------------------------------------------------------------------- /sage/libs/cremona/all.py: -------------------------------------------------------------------------------- 1 | from constructor import CremonaModularSymbols 2 | -------------------------------------------------------------------------------- /sage/libs/lcalc/__init__.py: -------------------------------------------------------------------------------- 1 | #a comment so that the file is not empty 2 | 3 | -------------------------------------------------------------------------------- /sage/misc/misc_c.pxd: -------------------------------------------------------------------------------- 1 | 2 | cpdef list normalize_index(object key, int size) 3 | -------------------------------------------------------------------------------- /sage/rings/function_field/all.py: -------------------------------------------------------------------------------- 1 | from constructor import FunctionField 2 | -------------------------------------------------------------------------------- /sage/rings/polynomial/__init__.py: -------------------------------------------------------------------------------- 1 | # Initialization file for polynomials 2 | -------------------------------------------------------------------------------- /sage/structure/sage_object.pxd: -------------------------------------------------------------------------------- 1 | cdef class SageObject: 2 | pass 3 | 4 | -------------------------------------------------------------------------------- /sage/algebras/quatalg/all.py: -------------------------------------------------------------------------------- 1 | from quaternion_algebra import QuaternionAlgebra 2 | -------------------------------------------------------------------------------- /sage/crypto/__init__.py: -------------------------------------------------------------------------------- 1 | from lattice import gen_lattice 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/logic/__init__.py: -------------------------------------------------------------------------------- 1 | # This is the init file for logic. 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/rings/finite_rings/__init__.py: -------------------------------------------------------------------------------- 1 | # initialization file for finite fields. 2 | -------------------------------------------------------------------------------- /sage/algebras/quatalg/__init__.py: -------------------------------------------------------------------------------- 1 | # quaternion algebra init file 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/ext/solaris_fixes.h: -------------------------------------------------------------------------------- 1 | #if defined(__sun) 2 | #define _Complex_I 1.0fi 3 | #endif 4 | -------------------------------------------------------------------------------- /sage/libs/polybori/__init__.py: -------------------------------------------------------------------------------- 1 | # Insert a comment here to prevent repo corruption. 2 | -------------------------------------------------------------------------------- /sage/schemes/plane_quartics/all.py: -------------------------------------------------------------------------------- 1 | from quartic_constructor import QuarticCurve 2 | 3 | -------------------------------------------------------------------------------- /sage/combinat/posets/__init__.py: -------------------------------------------------------------------------------- 1 | # this file shouldn't be empty :) 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/geometry/triangulation/all.py: -------------------------------------------------------------------------------- 1 | from point_configuration import PointConfiguration 2 | -------------------------------------------------------------------------------- /sage/interfaces/notes/mayr-groebner_examples.txt: -------------------------------------------------------------------------------- 1 | mayr has difficult groebner basis examples. -------------------------------------------------------------------------------- /sage/rings/polynomial/padics/__init__.py: -------------------------------------------------------------------------------- 1 | # Initialization file for p-adic polynomials 2 | -------------------------------------------------------------------------------- /sage/crypto/block_cipher/all.py: -------------------------------------------------------------------------------- 1 | from sdes import SimplifiedDES 2 | from miniaes import MiniAES 3 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_GF2.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | 3 | cdef class ntl_GF2: 4 | cdef GF2_c x 5 | -------------------------------------------------------------------------------- /sage/parallel/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Parallel computation in Sage 3 | """ 4 | 5 | import all 6 | -------------------------------------------------------------------------------- /sage/schemes/jacobians/all.py: -------------------------------------------------------------------------------- 1 | #from abstract_jacobian import is_Jacobian, Jacobian 2 | 3 | 4 | -------------------------------------------------------------------------------- /sage/structure/__init__.py: -------------------------------------------------------------------------------- 1 | import dynamic_class # allows for sage.structure.dynamic_class? 2 | -------------------------------------------------------------------------------- /sage/matrix/matrix1.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix0 2 | 3 | cdef class Matrix(matrix0.Matrix): 4 | pass 5 | -------------------------------------------------------------------------------- /sage/schemes/jacobians/notes.txt: -------------------------------------------------------------------------------- 1 | This is just an example of an abstract scheme. No functionality yet. -------------------------------------------------------------------------------- /sage/stats/test.py: -------------------------------------------------------------------------------- 1 | """ 2 | Statistics in Sage 3 | 4 | EXAMPLES: 5 | sage: import rpy2 6 | """ 7 | -------------------------------------------------------------------------------- /sage/calculus/todo.txt: -------------------------------------------------------------------------------- 1 | [ ] Limits. See the comments around dummy_limit in calculus.py 2 | 3 | [ ] 4 | -------------------------------------------------------------------------------- /sage/rings/padics/padic_generic_element.pxi: -------------------------------------------------------------------------------- 1 | cdef extern void (teichmuller_set_c(mpz_t ,mpz_t ,mpz_t )) 2 | -------------------------------------------------------------------------------- /doc/en/bordeaux_2008/birch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/bordeaux_2008/birch.png -------------------------------------------------------------------------------- /doc/en/website/static/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/website/static/pdf.png -------------------------------------------------------------------------------- /sage/rings/semirings/all.py: -------------------------------------------------------------------------------- 1 | from non_negative_integer_semiring import NonNegativeIntegerSemiring, NN 2 | 3 | -------------------------------------------------------------------------------- /sage/server/all.py: -------------------------------------------------------------------------------- 1 | #from server1.all import * 2 | from notebook.all import * 3 | from trac.all import * 4 | 5 | -------------------------------------------------------------------------------- /sage/tests/french_book/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/sage/tests/french_book/README -------------------------------------------------------------------------------- /doc/en/introspect/templates/layout.html: -------------------------------------------------------------------------------- 1 |
2 | {% block body %} {% endblock %} 3 |
4 | -------------------------------------------------------------------------------- /sage/combinat/iet/__init__.py: -------------------------------------------------------------------------------- 1 | r""" 2 | Library for Interval Exchange Transformations 3 | """ 4 | 5 | import all 6 | -------------------------------------------------------------------------------- /sage/matrix/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Classes for matrix algebra. 3 | 4 | See docs.py for more information 5 | """ 6 | -------------------------------------------------------------------------------- /sage/structure/element_py.py: -------------------------------------------------------------------------------- 1 | import element 2 | 3 | def init(parent): 4 | return element.Element(parent) 5 | 6 | -------------------------------------------------------------------------------- /doc/en/a_tour_of_sage/sin_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/a_tour_of_sage/sin_plot.png -------------------------------------------------------------------------------- /doc/en/bordeaux_2008/modpcurve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/bordeaux_2008/modpcurve.png -------------------------------------------------------------------------------- /doc/fr/a_tour_of_sage/sin_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/fr/a_tour_of_sage/sin_plot.png -------------------------------------------------------------------------------- /doc/tr/a_tour_of_sage/sin_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/tr/a_tour_of_sage/sin_plot.png -------------------------------------------------------------------------------- /sage/geometry/polyhedron/all.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | from constructor import Polyhedron 4 | from library import polytopes 5 | 6 | -------------------------------------------------------------------------------- /sage/matrix/matrix_domain_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix 2 | 3 | cdef class Matrix_domain_dense(matrix.Matrix): 4 | pass 5 | -------------------------------------------------------------------------------- /sage/matrix/matrix_sparse.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix 2 | 3 | cdef class Matrix_sparse(matrix.Matrix): 4 | pass 5 | 6 | -------------------------------------------------------------------------------- /sage/modular/quatalg/__init__.py: -------------------------------------------------------------------------------- 1 | # Modular forms using quaternion algebras -- initialization file 2 | 3 | import all 4 | -------------------------------------------------------------------------------- /sage/tests/french_book/__init__.py: -------------------------------------------------------------------------------- 1 | # This comment is here so the file is non-empty (so Mercurial will check it in). 2 | -------------------------------------------------------------------------------- /doc/en/a_tour_of_sage/eigen_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/a_tour_of_sage/eigen_plot.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/1.png -------------------------------------------------------------------------------- /doc/fr/a_tour_of_sage/eigen_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/fr/a_tour_of_sage/eigen_plot.png -------------------------------------------------------------------------------- /doc/tr/a_tour_of_sage/eigen_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/tr/a_tour_of_sage/eigen_plot.png -------------------------------------------------------------------------------- /sage/matrix/matrix_domain_sparse.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix 2 | 3 | cdef class Matrix_domain_sparse(matrix.Matrix): 4 | pass 5 | -------------------------------------------------------------------------------- /sage/matrix/matrix_domain_sparse.pyx: -------------------------------------------------------------------------------- 1 | cimport matrix 2 | 3 | cdef class Matrix_domain_sparse(matrix.Matrix): 4 | pass 5 | -------------------------------------------------------------------------------- /doc/en/reference/media/homology/rp2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/reference/media/homology/rp2.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_A.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_B.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_C.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_D.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/wcf1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/wcf1.png -------------------------------------------------------------------------------- /sage/combinat/permutation_cython.pxd: -------------------------------------------------------------------------------- 1 | cdef void reset_swap(int n, int *c, int *o) 2 | cdef int next_swap(int n, int *c, int *o) 3 | -------------------------------------------------------------------------------- /sage/ext/fast_callable.pxd: -------------------------------------------------------------------------------- 1 | cdef class Wrapper: 2 | cdef readonly object _orig_args 3 | cdef readonly object _metadata 4 | -------------------------------------------------------------------------------- /sage/games/all.py: -------------------------------------------------------------------------------- 1 | from sudoku import Sudoku, sudoku 2 | from sudoku_backtrack import backtrack_all 3 | from hexad import Minimog 4 | -------------------------------------------------------------------------------- /sage/lfunctions/all.py: -------------------------------------------------------------------------------- 1 | from dokchitser import Dokchitser 2 | 3 | from lcalc import lcalc 4 | 5 | from sympow import sympow 6 | 7 | -------------------------------------------------------------------------------- /doc/common/themes/sage/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/common/themes/sage/static/favicon.ico -------------------------------------------------------------------------------- /doc/common/themes/sage/static/sageicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/common/themes/sage/static/sageicon.png -------------------------------------------------------------------------------- /doc/common/themes/sage/static/sagelogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/common/themes/sage/static/sagelogo.png -------------------------------------------------------------------------------- /doc/en/reference/media/homology/klein.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/reference/media/homology/klein.png -------------------------------------------------------------------------------- /doc/en/reference/media/homology/torus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/reference/media/homology/torus.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_E6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_E6.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/a1box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/a1box.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/a1tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/a1tag.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/a2box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/a2box.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/a2rho.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/a2rho.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/a2tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/a2tag.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/ab2tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/ab2tag.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/b2box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/b2box.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/stand-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/stand-a.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/stand-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/stand-b.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/stand-c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/stand-c.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/stand-d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/stand-d.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/stand-g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/stand-g.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/tensor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/tensor.png -------------------------------------------------------------------------------- /sage/groups/additive_abelian/all.py: -------------------------------------------------------------------------------- 1 | from additive_abelian_group import AdditiveAbelianGroup 2 | from additive_abelian_wrapper import * 3 | -------------------------------------------------------------------------------- /sage/libs/mpmath/utils.pxd: -------------------------------------------------------------------------------- 1 | include '../../ext/cdefs.pxi' 2 | from sage.libs.mpfr cimport * 3 | 4 | cdef mpfr_to_mpfval(mpfr_t) 5 | 6 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_GF2X.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | cdef class ntl_GF2X: 5 | cdef GF2X_c x 6 | -------------------------------------------------------------------------------- /sage/rings/number_field/number_field_base.pxd: -------------------------------------------------------------------------------- 1 | from sage.rings.ring cimport Field 2 | 3 | cdef class NumberField(Field): 4 | pass 5 | -------------------------------------------------------------------------------- /doc/en/reference/media/homology/simplices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/reference/media/homology/simplices.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/lp_flot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/lp_flot1.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/lp_flot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/lp_flot2.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/standard1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/standard1.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/tableau1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/tableau1.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/tableau2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/tableau2.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/tableau3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/tableau3.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/tableau4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/tableau4.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/tableaux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/tableaux.png -------------------------------------------------------------------------------- /sage-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sage -hg status 4 | sage -hg diff 5 | sage -hg ci 6 | sage -hg push -f ssh://sage@localhost/www/hg/sage-main 7 | -------------------------------------------------------------------------------- /sage/misc/proof.py: -------------------------------------------------------------------------------- 1 | """ 2 | Whether or not computations are provably correct by default. 3 | """ 4 | 5 | #proof = False 6 | proof = True 7 | -------------------------------------------------------------------------------- /doc/en/reference/media/heawood-graph-latex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/reference/media/heawood-graph-latex.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_Atwisted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_Atwisted.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_Atwisted1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_Atwisted1.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_Dtwisted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_Dtwisted.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/a2rho_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/a2rho_color.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/sandpile/C_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/sandpile/C_6.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/sandpile/btw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/sandpile/btw.png -------------------------------------------------------------------------------- /sage/combinat/combinat_cython.pxd: -------------------------------------------------------------------------------- 1 | from sage.libs.gmp.all cimport mpz_t 2 | 3 | cdef mpz_stirling_s2(mpz_t s, unsigned long n, unsigned long k) 4 | -------------------------------------------------------------------------------- /sage/combinat/designs/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | 'designs' package. 3 | 4 | Modules: 5 | 6 | block_design 7 | """ 8 | 9 | import all 10 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_vec_ZZ_pE_decl.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "ntl_wrap.h": 2 | ctypedef struct vec_ZZ_pE_c "struct vec_ZZ_pE": 3 | pass 4 | -------------------------------------------------------------------------------- /sage/libs/singular/singular.pxi: -------------------------------------------------------------------------------- 1 | cdef extern Rational (si2sa_QQ(number (*),ring (*))) 2 | cdef extern number (*(sa2si_QQ(Rational ,ring (*)))) 3 | -------------------------------------------------------------------------------- /sage/tests/all.py: -------------------------------------------------------------------------------- 1 | """nodoctest 2 | """ 3 | from sage.modular.modsym.tests import Test as modsym 4 | from sage.tests.arxiv_0812_2725 import * 5 | -------------------------------------------------------------------------------- /doc/en/reference/media/homology/torus_labelled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/reference/media/homology/torus_labelled.png -------------------------------------------------------------------------------- /sage/geometry/triangulation/functions.pxd: -------------------------------------------------------------------------------- 1 | 2 | cdef extern from "functions.h": 3 | int factorial(int n) 4 | int binomial(int n, int D) 5 | 6 | -------------------------------------------------------------------------------- /sage/graphs/base/all.py: -------------------------------------------------------------------------------- 1 | from sparse_graph import SparseGraph 2 | from dense_graph import DenseGraph 3 | import sage.graphs.base.static_sparse_graph 4 | -------------------------------------------------------------------------------- /sage/graphs/modular_decomposition/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is not empty ! 2 | 3 | import sage.graphs.modular_decomposition.modular_decomposition 4 | 5 | -------------------------------------------------------------------------------- /doc/en/reference/media/modular/arithgroup/pairing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/reference/media/modular/arithgroup/pairing.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_Atwisted_dual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_Atwisted_dual.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_C_exceptional.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_C_exceptional.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/sandpile/example1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/sandpile/example1.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/sandpile/initial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/sandpile/initial.png -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/sandpile/random.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/sandpile/random.png -------------------------------------------------------------------------------- /sage/combinat/species/all.py: -------------------------------------------------------------------------------- 1 | from series import LazyPowerSeriesRing 2 | from recursive_species import CombinatorialSpecies 3 | import library as species 4 | -------------------------------------------------------------------------------- /sage/gsl/README.txt: -------------------------------------------------------------------------------- 1 | NOTE -- if you are going to add new code here, make sure 2 | you are aware of SAGE_ROOT/examples/gsl, which is based 3 | on the GSL manual. -------------------------------------------------------------------------------- /doc/en/website/index.rst: -------------------------------------------------------------------------------- 1 | Sage Documentation 2 | ================== 3 | 4 | Do not edit this file as its output is overridden by the template in 5 | templates/. -------------------------------------------------------------------------------- /sage/gsl/gsl_elljac.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_elljac.h": 2 | 3 | int gsl_sf_elljac_e(double u, double m, double * sn, double * cn, double * dn) 4 | 5 | -------------------------------------------------------------------------------- /sage/modular/overconvergent/all.py: -------------------------------------------------------------------------------- 1 | from weightspace import WeightSpace_constructor as pAdicWeightSpace 2 | 3 | from genus0 import OverconvergentModularForms 4 | -------------------------------------------------------------------------------- /sage/schemes/generic/notes/homset.txt: -------------------------------------------------------------------------------- 1 | The Homset constructor base extends the codomain to a new ring, 2 | so that the codomain is no longer the scheme of interest. -------------------------------------------------------------------------------- /doc/en/reference/logic.rst: -------------------------------------------------------------------------------- 1 | Symbolic Logic 2 | ============== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/logic/propcalc 8 | sage/logic/booleval 9 | -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/sandpile/C_6-parallel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/sandpile/C_6-parallel.png -------------------------------------------------------------------------------- /sage/matrix/matrix_generic_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix_dense 2 | 3 | cdef class Matrix_generic_dense(matrix_dense.Matrix_dense): 4 | cdef object _entries 5 | 6 | -------------------------------------------------------------------------------- /sage/modules/module.pxd: -------------------------------------------------------------------------------- 1 | cimport sage.structure.parent_gens 2 | 3 | cdef class Module_old(sage.structure.parent_gens.ParentWithAdditiveAbelianGens): 4 | pass 5 | -------------------------------------------------------------------------------- /doc/en/reference/constants.rst: -------------------------------------------------------------------------------- 1 | Constants 2 | ========= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/symbolic/constants 8 | sage/symbolic/constants_c 9 | -------------------------------------------------------------------------------- /doc/en/thematic_tutorials/media/KR_Dtwisted_exceptional.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sagemath/sagelib/HEAD/doc/en/thematic_tutorials/media/KR_Dtwisted_exceptional.png -------------------------------------------------------------------------------- /sage/geometry/triangulation/functions.h: -------------------------------------------------------------------------------- 1 | #ifndef FUNCTIONS__H 2 | #define FUNCTIONS__H 3 | 4 | int factorial(int n); 5 | int binomial(int n, int D); 6 | 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_vec_ZZ_p_decl.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "ntl_wrap.h": 2 | #### vec_ZZ_p_c 3 | ctypedef struct vec_ZZ_p_c "struct vec_ZZ_p": 4 | pass 5 | 6 | -------------------------------------------------------------------------------- /sage/matrix/matrix_symbolic_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix_generic_dense 2 | 3 | cdef class Matrix_symbolic_dense(matrix_generic_dense.Matrix_generic_dense): 4 | pass 5 | -------------------------------------------------------------------------------- /sage/matrix/template.pxd: -------------------------------------------------------------------------------- 1 | # choose: dense or sparse 2 | 3 | cimport matrix_dense 4 | 5 | cdef class Matrix_generic_dense(matrix_dense.Matrix_dense): 6 | pass 7 | 8 | -------------------------------------------------------------------------------- /sage/categories/functor.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.sage_object cimport SageObject 2 | 3 | cdef class Functor(SageObject): 4 | cdef object __domain 5 | cdef object __codomain -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_mat_ZZ.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | cdef class ntl_mat_ZZ: 5 | cdef mat_ZZ_c x 6 | cdef long __nrows, __ncols 7 | -------------------------------------------------------------------------------- /sage/matrix/matrix_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix 2 | 3 | cdef class Matrix_dense(matrix.Matrix): 4 | cdef set_unsafe_int(self, Py_ssize_t i, Py_ssize_t j, int value) 5 | 6 | -------------------------------------------------------------------------------- /sage/modules/vector_real_double_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport vector_double_dense 2 | 3 | cdef class Vector_real_double_dense(vector_double_dense.Vector_double_dense): 4 | pass 5 | 6 | -------------------------------------------------------------------------------- /c_lib/include/mpz_longlong.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | void mpz_set_longlong(mpz_ptr z, long long val); 5 | 6 | void mpz_set_ulonglong(mpz_ptr z, unsigned long long val); 7 | -------------------------------------------------------------------------------- /doc/en/numerical_sage/parallel_computation.rst: -------------------------------------------------------------------------------- 1 | Parallel Computation 2 | ==================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | mpi4py 8 | parallel_laplace_solver -------------------------------------------------------------------------------- /doc/en/reference/semirings.rst: -------------------------------------------------------------------------------- 1 | Standard Semirings 2 | ================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/rings/semirings/non_negative_integer_semiring 8 | -------------------------------------------------------------------------------- /sage/gsl/gsl_dawson.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_dawson.h": 2 | 3 | double gsl_sf_dawson(double x) 4 | 5 | int gsl_sf_dawson_e(double x, gsl_sf_result * result) 6 | 7 | -------------------------------------------------------------------------------- /sage/modules/vector_complex_double_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport vector_double_dense 2 | 3 | cdef class Vector_complex_double_dense(vector_double_dense.Vector_double_dense): 4 | pass 5 | -------------------------------------------------------------------------------- /sage/finance/time_series.pxd: -------------------------------------------------------------------------------- 1 | cdef class TimeSeries: 2 | cdef double* _values 3 | cdef Py_ssize_t _length 4 | cpdef rescale(self, double s) 5 | cpdef double sum(self) 6 | -------------------------------------------------------------------------------- /sage/gsl/gsl_clausen.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_clausen.h": 2 | 3 | double gsl_sf_clausen(double x) 4 | 5 | int gsl_sf_clausen_e(double x, gsl_sf_result * result) 6 | 7 | -------------------------------------------------------------------------------- /sage/rings/integer_ring_python.py: -------------------------------------------------------------------------------- 1 | def iterator(self): 2 | yield self(0) 3 | n = self(1) 4 | while True: 5 | yield n 6 | yield -n 7 | n += 1 8 | 9 | -------------------------------------------------------------------------------- /sage/tensor/all.py: -------------------------------------------------------------------------------- 1 | from coordinate_patch import CoordinatePatch 2 | from differential_forms import DifferentialForms 3 | from differential_form_element import DifferentialForm, wedge 4 | -------------------------------------------------------------------------------- /doc/en/reference/probability.rst: -------------------------------------------------------------------------------- 1 | Probability 2 | =========== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/gsl/probability_distribution 8 | sage/probability/random_variable 9 | -------------------------------------------------------------------------------- /sage/combinat/crystals/__init__.py: -------------------------------------------------------------------------------- 1 | #This makes sure that sage.combinat.crystals? points to the correct 2 | #documentation about crystals 3 | from crystals import __doc__ 4 | 5 | import all 6 | -------------------------------------------------------------------------------- /sage/graphs/graph_decompositions/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is not empty ! 2 | import sage.graphs.graph_decompositions.vertex_separation 3 | import sage.graphs.graph_decompositions.rankwidth 4 | -------------------------------------------------------------------------------- /sage/gsl/ode.pxd: -------------------------------------------------------------------------------- 1 | cdef class ode_system: 2 | cdef int c_j(self,double , double *, double *,double *) 3 | 4 | 5 | cdef int c_f(self,double t, double* , double* ) 6 | 7 | -------------------------------------------------------------------------------- /doc/en/bordeaux_2008/number_fields.rst: -------------------------------------------------------------------------------- 1 | Number Fields 2 | ============= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | nf_introduction 8 | nf_galois_groups 9 | nf_orders 10 | -------------------------------------------------------------------------------- /sage/algebras/steenrod/all.py: -------------------------------------------------------------------------------- 1 | """ 2 | The Steenrod algebra 3 | """ 4 | 5 | from steenrod_algebra import SteenrodAlgebra, Sq 6 | from steenrod_algebra_bases import steenrod_algebra_basis 7 | 8 | -------------------------------------------------------------------------------- /sage/matrix/matrix_generic_sparse.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix_sparse 2 | 3 | cdef class Matrix_generic_sparse(matrix_sparse.Matrix_sparse): 4 | cdef object _entries 5 | cdef object _zero 6 | 7 | -------------------------------------------------------------------------------- /sage/modules/vector_modn_sparse_h.pxi: -------------------------------------------------------------------------------- 1 | cdef struct c_vector_modint: 2 | int *entries 3 | int p 4 | Py_ssize_t *positions 5 | Py_ssize_t degree 6 | Py_ssize_t num_nonzero 7 | 8 | -------------------------------------------------------------------------------- /sage/rings/polynomial/multi_polynomial.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport CommutativeRingElement 2 | 3 | cdef class MPolynomial(CommutativeRingElement): 4 | cdef long _hash_c(self) 5 | -------------------------------------------------------------------------------- /sage/symbolic/constants_c.pxd: -------------------------------------------------------------------------------- 1 | from sage.libs.ginac cimport GConstant 2 | 3 | cdef class PynacConstant: 4 | cdef GConstant* pointer 5 | cdef GConstant object 6 | cdef object _name 7 | -------------------------------------------------------------------------------- /sage/crypto/mq/__init__.py: -------------------------------------------------------------------------------- 1 | from mpolynomialsystem import MPolynomialSystem, MPolynomialRoundSystem, is_MPolynomialSystem, is_MPolynomialRoundSystem 2 | from sr import SR 3 | from sbox import SBox 4 | -------------------------------------------------------------------------------- /sage/gsl/gsl_pow_int.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_pow_int.h": 2 | 3 | double gsl_sf_pow_int(double x, int n) 4 | 5 | int gsl_sf_pow_int_e(double x, int n, gsl_sf_result * result) 6 | 7 | -------------------------------------------------------------------------------- /sage/rings/rational.pxi: -------------------------------------------------------------------------------- 1 | cdef extern void (set_from_Integer(Rational ,Integer )) 2 | cdef extern void (set_from_Rational(Rational ,Rational )) 3 | cdef extern void (set_from_mpq(Rational ,mpq_t )) 4 | -------------------------------------------------------------------------------- /sage/misc/nested_class.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "object.h": 2 | ctypedef class __builtin__.type [object PyHeapTypeObject]: 3 | pass 4 | 5 | cdef class NestedClassMetaclass(type): 6 | pass 7 | -------------------------------------------------------------------------------- /doc/en/numerical_sage/installation.rst: -------------------------------------------------------------------------------- 1 | Installation of Visualization Tools 2 | =================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | installation_linux 8 | installation_osx -------------------------------------------------------------------------------- /sage/categories/category_singleton.pxd: -------------------------------------------------------------------------------- 1 | cdef class FastHashable_class: 2 | cdef Py_ssize_t _hash 3 | 4 | cdef class Category_contains_method_by_parent_class: 5 | cdef type _parent_class_of_category 6 | -------------------------------------------------------------------------------- /sage/geometry/triangulation/data.pxd: -------------------------------------------------------------------------------- 1 | 2 | 3 | cdef extern from "data.h": 4 | cdef cppclass compact_simplices(object): 5 | void push_back(int encoded_simplex) 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /sage/graphs/distances_all_pairs.pxd: -------------------------------------------------------------------------------- 1 | cdef unsigned short * c_shortest_path_all_pairs(G) except NULL 2 | cdef unsigned short * c_distances_all_pairs(G) 3 | cdef unsigned short * c_eccentricity(G) except NULL 4 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZ.pxd: -------------------------------------------------------------------------------- 1 | 2 | include "decl.pxi" 3 | 4 | cdef class ntl_ZZ: 5 | cdef ZZ_c x 6 | cdef public int get_as_int(ntl_ZZ self) 7 | cdef public void set_from_int(ntl_ZZ self, int value) 8 | -------------------------------------------------------------------------------- /sage/misc/allocator.pxd: -------------------------------------------------------------------------------- 1 | include "../ext/python_rich_object.pxi" 2 | cdef public hook_tp_functions(object global_dummy, allocfunc tp_alloc, newfunc tp_new, freefunc tp_free, destructor tp_dealloc, bint useGC) 3 | -------------------------------------------------------------------------------- /sage/modular/ssmod/all.py: -------------------------------------------------------------------------------- 1 | from ssmod import (dimension_supersingular_module, 2 | supersingular_j, 3 | SupersingularModule, 4 | supersingular_D) 5 | 6 | -------------------------------------------------------------------------------- /sage/symbolic/getitem.pxd: -------------------------------------------------------------------------------- 1 | from sage.symbolic.expression cimport Expression 2 | from sage.structure.sage_object cimport SageObject 3 | 4 | cdef class OperandsWrapper(SageObject): 5 | cdef Expression _expr 6 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_lzz_pContext.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | cdef class ntl_zz_pContext_class: 5 | cdef zz_pContext_c x 6 | cdef void restore_c(self) 7 | cdef long p 8 | -------------------------------------------------------------------------------- /sage/libs/flint/flint.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "flint.h": 2 | 3 | cdef long FLINT_BITS 4 | cdef long FLINT_D_BITS 5 | 6 | cdef unsigned long FLINT_BIT_COUNT(unsigned long) 7 | void flint_stack_cleanup() 8 | -------------------------------------------------------------------------------- /sage/libs/singular/__init__.py: -------------------------------------------------------------------------------- 1 | from sage.libs.singular.function import singular_function, lib 2 | 3 | from sage.libs.singular.function_factory import SingularFunctionFactory 4 | 5 | ff = SingularFunctionFactory() 6 | 7 | -------------------------------------------------------------------------------- /sage/matrix/matrix_complex_double_dense.pxd: -------------------------------------------------------------------------------- 1 | import matrix_double_dense 2 | 3 | cimport matrix_double_dense 4 | 5 | cdef class Matrix_complex_double_dense(matrix_double_dense.Matrix_double_dense): 6 | pass 7 | 8 | -------------------------------------------------------------------------------- /sage/gsl/gsl_mode.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_mode.h": 2 | ctypedef unsigned int gsl_mode_t 3 | double GSL_PREC_DOUBLE 4 | 5 | double GSL_PREC_SINGLE 6 | 7 | double GSL_PREC_APPROX 8 | 9 | 10 | -------------------------------------------------------------------------------- /sage/libs/gmp/all.pxd: -------------------------------------------------------------------------------- 1 | from types cimport * 2 | from random cimport * 3 | from mpz cimport * 4 | from mpq cimport * 5 | 6 | # Comment these out to speed up compilation time. 7 | # from mpf cimport * 8 | # from mpn cimport * 9 | -------------------------------------------------------------------------------- /sage/categories/examples/coxeter_groups.py: -------------------------------------------------------------------------------- 1 | """ 2 | Examples of Coxeter groups 3 | """ 4 | # temporary until someone implements an appropriate example 5 | 6 | import finite_weyl_groups 7 | Example = finite_weyl_groups.Example 8 | -------------------------------------------------------------------------------- /sage/combinat/matrices/all.py: -------------------------------------------------------------------------------- 1 | from latin import LatinSquare, LatinSquare_generator 2 | from dlxcpp import DLXCPP 3 | from dancing_links import make_dlxwrapper 4 | from hadamard_matrix import hadamard_matrix, hadamard_matrix_www 5 | -------------------------------------------------------------------------------- /sage/schemes/toric/all.py: -------------------------------------------------------------------------------- 1 | # code exports 2 | 3 | from fano_variety import CPRFanoToricVariety 4 | from ideal import ToricIdeal 5 | from library import toric_varieties 6 | from variety import AffineToricVariety, ToricVariety 7 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/notebook/doc_page.html: -------------------------------------------------------------------------------- 1 | {% extends "notebook/index.html" %} 2 | 3 | {% block pre_main_css %} 4 | 5 | {% endblock %} -------------------------------------------------------------------------------- /sage/misc/darwin_memory_usage.h: -------------------------------------------------------------------------------- 1 | 2 | #if defined(__APPLE__) 3 | 4 | // Returns the virtual size of the current process. This will match what "top" reports for VSIZE 5 | unsigned long long darwin_virtual_size(); 6 | 7 | #endif 8 | 9 | -------------------------------------------------------------------------------- /sage/matrix/matrix_window_modn_dense.pxd: -------------------------------------------------------------------------------- 1 | from matrix_window cimport MatrixWindow 2 | 3 | cdef extern from "../ext/multi_modular.h": 4 | ctypedef unsigned long mod_int 5 | 6 | cdef class MatrixWindow_modn_dense(MatrixWindow): 7 | pass -------------------------------------------------------------------------------- /sage/rings/polynomial/symmetric_reduction.pxd: -------------------------------------------------------------------------------- 1 | cdef class SymmetricReductionStrategy: 2 | cdef list _lm 3 | cdef list _lengths 4 | cdef object _min_lm 5 | cdef int _tail 6 | cdef object _R 7 | cdef object _parent 8 | -------------------------------------------------------------------------------- /sage/geometry/polyhedra.py: -------------------------------------------------------------------------------- 1 | from sage.misc.misc import deprecation 2 | deprecation('The module sage.geometry.polyhedra has been removed, use sage.geometry.polyhedron instead.', 3 | 'Sage Version 4.8') 4 | from polyhedron.all import * 5 | -------------------------------------------------------------------------------- /sage/matrix/matrix_modn_dense_double.pxd: -------------------------------------------------------------------------------- 1 | include "../ext/cdefs.pxi" 2 | 3 | ctypedef double celement 4 | 5 | include "matrix_modn_dense_template_header.pxi" 6 | 7 | cdef class Matrix_modn_dense_double(Matrix_modn_dense_template): 8 | pass 9 | -------------------------------------------------------------------------------- /sage/rings/finite_rings/element_base.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport CommutativeRingElement 2 | 3 | cdef class FiniteRingElement(CommutativeRingElement): 4 | pass 5 | 6 | cdef class FinitePolyExtElement(FiniteRingElement): 7 | pass 8 | -------------------------------------------------------------------------------- /doc/en/reference/tensor.rst: -------------------------------------------------------------------------------- 1 | Differential Forms 2 | ================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/tensor/coordinate_patch 8 | sage/tensor/differential_forms 9 | sage/tensor/differential_form_element 10 | 11 | -------------------------------------------------------------------------------- /export: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -rf */.doctest* */*/.doctest* */*/*/.doctest* */*/*/*/.doctest* */*/*/*/*/.doctest* */*/*/*/*/*/.doctest* 4 | 5 | hg diff 6 | 7 | hg status 8 | 9 | hg commit 10 | 11 | hg tag $1 12 | 13 | ./sage-push 14 | 15 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZX.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | cdef class ntl_ZZX: 5 | cdef ZZX_c x 6 | cdef void setitem_from_int(ntl_ZZX self, long i, int value) 7 | cdef int getitem_as_int(ntl_ZZX self, long i) 8 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/worksheet/time_last_edited.html: -------------------------------------------------------------------------------- 1 | {# 2 | INPUT: 3 | - time - string of time of last edit 4 | - last_editor - string of name of last editor 5 | #} 6 | last edited on {{ time }} by {{ last_editor }} -------------------------------------------------------------------------------- /sage/server/notebook/templates/worksheet/time_since_last_edited.html: -------------------------------------------------------------------------------- 1 | {# 2 | INPUT: 3 | - time - string of time since last edit 4 | - last_editor - string of name of last editor 5 | #} 6 | {{ time }} ago by {{ last_editor }} 7 | -------------------------------------------------------------------------------- /sage/combinat/words/all.py: -------------------------------------------------------------------------------- 1 | from alphabet import Alphabet 2 | from morphism import WordMorphism 3 | from paths import WordPaths 4 | from word import Word 5 | from word_options import WordOptions 6 | from word_generators import words 7 | from words import Words 8 | -------------------------------------------------------------------------------- /sage/gsl/gsl_elementary.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_elementary.h": 2 | 3 | int gsl_sf_multiply_e(double x, double y, gsl_sf_result * result) 4 | 5 | int gsl_sf_multiply_err_e(double x, double dx, double y, double dy, gsl_sf_result * result) 6 | 7 | -------------------------------------------------------------------------------- /sage/matrix/matrix_modn_dense_float.pxd: -------------------------------------------------------------------------------- 1 | include "../ext/cdefs.pxi" 2 | 3 | ctypedef float celement 4 | 5 | include "matrix_modn_dense_template_header.pxi" 6 | 7 | cdef class Matrix_modn_dense_float(Matrix_modn_dense_template): 8 | pass 9 | 10 | -------------------------------------------------------------------------------- /sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd: -------------------------------------------------------------------------------- 1 | from sage.libs.singular.decl cimport ideal, ring 2 | 3 | cdef object singular_ideal_to_sage_sequence(ideal *i, ring *r, object parent) 4 | cdef ideal *sage_ideal_to_singular_ideal(I) except NULL 5 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_mat_GF2.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from ntl_GF2 cimport ntl_GF2 5 | 6 | cdef class ntl_mat_GF2: 7 | cdef mat_GF2_c x 8 | cdef ntl_GF2 _new_element(self) 9 | cdef ntl_mat_GF2 _new(self) 10 | -------------------------------------------------------------------------------- /sage/probability/all.py: -------------------------------------------------------------------------------- 1 | from random_variable import ( 2 | is_ProbabilitySpace, 3 | is_DiscreteProbabilitySpace, 4 | is_RandomVariable, 5 | is_DiscreteRandomVariable, 6 | DiscreteRandomVariable, 7 | DiscreteProbabilitySpace ) 8 | 9 | -------------------------------------------------------------------------------- /sage/rings/finite_rings/stdint.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #define INTEGER_MOD_INT32_LIMIT 46341 // = ceil(sqrt(2^31-1)) 5 | #define INTEGER_MOD_INT64_LIMIT 2147483647 // = 2^31-1 for now, should be 3037000500LL = ceil(sqrt(2^63-1)) 6 | 7 | -------------------------------------------------------------------------------- /sage/rings/polynomial/polynomial_gf2x.pxd: -------------------------------------------------------------------------------- 1 | from sage.libs.ntl.ntl_GF2X_decl cimport GF2X_c 2 | 3 | ctypedef GF2X_c celement 4 | 5 | include "polynomial_template_header.pxi" 6 | 7 | cdef class Polynomial_GF2X(Polynomial_template): 8 | pass 9 | 10 | -------------------------------------------------------------------------------- /doc/en/reference/finance.rst: -------------------------------------------------------------------------------- 1 | Quantitative Finance 2 | ====================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/finance/time_series 8 | sage/finance/stock 9 | sage/finance/fractal 10 | sage/finance/markov_multifractal 11 | 12 | -------------------------------------------------------------------------------- /sage/rings/laurent_series_ring_element.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport AlgebraElement, ModuleElement 2 | from power_series_ring_element cimport PowerSeries 3 | 4 | cdef class LaurentSeries(AlgebraElement): 5 | cpdef ModuleElement __u 6 | cdef long __n 7 | -------------------------------------------------------------------------------- /sage/combinat/partitions_c.h: -------------------------------------------------------------------------------- 1 | #if defined(__sun) 2 | #include 3 | int isinf(double x) { return !finite(x) && x==x; } 4 | #endif 5 | 6 | #include 7 | 8 | int part(mpz_t answer, unsigned int n); 9 | int test(bool longtest, bool forever); 10 | 11 | -------------------------------------------------------------------------------- /sage/gsl/gsl_sf_result.pxi: -------------------------------------------------------------------------------- 1 | 2 | cdef extern from "gsl/gsl_sf_result.h": 3 | ctypedef struct gsl_sf_result: 4 | double val 5 | double err 6 | 7 | 8 | ctypedef struct gsl_sf_result_e10: 9 | double val 10 | double err 11 | int e10 12 | 13 | -------------------------------------------------------------------------------- /sage/libs/pari/pari_err.pxi: -------------------------------------------------------------------------------- 1 | # vim:ft=pyrex: 2 | 3 | cdef extern from 'pari_err.h': 4 | int _pari_catch 5 | int _pari_endcatch 6 | int sig_on "_pari_sig_on" () except 0 7 | int sig_str "_pari_sig_str" (char *) except 0 8 | void sig_off "_pari_sig_off" () 9 | -------------------------------------------------------------------------------- /sage/rings/polynomial/polynomial_zz_pex.pxd: -------------------------------------------------------------------------------- 1 | from sage.libs.ntl.ntl_ZZ_pEX_decl cimport ZZ_pEX_c 2 | 3 | ctypedef ZZ_pEX_c celement 4 | 5 | include "polynomial_template_header.pxi" 6 | 7 | cdef class Polynomial_ZZ_pX(Polynomial_template): 8 | pass 9 | 10 | -------------------------------------------------------------------------------- /doc/en/reference/quat_algebras.rst: -------------------------------------------------------------------------------- 1 | .. _ch:quat-algebras: 2 | 3 | Quaternion Algebras 4 | =================== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/algebras/quatalg/quaternion_algebra 10 | sage/algebras/quatalg/quaternion_algebra_element 11 | 12 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_GF2E.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from ntl_GF2EContext cimport ntl_GF2EContext_class 5 | 6 | cdef class ntl_GF2E: 7 | cdef GF2E_c x 8 | cdef ntl_GF2EContext_class c 9 | cdef ntl_GF2E _new(self) 10 | 11 | -------------------------------------------------------------------------------- /doc/en/reference/coding.rst: -------------------------------------------------------------------------------- 1 | Coding Theory 2 | ============= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/coding/linear_code 8 | sage/coding/code_constructions 9 | sage/coding/sd_codes 10 | sage/coding/code_bounds 11 | sage/coding/source_coding/huffman 12 | -------------------------------------------------------------------------------- /sage/libs/mwrank/mwrank_embed.h: -------------------------------------------------------------------------------- 1 | // ************************************************************** 2 | // Generated by pyrexembed from mwrank.pyxe.pyxe 3 | // Please do not edit 4 | // ************************************************************** 5 | 6 | extern int sum(int n, int m); 7 | -------------------------------------------------------------------------------- /doc/en/reference/games.rst: -------------------------------------------------------------------------------- 1 | Games 2 | ===== 3 | 4 | Sage includes a sophisticated Sudoku solver. It also has a 5 | Rubik's cube solver (see :ref:`Rubik's Cube Group `). 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | 10 | sage/games/sudoku 11 | sage/games/quantumino 12 | -------------------------------------------------------------------------------- /doc/en/reference/stats.rst: -------------------------------------------------------------------------------- 1 | Statistics 2 | ========== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/stats/basic_stats 8 | sage/stats/intlist 9 | sage/stats/hmm/hmm 10 | sage/stats/hmm/chmm 11 | sage/stats/hmm/distributions 12 | sage/stats/hmm/util 13 | 14 | -------------------------------------------------------------------------------- /sage/gsl/gsl_dilog.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_dilog.h": 2 | 3 | double gsl_sf_dilog(double x) 4 | 5 | int gsl_sf_dilog_e(double x, gsl_sf_result * result) 6 | 7 | int gsl_sf_complex_dilog_e(double r, double theta, gsl_sf_result * result_re, gsl_sf_result * result_im) 8 | 9 | -------------------------------------------------------------------------------- /sage/rings/polynomial/polynomial_template_header.pxi: -------------------------------------------------------------------------------- 1 | """ 2 | Polynomial Template for C/C++ Library Interfaces 3 | """ 4 | 5 | from sage.rings.polynomial.polynomial_element cimport Polynomial 6 | 7 | cdef class Polynomial_template(Polynomial): 8 | cdef celement x 9 | 10 | 11 | -------------------------------------------------------------------------------- /sage/rings/power_series_poly.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport ModuleElement 2 | from power_series_ring_element cimport PowerSeries 3 | from sage.rings.polynomial.polynomial_element cimport Polynomial 4 | 5 | cdef class PowerSeries_poly(PowerSeries): 6 | cdef Polynomial __f 7 | 8 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/worksheet/attached.html: -------------------------------------------------------------------------------- 1 | {# 2 | INPUT: 3 | - attached_files - dictionary of attached files 4 | #} 5 | {% for file, tm in attached_files %} 6 |
7 | {{ file }} 8 |
9 | {% endfor %} -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_GF2EContext.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from ntl_GF2X cimport ntl_GF2X 5 | 6 | cdef class ntl_GF2EContext_class: 7 | cdef GF2EContext_c x 8 | cdef ntl_GF2X m 9 | cdef void restore_c(self) 10 | cdef object __weakref__ 11 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/template_error.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %} 3 | 4 | {% block title %}Error{% endblock %} 5 | 6 | {% block body %} 7 | Internal Server Error: The template {{ template }} wasn't found. 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /doc/en/reference/combinat/designs.rst: -------------------------------------------------------------------------------- 1 | Designs and Incidence Structures 2 | ================================ 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | ../sage/combinat/designs/block_design 8 | ../sage/combinat/designs/ext_rep 9 | ../sage/combinat/designs/incidence_structures 10 | -------------------------------------------------------------------------------- /doc/en/reference/combinat/tableaux.rst: -------------------------------------------------------------------------------- 1 | Tableaux and Tableaux-like Objects 2 | ================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | ../sage/combinat/tableau 8 | ../sage/combinat/skew_tableau 9 | ../sage/combinat/ribbon 10 | ../sage/combinat/ribbon_tableau -------------------------------------------------------------------------------- /doc/en/reference/polynomial_rings_laurent.rst: -------------------------------------------------------------------------------- 1 | 2 | Laurent Polynomials and Polynomial Rings 3 | ======================================== 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | sage/rings/polynomial/laurent_polynomial_ring 9 | sage/rings/polynomial/laurent_polynomial 10 | 11 | -------------------------------------------------------------------------------- /sage/modules/module_element.py: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Elements of free modules 3 | ############################################################################### 4 | 5 | from sage.structure.element import ModuleElement, is_ModuleElement 6 | -------------------------------------------------------------------------------- /sage/gsl/gsl_array.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | include '../ext/interrupt.pxi' 3 | include 'gsl.pxi' 4 | cdef class GSLDoubleArray: 5 | cdef size_t n 6 | cdef size_t stride 7 | cdef double * data 8 | 9 | #cdef class GSLDoubleComplexArray(GSLDoubleArray): 10 | # cdef size_t m 11 | -------------------------------------------------------------------------------- /sage/rings/power_series_mpoly.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport ModuleElement 2 | from power_series_ring_element cimport PowerSeries 3 | 4 | cdef class PowerSeries_mpoly(PowerSeries): 5 | cpdef ModuleElement __f 6 | cdef object __poly 7 | cdef object __list 8 | cdef bint _truncated 9 | -------------------------------------------------------------------------------- /doc/en/reference/lfunctions.rst: -------------------------------------------------------------------------------- 1 | L-Functions 2 | =========== 3 | 4 | Sage includes several standard open source packages for computing 5 | with :math:`L`-functions. 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | 10 | sage/lfunctions/lcalc 11 | sage/lfunctions/sympow 12 | sage/lfunctions/dokchitser -------------------------------------------------------------------------------- /sage/rings/bernmm/README2.txt: -------------------------------------------------------------------------------- 1 | This directory contains the bernmm library, by David Harvey. 2 | 3 | bernmm is maintained as a separate project, see my website dharvey.net. 4 | 5 | If you make any changes/improvements, please tell me about it! 6 | I might want to merge those changes into the upstream version. 7 | -------------------------------------------------------------------------------- /doc/en/reference/parallel.rst: -------------------------------------------------------------------------------- 1 | .. _ch:parallel: 2 | 3 | Parallel Computing 4 | ================== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/parallel/decorate 10 | sage/parallel/reference 11 | sage/parallel/use_fork 12 | sage/parallel/multiprocessing_sage 13 | sage/parallel/ncpus 14 | -------------------------------------------------------------------------------- /sage/gsl/dwt.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | include '../ext/interrupt.pxi' 3 | include "gsl_wavelet.pxi" 4 | import gsl_array 5 | cimport gsl_array 6 | 7 | 8 | cdef class DiscreteWaveletTransform(gsl_array.GSLDoubleArray): 9 | cdef gsl_wavelet* wavelet 10 | cdef gsl_wavelet_workspace* workspace 11 | -------------------------------------------------------------------------------- /sage/gsl/gsl_lambert.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_lambert.h": 2 | 3 | double gsl_sf_lambert_W0(double x) 4 | 5 | int gsl_sf_lambert_W0_e(double x, gsl_sf_result * result) 6 | 7 | double gsl_sf_lambert_Wm1(double x) 8 | 9 | int gsl_sf_lambert_Wm1_e(double x, gsl_sf_result * result) 10 | 11 | -------------------------------------------------------------------------------- /sage/libs/fplll/fplll.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/cdefs.pxi" 2 | include "fplll.pxi" 3 | 4 | cdef class FP_LLL: 5 | cdef ZZ_mat *_lattice 6 | cdef int _check_precision(self, int precision) except -1 7 | cdef int _check_eta(self, float eta) except -1 8 | cdef int _check_delta(self, float delta) except -1 9 | -------------------------------------------------------------------------------- /sage/matrix/matrix_real_double_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix_double_dense 2 | 3 | cdef class Matrix_real_double_dense(matrix_double_dense.Matrix_double_dense): 4 | cdef set_unsafe_double(self, Py_ssize_t i, Py_ssize_t j, double value) 5 | cdef double get_unsafe_double(self, Py_ssize_t i, Py_ssize_t j) 6 | 7 | 8 | -------------------------------------------------------------------------------- /sage/groups/group.pxd: -------------------------------------------------------------------------------- 1 | cimport sage.structure.parent_gens 2 | 3 | cdef class Group(sage.structure.parent_gens.ParentWithGens): 4 | pass 5 | 6 | cdef class AbelianGroup(Group): 7 | pass 8 | 9 | cdef class FiniteGroup(Group): 10 | pass 11 | 12 | cdef class AlgebraicGroup(Group): 13 | pass 14 | 15 | -------------------------------------------------------------------------------- /sage/categories/morphism.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.parent cimport Parent 2 | from sage.structure.element cimport Element 3 | from map cimport Map 4 | 5 | cdef class Morphism(Map): 6 | pass 7 | 8 | cdef class SetMorphism(Morphism): 9 | cdef object _function 10 | cpdef bint _eq_c_impl(left, Element right) 11 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZ_pEContext.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class 5 | 6 | cdef class ntl_ZZ_pEContext_class: 7 | cdef ZZ_pEContext_c x 8 | cdef ntl_ZZ_pContext_class pc 9 | cdef void restore_c(self) 10 | cdef f -------------------------------------------------------------------------------- /sage/structure/coerce_dict.pxd: -------------------------------------------------------------------------------- 1 | cdef class TripleDict: 2 | cdef Py_ssize_t _size 3 | cdef buckets 4 | cdef double threshold 5 | cdef get(self, k1, k2, k3) 6 | cdef set(self, k1, k2, k3, value) 7 | 8 | cdef class TripleDictIter: 9 | cdef TripleDict pairs 10 | cdef buckets, bucket_iter 11 | -------------------------------------------------------------------------------- /sage/matrix/matrix_mpolynomial_dense.pxd: -------------------------------------------------------------------------------- 1 | from sage.matrix.matrix_generic_dense cimport Matrix_generic_dense 2 | 3 | from sage.libs.singular.decl cimport ideal 4 | 5 | cdef class Matrix_mpolynomial_dense(Matrix_generic_dense): 6 | cdef ideal *_to_libsingular(self, bint module) 7 | cdef void _from_libsingular(self, ideal *m) 8 | -------------------------------------------------------------------------------- /sage/rings/solaris_fix.h: -------------------------------------------------------------------------------- 1 | // defines NAN and INFINITY on solaris, etc. 2 | 3 | 4 | #if defined(__sun) 5 | 6 | #define NAN (0.0/0.0) 7 | #define INFINITY __builtin_huge_valf() 8 | 9 | #include # needed to define the function "infinite" 10 | int isinf(double x) { return !finite(x) && x==x; } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /sage/gsl/gsl_synchrotron.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_synchrotron.h": 2 | 3 | double gsl_sf_synchrotron_1(double x) 4 | 5 | int gsl_sf_synchrotron_1_e(double x, gsl_sf_result * result) 6 | 7 | double gsl_sf_synchrotron_2(double x) 8 | 9 | int gsl_sf_synchrotron_2_e(double x, gsl_sf_result * result) 10 | 11 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sage/combinat/family.py: -------------------------------------------------------------------------------- 1 | """ 2 | Families 3 | 4 | This is a backward compatibility stub. Use :mod:`sage.sets.family` instead. 5 | """ 6 | 7 | # Backward compatibility pointer 8 | # Needed for unpickling. 9 | from sage.sets.family import (Family, FiniteFamily, LazyFamily, 10 | FiniteFamilyWithHiddenKeys) 11 | -------------------------------------------------------------------------------- /sage/groups/matrix_gps/all.py: -------------------------------------------------------------------------------- 1 | from general_linear import GL 2 | 3 | from special_linear import SL 4 | 5 | from symplectic import Sp 6 | 7 | from unitary import SU, GU 8 | 9 | from orthogonal import SO, GO 10 | 11 | from matrix_group_element import is_MatrixGroupElement 12 | 13 | from matrix_group import MatrixGroup, is_MatrixGroup 14 | -------------------------------------------------------------------------------- /sage/plot/plot3d/base.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.sage_object cimport SageObject 2 | 3 | 4 | cdef class Graphics3d(SageObject): 5 | cdef public object texture 6 | cdef object _aspect_ratio 7 | cdef object _frame_aspect_ratio 8 | cdef public object _extra_kwds 9 | 10 | cdef class PrimitiveObject(Graphics3d): 11 | pass 12 | -------------------------------------------------------------------------------- /sage/sandpiles/all.py: -------------------------------------------------------------------------------- 1 | from sandpile import Sandpile, SandpileDivisor, SandpileConfig, sandlib, grid_sandpile, complete_sandpile, firing_vector, admissible_partitions, firing_graph, parallel_firing_graph, wilmes_algorithm, min_cycles, partition_sandpile, glue_graphs, random_tree, random_DAG, random_digraph, triangle_sandpile, aztec_sandpile 2 | 3 | -------------------------------------------------------------------------------- /c_lib/include/convert.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | convert.h 4 | 2007 Aug 19 5 | Author: Craig Citro 6 | 7 | C header for conversions to and from pari types. 8 | 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | void t_INT_to_ZZ ( mpz_t value, GEN g ); 16 | void t_FRAC_to_QQ ( mpq_t value, GEN g ); 17 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_GF2EX.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from ntl_GF2EContext cimport ntl_GF2EContext_class 5 | from ntl_GF2E cimport ntl_GF2E 6 | 7 | cdef class ntl_GF2EX: 8 | cdef GF2EX_c x 9 | cdef ntl_GF2EContext_class c 10 | cdef ntl_GF2E _new_element(self) 11 | cdef ntl_GF2EX _new(self) 12 | -------------------------------------------------------------------------------- /sage/libs/symmetrica/symmetrica.pyx: -------------------------------------------------------------------------------- 1 | include "../../ext/interrupt.pxi" 2 | include '../../ext/stdsage.pxi' 3 | 4 | include "symmetrica.pxi" 5 | 6 | include "kostka.pxi" 7 | 8 | include "sab.pxi" 9 | 10 | include "sc.pxi" 11 | 12 | include "sb.pxi" 13 | 14 | include "part.pxi" 15 | 16 | include "schur.pxi" 17 | 18 | include "plet.pxi" 19 | -------------------------------------------------------------------------------- /sage/matrix/matrix_modn_sparse.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix_sparse 2 | 3 | include '../modules/vector_modn_sparse_h.pxi' 4 | 5 | cdef class Matrix_modn_sparse(matrix_sparse.Matrix_sparse): 6 | cdef c_vector_modint* rows 7 | cdef public int p 8 | cdef swap_rows_c(self, Py_ssize_t n1, Py_ssize_t n2) 9 | 10 | cdef _init_linbox(self) 11 | -------------------------------------------------------------------------------- /sage/numerical/all.py: -------------------------------------------------------------------------------- 1 | from optimize import (find_root, find_maximum_on_interval, 2 | find_minimum_on_interval,minimize,minimize_constrained, 3 | linear_program, find_fit) 4 | from sage.numerical.mip import MixedIntegerLinearProgram 5 | from sage.numerical.backends.generic_backend import default_mip_solver 6 | -------------------------------------------------------------------------------- /sage/matrix/matrix_integer_2x2.pxd: -------------------------------------------------------------------------------- 1 | include "../ext/cdefs.pxi" 2 | 3 | cimport matrix_dense 4 | 5 | cdef class Matrix_integer_2x2(matrix_dense.Matrix_dense): 6 | cdef mpz_t a 7 | cdef mpz_t b 8 | cdef mpz_t c 9 | cdef mpz_t d 10 | cdef mpz_t *_entries 11 | 12 | cdef Matrix_integer_2x2 _new_c(self) 13 | 14 | 15 | -------------------------------------------------------------------------------- /sage/modules/vector_integer_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport free_module_element 2 | import free_module_element 3 | 4 | include '../ext/cdefs.pxi' 5 | 6 | cdef class Vector_integer_dense(free_module_element.FreeModuleElement): 7 | cdef mpz_t* _entries 8 | cdef _new_c(self) 9 | cdef _init(self, Py_ssize_t degree, parent) 10 | 11 | -------------------------------------------------------------------------------- /sage/modules/vector_rational_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport free_module_element 2 | import free_module_element 3 | 4 | include '../ext/cdefs.pxi' 5 | 6 | cdef class Vector_rational_dense(free_module_element.FreeModuleElement): 7 | cdef mpq_t* _entries 8 | cdef _new_c(self) 9 | cdef _init(self, Py_ssize_t degree, parent) 10 | 11 | -------------------------------------------------------------------------------- /sage/modular/modsym/solaris_fix.h: -------------------------------------------------------------------------------- 1 | // defines NAN and INFINITY on solaris, etc. 2 | 3 | 4 | #if defined(__sun) 5 | 6 | #define NAN (0.0/0.0) 7 | #define INFINITY __builtin_huge_valf() 8 | 9 | #include # needed to define the function "infinite" 10 | #undef isinf 11 | int isinf(double x) { return !finite(x) && x==x; } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_mat_GF2E.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from ntl_GF2EContext cimport ntl_GF2EContext_class 5 | from ntl_GF2E cimport ntl_GF2E 6 | 7 | cdef class ntl_mat_GF2E: 8 | cdef mat_GF2E_c x 9 | cdef ntl_GF2EContext_class c 10 | cdef ntl_GF2E _new_element(self) 11 | cdef ntl_mat_GF2E _new(self) 12 | -------------------------------------------------------------------------------- /sage/libs/pari/all.py: -------------------------------------------------------------------------------- 1 | import gen as _gen 2 | 3 | pari = _gen.pari 4 | 5 | pari_gen = _gen.gen 6 | 7 | allocatemem = pari.allocatemem 8 | 9 | PariError = _gen.PariError 10 | 11 | from gen import (prec_dec_to_words, prec_dec_to_bits, 12 | prec_bits_to_words, prec_bits_to_dec, 13 | prec_words_to_bits, prec_words_to_dec) 14 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/notebook/debug_window.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 7 |
-------------------------------------------------------------------------------- /sage/stats/hmm/util.pxd: -------------------------------------------------------------------------------- 1 | from sage.finance.time_series cimport TimeSeries 2 | 3 | cdef class HMM_Util: 4 | cpdef normalize_probability_TimeSeries(self, TimeSeries T, Py_ssize_t i, Py_ssize_t j) 5 | cpdef TimeSeries initial_probs_to_TimeSeries(self, pi, bint normalize) 6 | cpdef TimeSeries state_matrix_to_TimeSeries(self, A, int N, bint normalize) 7 | 8 | -------------------------------------------------------------------------------- /doc/en/reference/combinat/posets.rst: -------------------------------------------------------------------------------- 1 | Posets 2 | ====== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | ../sage/combinat/posets/posets 8 | ../sage/combinat/posets/hasse_diagram 9 | ../sage/combinat/posets/elements 10 | ../sage/combinat/posets/lattices 11 | ../sage/combinat/posets/linear_extensions 12 | ../sage/combinat/posets/poset_examples 13 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZ_p.pxd: -------------------------------------------------------------------------------- 1 | 2 | include "decl.pxi" 3 | 4 | from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class 5 | 6 | cdef class ntl_ZZ_p: 7 | cdef ZZ_p_c x 8 | cdef ntl_ZZ_pContext_class c 9 | cdef public int get_as_int(ntl_ZZ_p self) 10 | cdef public void set_from_int(ntl_ZZ_p self, int value) 11 | cdef ntl_ZZ_p _new(self) 12 | -------------------------------------------------------------------------------- /sage/modules/vector_mod2_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport free_module_element 2 | import free_module_element 3 | 4 | from sage.libs.m4ri cimport mzd_t 5 | 6 | cdef class Vector_mod2_dense(free_module_element.FreeModuleElement): 7 | cdef mzd_t *_entries 8 | cdef object _base_ring 9 | 10 | cdef _new_c(self) 11 | cdef _init(self, Py_ssize_t degree, parent) 12 | -------------------------------------------------------------------------------- /sage/plot/plot3d/examples.py: -------------------------------------------------------------------------------- 1 | r""" 2 | Introduction 3 | 4 | EXAMPLES:: 5 | 6 | sage: x, y = var('x y') 7 | sage: W = plot3d(sin(pi*((x)^2+(y)^2))/2,(x,-1,1),(y,-1,1), frame=False, color='purple', opacity=0.8) 8 | sage: S = sphere((0,0,0),size=0.3, color='red', aspect_ratio=[1,1,1]) 9 | sage: show(W + S, figsize=8) 10 | """ 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /sage/rings/polynomial/polynomial_integer_dense_ntl.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/cdefs.pxi" 2 | include "../../libs/ntl/decl.pxi" # to get ZZX_c etc 3 | 4 | from sage.rings.polynomial.polynomial_element cimport Polynomial 5 | 6 | cdef class Polynomial_integer_dense_ntl(Polynomial): 7 | cdef ZZX_c __poly 8 | 9 | cdef Polynomial_integer_dense_ntl _new(self) 10 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/worksheet/published_worksheet.html: -------------------------------------------------------------------------------- 1 | {# 2 | INPUT: 3 | - cell_id_list - a list of cell id's 4 | - cells_html - string of cells HTML 5 | #} 6 | {% set published = true %} 7 | {% set do_print = true %} 8 | 9 | {% include "worksheet/worksheet_body.html" %} 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/en/reference/polynomial_rings_toy_implementations.rst: -------------------------------------------------------------------------------- 1 | 2 | Educational Versions of Groebner Basis and Related Algorithms 3 | ============================================================= 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | sage/rings/polynomial/toy_buchberger 9 | sage/rings/polynomial/toy_variety 10 | sage/rings/polynomial/toy_d_basis 11 | 12 | -------------------------------------------------------------------------------- /sage/modular/modsym/apply.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/stdsage.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from sage.libs.flint.flint cimport * 5 | include "../../libs/flint/fmpz_poly.pxi" 6 | 7 | 8 | cdef class Apply: 9 | cdef fmpz_poly_t f, g, ff, gg 10 | cdef int apply_to_monomial_flint(self, fmpz_poly_t ans, int i, int j, int a, int b, int c, int d) except -1 11 | -------------------------------------------------------------------------------- /sage/plot/plot3d/parametric_surface.pxd: -------------------------------------------------------------------------------- 1 | from index_face_set cimport IndexFaceSet 2 | from transform cimport point_c, face_c 3 | 4 | cdef class ParametricSurface(IndexFaceSet): 5 | cdef object f 6 | cdef object render_grid 7 | cdef int eval_grid(self, urange, vrange) except -1 8 | cdef int eval_c(self, point_c *res, double u, double v) except -1 9 | 10 | -------------------------------------------------------------------------------- /sage/rings/padics/local_generic_element.pxd: -------------------------------------------------------------------------------- 1 | import sage.structure.element 2 | cimport sage.structure.element 3 | from sage.structure.element cimport RingElement, ModuleElement, CommutativeRingElement 4 | 5 | cdef class LocalGenericElement(CommutativeRingElement): 6 | cpdef RingElement _div_(self, RingElement right) 7 | cpdef ModuleElement _sub_(self, ModuleElement right) 8 | -------------------------------------------------------------------------------- /sage/rings/padics/padic_ZZ_pX_element.pxd: -------------------------------------------------------------------------------- 1 | include "../../libs/ntl/decl.pxi" 2 | 3 | from sage.rings.padics.padic_ext_element cimport pAdicExtElement 4 | from sage.rings.padics.pow_computer_ext cimport PowComputer_ZZ_pX 5 | from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class 6 | 7 | cdef class pAdicZZpXElement(pAdicExtElement): 8 | cdef PowComputer_ZZ_pX prime_pow 9 | -------------------------------------------------------------------------------- /doc/en/reference/polynomial_rings_infinite.rst: -------------------------------------------------------------------------------- 1 | 2 | Infinite Polynomial Rings 3 | ========================= 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | sage/rings/polynomial/infinite_polynomial_ring 9 | sage/rings/polynomial/infinite_polynomial_element 10 | 11 | sage/rings/polynomial/symmetric_ideal 12 | sage/rings/polynomial/symmetric_reduction 13 | 14 | -------------------------------------------------------------------------------- /sage/gsl/interpolation.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | include '../ext/interrupt.pxi' 3 | include 'gsl.pxi' 4 | 5 | cdef class Spline: 6 | cdef double *x, *y 7 | cdef gsl_interp_accel *acc 8 | cdef gsl_spline *spline 9 | cdef int started 10 | cdef object v 11 | 12 | cdef start_interp(self) 13 | cdef stop_interp(self) 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /sage/modular/modsym/all.py: -------------------------------------------------------------------------------- 1 | from element import set_modsym_print_mode, is_ModularSymbolsElement 2 | 3 | from modsym import ModularSymbols, ModularSymbols_clear_cache 4 | 5 | from space import is_ModularSymbolsSpace 6 | 7 | from heilbronn import HeilbronnCremona, HeilbronnMerel 8 | 9 | from p1list import P1List, lift_to_sl2z 10 | 11 | from p1list_nf import P1NFList, MSymbol 12 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/yes_no.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %} 3 | 4 | {% block title %}Confirm{% endblock %} 5 | 6 | {% block body %} 7 | 8 | 13 |
9 | {{ message }} 10 |

11 | Yes or No? 12 |
14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /sage/geometry/triangulation/triangulations.pxd: -------------------------------------------------------------------------------- 1 | 2 | 3 | cdef extern from "triangulations.h": 4 | ctypedef void* triangulations_ptr 5 | cdef triangulations_ptr init_triangulations \ 6 | (int n, int d, int star, bint fine, object seed, object flips) 7 | cdef object next_triangulation(triangulations_ptr) 8 | cdef void delete_triangulations(triangulations_ptr) 9 | 10 | -------------------------------------------------------------------------------- /sage/rings/integer_ring.pxd: -------------------------------------------------------------------------------- 1 | include "../ext/cdefs.pxi" 2 | include "../libs/ntl/decl.pxi" 3 | 4 | from ring cimport PrincipalIdealDomain 5 | from integer cimport Integer 6 | 7 | cdef class IntegerRing_class(PrincipalIdealDomain): 8 | cdef Integer _coerce_ZZ(self, ZZ_c *z) 9 | cdef int _randomize_mpz(self, mpz_t value, x, y, distribution) except -1 10 | cdef object _zero 11 | -------------------------------------------------------------------------------- /sage/graphs/trees.pxd: -------------------------------------------------------------------------------- 1 | 2 | cdef class TreeIterator: 3 | cdef int vertices 4 | cdef int first_time 5 | cdef int p 6 | cdef int q 7 | cdef int h1 8 | cdef int h2 9 | cdef int c 10 | cdef int r 11 | cdef int *l 12 | cdef int *current_level_sequence 13 | cdef int generate_first_level_sequence(self) 14 | cdef int generate_next_level_sequence(self) 15 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_lzz_p.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | 3 | from sage.libs.ntl.ntl_lzz_pContext cimport ntl_zz_pContext_class 4 | from sage.libs.ntl.ntl_lzz_p_decl cimport *,zz_p_c 5 | 6 | #cdef extern from "ntl_wrap.h": 7 | # struct zz_p_c 8 | 9 | cdef class ntl_zz_p: 10 | cdef zz_p_c x 11 | cdef ntl_zz_pContext_class c 12 | cdef ntl_zz_p _new(ntl_zz_p self) 13 | 14 | 15 | -------------------------------------------------------------------------------- /sage/rings/finite_rings/finite_field_base.pxd: -------------------------------------------------------------------------------- 1 | from sage.rings.ring cimport Field 2 | 3 | cdef class FiniteField(Field): 4 | cdef public object __factored_unit_order 5 | cdef public object __multiplicative_generator 6 | cdef public object __polynomial_ring 7 | cdef public object __vector_space 8 | cdef public object __interface 9 | cdef public object _kwargs 10 | 11 | -------------------------------------------------------------------------------- /sage/graphs/base/static_sparse_graph.pxd: -------------------------------------------------------------------------------- 1 | ctypedef unsigned short ushort 2 | 3 | include "../../misc/bitset_pxd.pxi" 4 | 5 | ctypedef struct short_digraph_s: 6 | ushort n 7 | ushort * edges 8 | ushort ** neighbors 9 | 10 | ctypedef short_digraph_s short_digraph[1] 11 | 12 | cdef int init_short_digraph(short_digraph g, G) except -1 13 | cdef void free_short_digraph(short_digraph g) 14 | -------------------------------------------------------------------------------- /sage/matrix/all.py: -------------------------------------------------------------------------------- 1 | from matrix_space import MatrixSpace, is_MatrixSpace 2 | from constructor import matrix, Matrix, column_matrix, random_matrix, diagonal_matrix, identity_matrix, block_matrix, block_diagonal_matrix, jordan_block, zero_matrix, ones_matrix, elementary_matrix, companion_matrix 3 | from matrix import is_Matrix 4 | from berlekamp_massey import berlekamp_massey 5 | 6 | 7 | Mat = MatrixSpace 8 | 9 | -------------------------------------------------------------------------------- /sage/schemes/hyperelliptic_curves/all.py: -------------------------------------------------------------------------------- 1 | from constructor import HyperellipticCurve 2 | from hyperelliptic_generic import is_HyperellipticCurve 3 | from kummer_surface import KummerSurface 4 | from invariants import (igusa_clebsch_invariants, 5 | absolute_igusa_invariants_kohel, 6 | absolute_igusa_invariants_wamelen, 7 | clebsch_invariants) 8 | -------------------------------------------------------------------------------- /sage/combinat/root_system/__init__.py: -------------------------------------------------------------------------------- 1 | # Makes sage.combinat.root_system? equivalent to sage.combinat.root_system.root_system? 2 | from root_system import __doc__ 3 | 4 | # currently needed to activate the backward compatibility register_unpickle_override 5 | import type_A 6 | import type_B 7 | import type_C 8 | import type_D 9 | import type_E 10 | import type_F 11 | import type_G 12 | 13 | import all 14 | -------------------------------------------------------------------------------- /sage/misc/copying.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pager 3 | 4 | 5 | class License: 6 | def __call__(self): 7 | pager.pager()(self.__str__()) 8 | 9 | def __repr__(self): 10 | return "Type license() to see the full license text." 11 | 12 | def __str__(self): 13 | return open(os.environ['SAGE_ROOT'] + '/COPYING.txt').read() 14 | 15 | 16 | license = License() 17 | 18 | -------------------------------------------------------------------------------- /doc/en/reference/quadratic_forms.rst: -------------------------------------------------------------------------------- 1 | .. _ch:quadratic_forms: 2 | 3 | Quadratic Forms 4 | =============== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/quadratic_forms/quadratic_form 10 | sage/quadratic_forms/binary_qf 11 | sage/quadratic_forms/constructions 12 | sage/quadratic_forms/random_quadraticform 13 | sage/quadratic_forms/special_values 14 | sage/quadratic_forms/count_local_2 15 | -------------------------------------------------------------------------------- /sage/gsl/fft.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | include '../ext/interrupt.pxi' 3 | include 'gsl.pxi' 4 | 5 | cdef class FastFourierTransform_base: 6 | pass 7 | 8 | cdef class FastFourierTransform_complex(FastFourierTransform_base): 9 | 10 | cdef double * data 11 | cdef size_t n 12 | cdef size_t stride 13 | cdef gsl_fft_complex_wavetable * wt 14 | cdef gsl_fft_complex_workspace * mem 15 | -------------------------------------------------------------------------------- /sage/stats/all.py: -------------------------------------------------------------------------------- 1 | from r import (ttest) 2 | from basic_stats import (mean, mode, std, variance, median, moving_average) 3 | 4 | import hmm.all as hmm 5 | 6 | # We lazy_import the following modules since they import numpy which slows down sage startup 7 | from sage.misc.lazy_import import lazy_import 8 | lazy_import("sage.finance.time_series", ["TimeSeries"]) 9 | lazy_import("sage.stats.intlist",["IntList"]) 10 | -------------------------------------------------------------------------------- /doc/en/reference/cmd.rst: -------------------------------------------------------------------------------- 1 | .. _ch:cmdline: 2 | 3 | The Sage Command Line 4 | ===================== 5 | 6 | The chapter lists the Sage command line options. For more details 7 | about how to use the Sage command line once it starts up, see the 8 | Sage tutorial and the documentation for IPython. 9 | 10 | .. toctree:: 11 | :maxdepth: 2 12 | 13 | options 14 | startup 15 | environ 16 | sage/misc/trace 17 | -------------------------------------------------------------------------------- /doc/en/reference/combinat/iet.rst: -------------------------------------------------------------------------------- 1 | Interval exchange transformations and linear involutions 2 | ======================================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | ../sage/combinat/iet/constructors 8 | ../sage/combinat/iet/strata 9 | ../sage/combinat/iet/labelled 10 | ../sage/combinat/iet/reduced 11 | ../sage/combinat/iet/template 12 | ../sage/combinat/iet/iet 13 | -------------------------------------------------------------------------------- /sage/libs/flint/flint.pyx: -------------------------------------------------------------------------------- 1 | """ 2 | TESTS: 3 | 4 | We verify that Trac #6919 is correctly fixed:: 5 | 6 | sage: R. = PolynomialRing(ZZ) 7 | sage: A = 2^(2^17+2^15) 8 | sage: a = A * x^31 9 | sage: b = (A * x) * x^30 10 | sage: a == b 11 | True 12 | """ 13 | include "../../ext/stdsage.pxi" 14 | include "../../ext/cdefs.pxi" 15 | 16 | def free_flint_stack(): 17 | flint_stack_cleanup() 18 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZ_pEX.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class 5 | 6 | cdef class ntl_ZZ_pEX: 7 | cdef ZZ_pEX_c x 8 | cdef ntl_ZZ_pEContext_class c 9 | #cdef void setitem_from_int(ntl_ZZ_pX self, long i, int value) 10 | #cdef int getitem_as_int(ntl_ZZ_pX self, long i) 11 | cdef ntl_ZZ_pEX _new(self) 12 | -------------------------------------------------------------------------------- /sage/rings/padics/all.py: -------------------------------------------------------------------------------- 1 | from generic_nodes import is_pAdicField, is_pAdicRing 2 | from factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZqCR, ZqCA, ZqFM #, ZpL, ZqL 3 | from factory import Qp, Qq, Qp as pAdicField, QpCR, QqCR #, QpL, QqL 4 | from factory import pAdicExtension 5 | from padic_generic import local_print_mode 6 | from pow_computer import PowComputer 7 | from pow_computer_ext import PowComputer_ext_maker 8 | -------------------------------------------------------------------------------- /sage/matrix/matrix_integer_sparse.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | include '../modules/vector_integer_sparse_h.pxi' 3 | 4 | cdef extern from "../ext/multi_modular.h": 5 | ctypedef unsigned long mod_int 6 | 7 | cimport matrix_sparse 8 | 9 | cdef class Matrix_integer_sparse(matrix_sparse.Matrix_sparse): 10 | cdef mpz_vector* _matrix 11 | cdef int _initialized 12 | 13 | cdef _mod_int_c(self, mod_int p) 14 | -------------------------------------------------------------------------------- /doc/en/reference/functions.rst: -------------------------------------------------------------------------------- 1 | Functions 2 | ========= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/functions/log 8 | sage/functions/hyperbolic 9 | sage/functions/transcendental 10 | sage/functions/piecewise 11 | sage/functions/orthogonal_polys 12 | sage/functions/other 13 | sage/functions/special 14 | sage/functions/wigner 15 | sage/functions/generalized 16 | sage/functions/prime_pi 17 | -------------------------------------------------------------------------------- /sage/gsl/gsl_diff.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_diff.h": 2 | int gsl_diff_central ( gsl_function *f, double x, 3 | double *result, double *abserr) 4 | 5 | int gsl_diff_backward ( gsl_function *f, double x, 6 | double *result, double *abserr) 7 | 8 | int gsl_diff_forward ( gsl_function *f, double x, 9 | double *result, double *abserr) 10 | 11 | -------------------------------------------------------------------------------- /sage/groups/all.py: -------------------------------------------------------------------------------- 1 | from pari_group import PariGroup 2 | 3 | from matrix_gps.all import (GL, SL, Sp, SU, GU, SO, GO, 4 | MatrixGroup, is_MatrixGroup, 5 | is_MatrixGroupElement) 6 | from abelian_gps.all import * 7 | 8 | from perm_gps.all import * 9 | 10 | from generic import * 11 | 12 | from class_function import ClassFunction 13 | 14 | from additive_abelian.all import * 15 | -------------------------------------------------------------------------------- /sage/misc/attach.py: -------------------------------------------------------------------------------- 1 | """ 2 | Attach a file to a running instance of Sage. 3 | """ 4 | 5 | class Attach: 6 | """ 7 | Attach a file to a running instance of Sage. 8 | """ 9 | def __repr__(self): 10 | return self.__doc__ 11 | 12 | def __call__(self, *args, **kwds): 13 | raise RuntimeError, "Use 'attach filename' instead, where filename is a .py, .sage, or .spyx file." 14 | 15 | attach = Attach() 16 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/error_message.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %} 3 | 4 | {% block title %}Error{% endblock %} 5 | 6 | {% block body %} 7 |
Home 8 |
9 |

10 | {{ msg }} 11 |

12 | {% if cont %} 13 |
Continue
14 | {% endif %} 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /doc/en/reference/combinat/developer.rst: -------------------------------------------------------------------------------- 1 | Developer Tools 2 | =============== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | ../sage/combinat/backtrack 8 | ../sage/combinat/output 9 | ../sage/combinat/permutation_nk 10 | ../sage/combinat/split_nk 11 | ../sage/combinat/choose_nk 12 | ../sage/combinat/multichoose_nk 13 | ../sage/combinat/tools 14 | ../sage/combinat/generator 15 | ../sage/combinat/ranker 16 | -------------------------------------------------------------------------------- /doc/en/reference/function_fields.rst: -------------------------------------------------------------------------------- 1 | Algebraic Function Fields 2 | ========================= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/rings/function_field/function_field 8 | sage/rings/function_field/function_field_element 9 | sage/rings/function_field/function_field_order 10 | sage/rings/function_field/function_field_ideal 11 | sage/rings/function_field/maps 12 | sage/rings/function_field/constructor 13 | -------------------------------------------------------------------------------- /doc/en/reference/todolist.rst: -------------------------------------------------------------------------------- 1 | .. _ch:todolist: 2 | 3 | SAGE's To Do list 4 | ================= 5 | 6 | There is still some work to do :-) : 7 | 8 | .. warning:: 9 | 10 | This list is currently very incomplete as most doctests do not use the 11 | ``.. todo::`` markup. 12 | 13 | .. todo:: 14 | 15 | Rewrite the hand-written TODOs by using the correct ``.. todo::`` 16 | markup. 17 | 18 | .. todolist:: 19 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZ_pE.pxd: -------------------------------------------------------------------------------- 1 | 2 | include "decl.pxi" 3 | 4 | from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class 5 | from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX 6 | 7 | cdef class ntl_ZZ_pE: 8 | cdef ZZ_pE_c x 9 | cdef ntl_ZZ_pEContext_class c 10 | cdef public ntl_ZZ_pX get_as_ZZ_pX(ntl_ZZ_pE self) 11 | cdef public void set_from_ZZ_pX(ntl_ZZ_pE self, ntl_ZZ_pX value) 12 | cdef ntl_ZZ_pE _new(self) 13 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_lzz_pX.pxd: -------------------------------------------------------------------------------- 1 | from sage.libs.ntl.ntl_lzz_pX_decl cimport *, zz_pX_c, zz_pX_Modulus_c 2 | from sage.libs.ntl.ntl_lzz_p_decl cimport *, zz_p_c 3 | 4 | from sage.libs.ntl.ntl_lzz_pContext cimport ntl_zz_pContext_class 5 | 6 | #cdef extern from "ntl_wrap.h": 7 | # struct zz_pX 8 | 9 | cdef class ntl_zz_pX: 10 | cdef zz_pX_c x 11 | cdef ntl_zz_pContext_class c 12 | cdef ntl_zz_pX _new(self) 13 | 14 | 15 | -------------------------------------------------------------------------------- /sage/crypto/all.py: -------------------------------------------------------------------------------- 1 | from classical import ( 2 | AffineCryptosystem, 3 | HillCryptosystem, 4 | SubstitutionCryptosystem, 5 | ShiftCryptosystem, 6 | TranspositionCryptosystem, 7 | VigenereCryptosystem) 8 | 9 | from stream import ( 10 | LFSRCryptosystem, 11 | ShrinkingGeneratorCryptosystem) 12 | 13 | from lfsr import ( 14 | lfsr_sequence, 15 | lfsr_autocorrelation, 16 | lfsr_connection_polynomial) 17 | -------------------------------------------------------------------------------- /sage/structure/wrapper_parent.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.parent cimport Parent 2 | from sage.categories.morphism cimport Morphism 3 | from sage.structure.element cimport AlgebraElement, Element, ModuleElement, RingElement 4 | 5 | cdef class WrapperParent_model0(Parent): 6 | cdef Parent R 7 | 8 | cdef class WrapperParent_model1(Parent): 9 | cdef Parent R 10 | 11 | cdef class WrapperElement(AlgebraElement): 12 | cdef Element val 13 | -------------------------------------------------------------------------------- /sage/libs/flint/fmpz_poly.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/stdsage.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from flint cimport * 5 | include "fmpz_poly.pxi" 6 | 7 | from sage.structure.sage_object cimport SageObject 8 | 9 | cdef class Fmpz_poly(SageObject): 10 | cdef fmpz_poly_t poly 11 | 12 | cdef extern from "FLINT/fmpz_poly.h": 13 | cdef void fmpz_poly_reverse(fmpz_poly_t output, fmpz_poly_t input, 14 | unsigned long length) 15 | -------------------------------------------------------------------------------- /sage/homology/all.py: -------------------------------------------------------------------------------- 1 | from chain_complex import ChainComplex 2 | 3 | from chain_complex_morphism import ChainComplexMorphism 4 | 5 | from simplicial_complex import SimplicialComplex, Simplex 6 | 7 | from simplicial_complex_morphism import SimplicialComplexMorphism 8 | 9 | from examples import simplicial_complexes 10 | 11 | from delta_complex import DeltaComplex, delta_complexes 12 | 13 | from cubical_complex import CubicalComplex, cubical_complexes 14 | -------------------------------------------------------------------------------- /sage/misc/refcount.pyx: -------------------------------------------------------------------------------- 1 | cdef extern from *: 2 | ctypedef struct PyObject: 3 | Py_ssize_t ob_refcnt 4 | 5 | def ref_count(o): 6 | """ 7 | Return the number of references to \code{o}. 8 | 9 | EXAMPLES: 10 | sage: from sage.misc.refcount import ref_count 11 | sage: ref_count(33) 12 | 1 13 | sage: L = [-7] * 5 14 | sage: ref_count(L[0]) 15 | 6 16 | """ 17 | return (o).ob_refcnt 18 | -------------------------------------------------------------------------------- /doc/en/reference/rings_standard.rst: -------------------------------------------------------------------------------- 1 | Standard Commutative Rings 2 | ========================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/rings/integer_ring 8 | sage/rings/integer 9 | 10 | sage/rings/finite_rings/integer_mod_ring 11 | sage/rings/finite_rings/integer_mod 12 | 13 | sage/rings/rational_field 14 | sage/rings/rational 15 | 16 | sage/rings/finite_rings/constructor 17 | sage/rings/finite_rings/element_base 18 | -------------------------------------------------------------------------------- /sage/matrix/matrix_rational_sparse.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | include '../modules/vector_rational_sparse_h.pxi' 3 | 4 | cimport matrix_sparse 5 | 6 | cdef class Matrix_rational_sparse(matrix_sparse.Matrix_sparse): 7 | cdef mpq_vector* _matrix 8 | cdef int _initialized 9 | 10 | cdef int mpz_denom(self, mpz_t d) except -1 11 | cdef int mpz_height(self, mpz_t height) except -1 12 | 13 | cdef _dealloc(self) 14 | 15 | 16 | -------------------------------------------------------------------------------- /doc/en/reference/power_series.rst: -------------------------------------------------------------------------------- 1 | .. _ch:power-series: 2 | 3 | Power Series Rings 4 | ================== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/rings/power_series_ring 10 | sage/rings/power_series_ring_element 11 | sage/rings/power_series_poly 12 | 13 | sage/rings/multi_power_series_ring 14 | sage/rings/multi_power_series_ring_element 15 | 16 | sage/rings/laurent_series_ring 17 | sage/rings/laurent_series_ring_element 18 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZ_pContext.pxd: -------------------------------------------------------------------------------- 1 | include "decl.pxi" 2 | include "../../ext/cdefs.pxi" 3 | 4 | from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ 5 | 6 | cdef class ntl_ZZ_pContext_class: 7 | cdef ZZ_pContext_c x 8 | cdef void restore_c(self) 9 | cdef ntl_ZZ p 10 | cdef double p_bits 11 | cdef object __weakref__ 12 | 13 | cdef class ntl_ZZ_pContext_factory: 14 | cdef object context_dict 15 | cdef ntl_ZZ_pContext_class make_c(self, ntl_ZZ v) 16 | -------------------------------------------------------------------------------- /sage/rings/power_series_ring_element.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport AlgebraElement, RingElement 2 | 3 | cdef class PowerSeries(AlgebraElement): 4 | cdef char __is_gen 5 | cdef _prec 6 | cdef common_prec_c(self, PowerSeries other) 7 | #_prec(self, RingElement right_r) 8 | 9 | # UNSAFE, only call from an inplace operator 10 | # may return a new element if not possible to modify inplace 11 | cdef _inplace_truncate(self, long prec) -------------------------------------------------------------------------------- /sage/schemes/hyperelliptic_curves/hypellfrob/README: -------------------------------------------------------------------------------- 1 | This directory contains the main source files for hypellfrob 2 | version 2.1.1, by David Harvey. 3 | 4 | hypellfrob is also maintained as a separate project, see 5 | http://cims.nyu.edu/~harvey/hypellfrob/ 6 | 7 | At that web site you'll find a standalone demo program and 8 | a test suite. 9 | 10 | hypellfrob 2.1.1 is Copyright (C) 2007, 2008 David Harvey and is 11 | licensed under the GPL (version 2 or later). 12 | -------------------------------------------------------------------------------- /doc/en/bordeaux_2008/birds_eye_view.rst: -------------------------------------------------------------------------------- 1 | A Bird's Eye View 2 | ================= 3 | 4 | We now take a whirlwind tour of some of the number theoretical 5 | functionality of Sage. There is much that we won't cover here, but 6 | this should help give you a flavor for some of the number theoretic 7 | capabilities of Sage, much of which is unique to Sage. 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | integer_factorization 13 | elliptic_curves 14 | birds_other -------------------------------------------------------------------------------- /sage/quadratic_forms/genera/all.py: -------------------------------------------------------------------------------- 1 | #***************************************************************************** 2 | # Copyright (C) 2007 David Kohel 3 | # 4 | # Distributed under the terms of the GNU General Public License (GPL) 5 | # 6 | # http://www.gnu.org/licenses/ 7 | #***************************************************************************** 8 | 9 | from genus import Genus, LocalGenusSymbol, is_GlobalGenus 10 | -------------------------------------------------------------------------------- /sage/geometry/all.py: -------------------------------------------------------------------------------- 1 | from cone import Cone 2 | 3 | from fan import Fan, FaceFan, NormalFan 4 | 5 | from fan_morphism import FanMorphism 6 | 7 | from polytope import polymake 8 | 9 | from polyhedron.all import * 10 | 11 | from lattice_polytope import (LatticePolytope, NefPartition, ReflexivePolytope, 12 | ReflexivePolytopes) 13 | 14 | import lattice_polytope 15 | 16 | from toric_lattice import ToricLattice 17 | 18 | 19 | import toric_plotter 20 | -------------------------------------------------------------------------------- /sage/gsl/callback.pyx: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | include '../ext/interrupt.pxi' 3 | 4 | include 'gsl.pxi' 5 | 6 | 7 | foo = None 8 | cdef double f(double x, void* p): 9 | return foo(x) 10 | 11 | def diff(g, double x=1.0): 12 | cdef double result, abserr 13 | cdef gsl_function F 14 | 15 | global foo 16 | foo = g 17 | F.function = f 18 | F.params = NULL 19 | 20 | gsl_diff_central(&F, x, &result, &abserr) 21 | 22 | return result, abserr 23 | -------------------------------------------------------------------------------- /c_lib/include/mpz_pylong.h: -------------------------------------------------------------------------------- 1 | #ifndef MPZ_PYLONG_H 2 | #define MPZ_PYLONG_H 3 | 4 | #include 5 | #include 6 | 7 | /* mpz -> pylong conversion */ 8 | PyObject * mpz_get_pylong(mpz_srcptr z); 9 | 10 | /* mpz -> pyint/pylong conversion */ 11 | PyObject * mpz_get_pyintlong(mpz_srcptr z); 12 | 13 | /* pylong -> mpz conversion */ 14 | int mpz_set_pylong(mpz_ptr z, PyObject * ll); 15 | 16 | /* mpz python hash */ 17 | long mpz_pythonhash (mpz_srcptr z); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /sage/matrix/matrix_double_dense.pxd: -------------------------------------------------------------------------------- 1 | cimport matrix_dense 2 | cimport numpy as cnumpy 3 | 4 | cdef class Matrix_double_dense(matrix_dense.Matrix_dense): 5 | cdef object _numpy_dtype 6 | # cdef cnumpy.NPY_TYPES _numpy_dtypeint 7 | cdef int _numpy_dtypeint 8 | cdef object _python_dtype 9 | cdef object _sage_dtype 10 | cdef object _sage_vector_dtype 11 | cdef Matrix_double_dense _new(self, int nrows=*, int ncols=*) 12 | cdef cnumpy.ndarray _matrix_numpy 13 | -------------------------------------------------------------------------------- /sage/combinat/iet/all.py: -------------------------------------------------------------------------------- 1 | import constructors as iet 2 | 3 | from strata import AbelianStratum, QuadraticStratum 4 | from strata import AbelianStrata 5 | 6 | #################################################### 7 | # to remove 8 | #from constructors import PermutationIET, PermutationLI 9 | #from constructors import GeneralizedPermutation 10 | #from constructors import PermutationsIET 11 | #from constructors import RauzyDiagram 12 | 13 | #from iet import IntervalExchangeTransformation 14 | -------------------------------------------------------------------------------- /sage/rings/padics/padic_base_generic_element.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/cdefs.pxi" 2 | 3 | from padic_generic_element cimport pAdicGenericElement 4 | from pow_computer cimport PowComputer_base 5 | 6 | cdef class pAdicBaseGenericElement(pAdicGenericElement): 7 | cdef PowComputer_base prime_pow 8 | cdef int _set_mpz_into(self, mpz_t dest) except -1 9 | cdef int _set_mpq_into(self, mpq_t dest) except -1 10 | cdef int teichmuller_set_c(self, mpz_t value, mpz_t ppow) except -1 11 | -------------------------------------------------------------------------------- /doc/en/reference/combinat/algebra.rst: -------------------------------------------------------------------------------- 1 | Combinatorial Algebras 2 | ====================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | ../sage/combinat/free_module 8 | ../sage/combinat/combinatorial_algebra 9 | ../sage/combinat/symmetric_group_algebra 10 | ../sage/combinat/schubert_polynomial 11 | ../sage/combinat/partition_algebra 12 | ../sage/algebras/iwahori_hecke_algebra 13 | ../sage/algebras/nil_coxeter_algebra 14 | ../sage/algebras/affine_nil_temperley_lieb 15 | -------------------------------------------------------------------------------- /doc/en/reference/monoids.rst: -------------------------------------------------------------------------------- 1 | .. _ch:monoids: 2 | 3 | Monoids 4 | ======= 5 | 6 | Sage supports free monoids and free abelian monoids in any 7 | finite number of indeterminates. 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | sage/monoids/monoid 13 | sage/monoids/free_monoid 14 | sage/monoids/free_monoid_element 15 | sage/monoids/free_abelian_monoid 16 | sage/monoids/free_abelian_monoid_element 17 | sage/monoids/string_monoid_element 18 | sage/monoids/string_monoid 19 | -------------------------------------------------------------------------------- /sage/modular/congroup_element.py: -------------------------------------------------------------------------------- 1 | ########################################################### 2 | # Re-bindings for unpickling 3 | # 4 | # We want to ensure class 5 | # sage.modular.congroup_element.CongruenceSubgroupElement still exists, so we 6 | # can unpickle safely. 7 | # 8 | ########################################################### 9 | 10 | from sage.modular.arithgroup.arithgroup_element import ArithmeticSubgroupElement 11 | 12 | CongruenceSubgroupElement = ArithmeticSubgroupElement 13 | -------------------------------------------------------------------------------- /sage/rings/polynomial/multi_polynomial_ring_generic.pxd: -------------------------------------------------------------------------------- 1 | import sage.rings.ring 2 | cimport sage.rings.ring 3 | 4 | from sage.structure.parent cimport Parent 5 | 6 | cdef class MPolynomialRing_generic(sage.rings.ring.CommutativeRing): 7 | cdef object __ngens 8 | cdef object __term_order 9 | cdef public object _has_singular 10 | cdef public object _magma_gens, _magma_cache 11 | 12 | cdef _coerce_c_impl(self, x) 13 | cdef int _cmp_c_impl(left, Parent right) except -2 14 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/list_top.html: -------------------------------------------------------------------------------- 1 | 2 | {% include 'top_bar.html' %} 3 | 4 | 5 | {% if pub is not defined or not pub %} 6 | New Worksheet 7 | Upload 8 | {% if not accounts %} 9 | Download All 10 | {% endif %} 11 | {% endif %} 12 | 13 | {% include 'search.html' %} 14 | 15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /sage/combinat/root_system/all.py: -------------------------------------------------------------------------------- 1 | from associahedron import Associahedron 2 | from cartan_type import CartanType 3 | from dynkin_diagram import DynkinDiagram, dynkin_diagram 4 | from cartan_matrix import cartan_matrix 5 | from coxeter_matrix import coxeter_matrix 6 | from root_system import RootSystem, WeylDim 7 | from weyl_group import WeylGroup, WeylGroupElement 8 | from weyl_characters import WeylCharacterRing, branch_weyl_character, branching_rule_from_plethysm, get_branching_rule, WeightRing 9 | 10 | -------------------------------------------------------------------------------- /sage/schemes/generic/all.py: -------------------------------------------------------------------------------- 1 | # code exports 2 | 3 | from spec import Spec, is_Spec 4 | from affine_space import AffineSpace, is_AffineSpace 5 | from algebraic_scheme import is_AlgebraicScheme 6 | from ambient_space import is_AmbientSpace 7 | from morphism import is_SchemeMorphism 8 | from projective_space import ProjectiveSpace, is_ProjectiveSpace 9 | from scheme import is_Scheme, is_AffineScheme 10 | from hypersurface import ProjectiveHypersurface, AffineHypersurface 11 | -------------------------------------------------------------------------------- /sage/sets/all.py: -------------------------------------------------------------------------------- 1 | from set import Set, is_Set, EnumeratedSet 2 | from integer_range import IntegerRange 3 | from non_negative_integers import NonNegativeIntegers 4 | from positive_integers import PositiveIntegers 5 | from finite_enumerated_set import FiniteEnumeratedSet 6 | from disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets 7 | from primes import Primes 8 | 9 | from family import Family 10 | 11 | from disjoint_set import DisjointSet 12 | from finite_set_maps import FiniteSetMaps 13 | 14 | -------------------------------------------------------------------------------- /sage/gsl/gsl_debye.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_debye.h": 2 | 3 | double gsl_sf_debye_1(double x) 4 | 5 | int gsl_sf_debye_1_e(double x, gsl_sf_result * result) 6 | 7 | double gsl_sf_debye_2(double x) 8 | 9 | int gsl_sf_debye_2_e(double x, gsl_sf_result * result) 10 | 11 | double gsl_sf_debye_3(double x) 12 | 13 | int gsl_sf_debye_3_e(double x, gsl_sf_result * result) 14 | 15 | double gsl_sf_debye_4(double x) 16 | 17 | int gsl_sf_debye_4_e(double x, gsl_sf_result * result) 18 | 19 | -------------------------------------------------------------------------------- /sage/modular/abvar/all.py: -------------------------------------------------------------------------------- 1 | ########################################################################### 2 | # Copyright (C) 2007 William Stein # 3 | # Distributed under the terms of the GNU General Public License (GPL) # 4 | # http://www.gnu.org/licenses/ # 5 | ########################################################################### 6 | 7 | from constructor import J0, J1, JH, AbelianVariety 8 | from abvar import is_ModularAbelianVariety 9 | -------------------------------------------------------------------------------- /doc/common/update-python-inv.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # The file python-inv.txt contains the database of Sphinx hyperlink targets 3 | # used by the intersphinx extension. See 4 | # http://sphinx.pocoo.org/latest/ext/intersphinx.html 5 | # To be able to compile Sage without accessing the net, we use a local copy of 6 | # this database. Here is how to update it: 7 | 8 | rm -f python-inv.txt 9 | wget http://docs.python.org/release/`sage -python --version 2>&1| cut -d " " --fields=2`/objects.inv -O - > python.inv 10 | -------------------------------------------------------------------------------- /sage/rings/complex_number.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | 3 | from sage.libs.mpfr cimport * 4 | 5 | cimport sage.structure.element 6 | cimport real_mpfr 7 | 8 | cdef class ComplexNumber(sage.structure.element.FieldElement): 9 | cdef mpfr_t __re 10 | cdef mpfr_t __im 11 | cdef object _multiplicative_order 12 | cdef int _prec 13 | 14 | cdef real_mpfr.RealNumber abs_c(ComplexNumber self) 15 | cdef real_mpfr.RealNumber norm_c(ComplexNumber self) 16 | 17 | cdef ComplexNumber _new(self) 18 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/command_history.html: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | INPUT: 4 | - history_text - a string containing the history text of the notebook 5 | #} 6 | 7 | 8 | Command History 9 | 10 | 11 | 12 |
{{history_text}}
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /doc/en/reference/combinat/crystals.rst: -------------------------------------------------------------------------------- 1 | Crystals 2 | ======== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | ../sage/combinat/crystals/affine 8 | ../sage/combinat/crystals/crystals 9 | ../sage/combinat/crystals/direct_sum 10 | ../sage/combinat/crystals/letters 11 | ../sage/combinat/crystals/fast_crystals 12 | ../sage/combinat/crystals/highest_weight_crystals 13 | ../sage/combinat/crystals/kirillov_reshetikhin 14 | ../sage/combinat/crystals/spins 15 | ../sage/combinat/crystals/tensor_product 16 | -------------------------------------------------------------------------------- /doc/en/reference/rings.rst: -------------------------------------------------------------------------------- 1 | .. _ch:rings: 2 | 3 | General Rings, Ideals, and Morphisms 4 | ==================================== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/rings/ring 10 | sage/rings/ideal 11 | sage/rings/ideal_monoid 12 | sage/rings/noncommutative_ideals 13 | sage/rings/morphism 14 | sage/rings/homset 15 | sage/rings/infinity 16 | sage/rings/fraction_field 17 | sage/rings/fraction_field_element 18 | sage/rings/quotient_ring 19 | sage/rings/quotient_ring_element 20 | -------------------------------------------------------------------------------- /sage/matrix/action.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport Element, Matrix, Vector 2 | from sage.structure.parent_base cimport ParentWithBase 3 | from sage.categories.action cimport Action 4 | 5 | cdef class MatrixMulAction(Action): 6 | cdef ParentWithBase _codomain 7 | cdef bint fix_sparseness 8 | 9 | cdef class MatrixMatrixAction(MatrixMulAction): 10 | pass 11 | 12 | cdef class MatrixVectorAction(MatrixMulAction): 13 | pass 14 | 15 | cdef class VectorMatrixAction(MatrixMulAction): 16 | pass 17 | 18 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/worksheet/save_discard_buttons.html: -------------------------------------------------------------------------------- 1 | {# 2 | INPUT: 3 | doc_worksheet - boolean stating whether this worksheet is the doc worksheet 4 | #} 5 | {% if not doc_worksheet %} 6 | 7 | {% endif %} 8 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/notebook/plain_text_worksheet.html: -------------------------------------------------------------------------------- 1 | 2 | {# 3 | INPUT: 4 | - worksheet_name - a string containing a worksheet's name 5 | - worksheet_plain_text - a string containing the plain text version of a worksheet 6 | #} 7 | 8 | Sage Worksheet: {{ worksheet_name }} 9 | 10 | 11 | 12 |

Sage Worksheet: %s

13 |
{{ worksheet_plain_text }}
14 | -------------------------------------------------------------------------------- /sage/modules/vector_modn_dense.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "stdint.h": 2 | ctypedef unsigned long uint_fast64_t 3 | 4 | cdef extern from "../ext/multi_modular.h": 5 | ctypedef uint_fast64_t mod_int 6 | 7 | cimport free_module_element 8 | import free_module_element 9 | 10 | cdef class Vector_modn_dense(free_module_element.FreeModuleElement): 11 | cdef mod_int* _entries 12 | cdef mod_int _p 13 | cdef object _base_ring 14 | 15 | cdef _new_c(self) 16 | cdef _init(self, Py_ssize_t degree, parent, mod_int p) 17 | 18 | -------------------------------------------------------------------------------- /sage/plot/plot3d/help.pyx: -------------------------------------------------------------------------------- 1 | """ 2 | 3d Plotting Using Java3d 3 | 4 | 5 | IMPORTANT NOTE ON LINUX -- This may help if you're having trouble with java3d: 6 | From https://java3d.dev.java.net/binary-builds.html 7 | 8 | In order to get Java3d working with sage in your browser, you have may 9 | have to install the Java3d extension that can be found on "https:// 10 | java3d.dev.java.net/binary-builds.html". Follow the instructions in 11 | the README posted there to install the Java3d extension in your local 12 | java installation. 13 | """ -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ $# -eq 0 ]; then 3 | echo "Usage: $0 [SAGE_VERSION]" 4 | echo "Build and install SAGE." 5 | exit 1 6 | fi 7 | 8 | CUR=`pwd` 9 | cd $1 10 | SAGE_ROOT=`pwd` 11 | cd $CUR 12 | export SAGE_ROOT 13 | 14 | SAGE_VERSION=$2 15 | export SAGE_VERSION 16 | 17 | PATH=$SAGE_ROOT/local/bin/:$PATH 18 | export PATH 19 | 20 | if [ -n "$SAGE_DEBIAN" ]; then 21 | python setup.py install --root="$SAGE_ROOT/" --no-compile -O0 22 | else 23 | python setup.py install 24 | fi 25 | 26 | exit $? 27 | 28 | -------------------------------------------------------------------------------- /sage/symbolic/all.py: -------------------------------------------------------------------------------- 1 | from pynac import I 2 | i = I 3 | from ring import SR 4 | from constants import (pi, e, NaN, golden_ratio, log2, euler_gamma, catalan, 5 | khinchin, twinprime, merten, mertens, glaisher, brun) 6 | from expression import Expression 7 | from callable import is_CallableSymbolicExpressionRing, CallableSymbolicExpressionRing 8 | 9 | from sage.symbolic.relation import solve, solve_mod, solve_ineq 10 | from sage.symbolic.assumptions import assume, forget, assumptions 11 | 12 | from units import units 13 | -------------------------------------------------------------------------------- /sage/libs/all.py: -------------------------------------------------------------------------------- 1 | import sage.libs.ntl.all as ntl 2 | 3 | from sage.libs.pari.all import pari, pari_gen, allocatemem, PariError 4 | 5 | from sage.libs.mwrank.all import (mwrank_EllipticCurve, mwrank_MordellWeil, 6 | mwrank_initprimes, 7 | get_precision as mwrank_get_precision, 8 | set_precision as mwrank_set_precision) 9 | 10 | 11 | import symmetrica.all as symmetrica 12 | 13 | from cremona.all import CremonaModularSymbols 14 | 15 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZ_pX.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/cdefs.pxi" 2 | 3 | from ntl_ZZ_pX_decl cimport *, ZZ_pX_c, ZZ_pX_Modulus_c 4 | from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class 5 | 6 | cdef class ntl_ZZ_pX: 7 | cdef ZZ_pX_c x 8 | cdef ntl_ZZ_pContext_class c 9 | cdef void setitem_from_int(ntl_ZZ_pX self, long i, int value) 10 | cdef int getitem_as_int(ntl_ZZ_pX self, long i) 11 | cdef ntl_ZZ_pX _new(self) 12 | 13 | cdef class ntl_ZZ_pX_Modulus: 14 | cdef ZZ_pX_Modulus_c x 15 | cdef ntl_ZZ_pX poly 16 | -------------------------------------------------------------------------------- /doc/en/reference/polynomial_rings.rst: -------------------------------------------------------------------------------- 1 | 2 | .. _ch:polynomial-rings: 3 | 4 | Polynomial Rings 5 | ================ 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | 10 | sage/rings/polynomial/polynomial_ring_constructor 11 | 12 | polynomial_rings_univar 13 | 14 | polynomial_rings_multivar 15 | 16 | polynomial_rings_infinite 17 | 18 | polynomial_rings_laurent 19 | 20 | sage/rings/polynomial/pbori 21 | 22 | polynomial_rings_toy_implementations 23 | 24 | sage/rings/polynomial/convolution 25 | sage/rings/polynomial/cyclotomic 26 | -------------------------------------------------------------------------------- /sage/gsl/gsl_transport.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_transport.h": 2 | 3 | double gsl_sf_transport_2(double x) 4 | 5 | int gsl_sf_transport_2_e(double x, gsl_sf_result * result) 6 | 7 | double gsl_sf_transport_3(double x) 8 | 9 | int gsl_sf_transport_3_e(double x, gsl_sf_result * result) 10 | 11 | double gsl_sf_transport_4(double x) 12 | 13 | int gsl_sf_transport_4_e(double x, gsl_sf_result * result) 14 | 15 | double gsl_sf_transport_5(double x) 16 | 17 | int gsl_sf_transport_5_e(double x, gsl_sf_result * result) 18 | 19 | -------------------------------------------------------------------------------- /doc/en/reference/algebras.rst: -------------------------------------------------------------------------------- 1 | .. _ch:algebras: 2 | 3 | Algebras 4 | ======== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/algebras/free_algebra 10 | sage/algebras/free_algebra_element 11 | 12 | sage/algebras/free_algebra_quotient 13 | sage/algebras/free_algebra_quotient_element 14 | 15 | sage/algebras/group_algebra_new 16 | 17 | sage/algebras/steenrod/steenrod_algebra 18 | sage/algebras/steenrod/steenrod_algebra_bases 19 | sage/algebras/steenrod/steenrod_algebra_misc 20 | sage/algebras/steenrod/steenrod_algebra_mult 21 | -------------------------------------------------------------------------------- /sage/rings/padics/padic_ZZ_pX_FM_element.pxd: -------------------------------------------------------------------------------- 1 | include "../../libs/ntl/decl.pxi" 2 | 3 | from sage.rings.padics.padic_ZZ_pX_element cimport pAdicZZpXElement 4 | from sage.structure.element cimport RingElement, ModuleElement 5 | 6 | cdef class pAdicZZpXFMElement(pAdicZZpXElement): 7 | cdef ZZ_pX_c value 8 | cdef pAdicZZpXFMElement _new_c(self) 9 | cdef pAdicZZpXFMElement _lshift_c(self, long n) 10 | cdef pAdicZZpXFMElement _rshift_c(self, long n) 11 | cpdef RingElement _invert_c_impl(self) 12 | 13 | cpdef pAdicZZpXFMElement unit_part(self) -------------------------------------------------------------------------------- /sage/server/notebook/templates/notebook/user_controls.tmpl: -------------------------------------------------------------------------------- 1 | 2 | {% macro user_controls(user, entries) %} 3 | {{ user }} 4 | {% for href, name, title in entries %} 5 | {% if '(' in href %} 6 | {% set action = 'onClick="' ~ href ~ '"' %} 7 | {% else %} 8 | {% set action = 'href="' ~ href ~ '"' %} 9 | {% endif %} 10 | 11 | {{ name }} 12 | {% endfor %} 13 | {% endmacro %} 14 | -------------------------------------------------------------------------------- /sage/geometry/triangulation/functions.cc: -------------------------------------------------------------------------------- 1 | #include "functions.h" 2 | 3 | // ------- auxiliary functions ---------------------------- 4 | int factorial(int n) 5 | { 6 | int result=1; 7 | for (int i=1; i<=n; i++) 8 | result*=i; 9 | return(result); 10 | } 11 | 12 | 13 | // binomial works only well for "normal" values 14 | int binomial(int n, int D) 15 | { 16 | int d=D; 17 | if (d>n/2) d=n-d; 18 | int result=1; 19 | for (int i=0; i 3 | 4 | 5 | 9 | 12 | 13 | 14 | 15 | 16 | 17 |
6 | 8 | 10 | Searching for Sage server... 11 |
Version {{ sage_version }}
18 | 19 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/base_authenticated.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %} 3 | 4 | {% block css %}main{% endblock %} 5 | 6 | {% block body %} 7 | 8 | 13 | 14 | {% block content %} 15 | 16 | {% endblock %} 17 | {% endblock %} 18 | 19 | -------------------------------------------------------------------------------- /sage/tests/startup.py: -------------------------------------------------------------------------------- 1 | r""" 2 | 3 | Test that on sage.math (a fast computer), the Sage startup time (from 4 | a warm cache) has not got out of hand.:: 5 | 6 | sage: if os.uname()[1] == 'sage.math.washington.edu': 7 | ... print float(os.popen("sage -startuptime>/dev/null; sage -startuptime|grep sage.all").readlines()[0].split()[1]) < 2.0 8 | ... else: print True # nothing when not on sage.math 9 | True 10 | 11 | Ensure that certain modules are not loaded on startup:: 12 | 13 | sage: sage0("'numpy' in sys.modules") 14 | False 15 | """ 16 | -------------------------------------------------------------------------------- /sage/libs/flint/ntl_interface.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/cdefs.pxi" 2 | include "fmpz.pxi" 3 | 4 | from sage.libs.flint.fmpz_poly cimport fmpz_poly_t 5 | from sage.libs.ntl.ntl_ZZ_decl cimport ZZ_c 6 | from sage.libs.ntl.ntl_ZZX_decl cimport ZZX_c 7 | 8 | cdef extern from "FLINT/NTL-interface.h": 9 | unsigned long ZZ_limbs(ZZ_c z) 10 | 11 | void fmpz_poly_to_ZZX(ZZX_c output, fmpz_poly_t poly) 12 | void ZZX_to_fmpz_poly(fmpz_poly_t output, ZZX_c poly) 13 | 14 | void fmpz_to_mpz(mpz_t res, fmpz_t f) 15 | void ZZ_to_fmpz(fmpz_t output, ZZ_c z) 16 | 17 | -------------------------------------------------------------------------------- /sage/rings/complex_interval.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | include 'mpfi.pxi' 3 | 4 | cimport sage.structure.element 5 | cimport real_mpfi 6 | cimport complex_number 7 | 8 | cdef class ComplexIntervalFieldElement(sage.structure.element.FieldElement): 9 | cdef mpfi_t __re 10 | cdef mpfi_t __im 11 | cdef int _prec 12 | 13 | cdef real_mpfi.RealIntervalFieldElement abs_c(ComplexIntervalFieldElement self) 14 | cdef real_mpfi.RealIntervalFieldElement norm_c(ComplexIntervalFieldElement self) 15 | 16 | cdef ComplexIntervalFieldElement _new(self) 17 | -------------------------------------------------------------------------------- /sage/matrix/matrix_cyclo_dense.pxd: -------------------------------------------------------------------------------- 1 | include "../ext/cdefs.pxi" 2 | 3 | from matrix_dense cimport Matrix_dense 4 | from matrix_rational_dense cimport Matrix_rational_dense 5 | 6 | cdef class Matrix_cyclo_dense(Matrix_dense): 7 | 8 | # Matrix over ZZ that stores elements 9 | cdef Matrix_rational_dense _matrix 10 | 11 | # Degree of base cyclotomic field 12 | cdef int _degree 13 | cdef int _n 14 | 15 | cdef _randomize_rational_column_unsafe(Matrix_cyclo_dense self, 16 | Py_ssize_t col, mpz_t nump1, mpz_t denp1, distribution=?) 17 | 18 | -------------------------------------------------------------------------------- /sage/stats/intlist.pxd: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Copyright (C) 2010 William Stein 3 | # Distributed under the terms of the GNU General Public License (GPL) v2+. 4 | # The full text of the GPL is available at: 5 | # http://www.gnu.org/licenses/ 6 | ############################################################################# 7 | 8 | cdef class IntList: 9 | cdef int* _values 10 | cdef Py_ssize_t _length 11 | 12 | cpdef int prod(self) 13 | cpdef int sum(self) 14 | -------------------------------------------------------------------------------- /sage/ext/multi_modular.h: -------------------------------------------------------------------------------- 1 | #define mod_int uint_fast64_t 2 | 3 | /* This is the largest value we can do arithmetic on without risking overflowing. 4 | * It will be optimized to a constant if any optimization is turned on. 5 | * The expression below assumes unsigned. 6 | */ 7 | #define MOD_INT_MAX ((1 << (sizeof(mod_int)*4)) - 1) 8 | #define MOD_INT_OVERFLOW ((1 << (sizeof(mod_int)*8)) - 1) 9 | 10 | /* Don't want to be up against the limit so 11 | * we have room to gather. 12 | */ 13 | #define START_PRIME_MAX (MOD_INT_MAX/7) 14 | 15 | #define LINBOX_PRIME_MAX ((1<< 50)-1) 16 | -------------------------------------------------------------------------------- /sage/graphs/convexity_properties.pxd: -------------------------------------------------------------------------------- 1 | include "../misc/bitset_pxd.pxi" 2 | 3 | cdef class ConvexityProperties: 4 | cdef int _n 5 | cdef list _list_integers_to_vertices 6 | cdef dict _dict_vertices_to_integers 7 | cdef bitset_t * _cache_hull_pairs 8 | 9 | cdef list _vertices_to_integers(self, vertices) 10 | cdef list _integers_to_vertices(self, integers) 11 | cdef _bitset_convex_hull(self, bitset_t hull) 12 | cpdef hull(self, list vertices) 13 | cdef _greedy_increase(self, bitset_t bs) 14 | cpdef hull_number(self, value_only = *, verbose = *) 15 | -------------------------------------------------------------------------------- /sage/libs/singular/decl.pxd: -------------------------------------------------------------------------------- 1 | """ 2 | Declarations of Singular's C/C++ Functions 3 | 4 | AUTHOR: 5 | 6 | - Martin Albrecht (2009-07): initial implementation 7 | """ 8 | #***************************************************************************** 9 | # Copyright (C) 2009 Martin Albrecht 10 | # 11 | # Distributed under the terms of the GNU General Public License (GPL) 12 | # http://www.gnu.org/licenses/ 13 | #***************************************************************************** 14 | 15 | include "singular-cdefs.pxi" 16 | -------------------------------------------------------------------------------- /doc/en/reference/modabvar.rst: -------------------------------------------------------------------------------- 1 | .. _ch:modabvar: 2 | 3 | Modular Abelian Varieties 4 | ========================= 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/modular/abvar/constructor 10 | sage/modular/abvar/abvar 11 | sage/modular/abvar/abvar_ambient_jacobian 12 | sage/modular/abvar/finite_subgroup 13 | sage/modular/abvar/torsion_subgroup 14 | sage/modular/abvar/cuspidal_subgroup 15 | sage/modular/abvar/homology 16 | sage/modular/abvar/homspace 17 | sage/modular/abvar/morphism 18 | sage/modular/abvar/abvar_newform 19 | sage/modular/abvar/lseries 20 | -------------------------------------------------------------------------------- /sage/finance/all.py: -------------------------------------------------------------------------------- 1 | from stock import Stock 2 | 3 | from markov_multifractal import MarkovSwitchingMultifractal 4 | 5 | # We lazy_import the following modules since they import numpy which slows down sage startup 6 | from sage.misc.lazy_import import lazy_import 7 | lazy_import("sage.finance.time_series", ["TimeSeries"]) 8 | lazy_import("sage.finance.time_series", ["autoregressive_fit"]) 9 | lazy_import("sage.finance.fractal", ["stationary_gaussian_simulation", "fractional_gaussian_noise_simulation", "fractional_brownian_motion_simulation", "multifractal_cascade_random_walk_simulation"]) 10 | -------------------------------------------------------------------------------- /sage/plot/plot3d/shapes.pxd: -------------------------------------------------------------------------------- 1 | from base cimport PrimitiveObject 2 | from index_face_set cimport IndexFaceSet, point_c, face_c 3 | from parametric_surface cimport ParametricSurface 4 | 5 | 6 | cdef class Cone(ParametricSurface): 7 | cdef double radius 8 | cdef double height 9 | cdef bint closed 10 | 11 | cdef class Cylinder(ParametricSurface): 12 | cdef double radius 13 | cdef double height 14 | cdef bint closed 15 | 16 | cdef class Sphere(ParametricSurface): 17 | cdef double radius 18 | 19 | cdef class Torus(ParametricSurface): 20 | cdef double R, r 21 | -------------------------------------------------------------------------------- /sage/rings/polynomial/laurent_polynomial.pxd: -------------------------------------------------------------------------------- 1 | from sage.rings.quotient_ring_element import QuotientRingElement 2 | from sage.structure.element cimport CommutativeAlgebraElement, ModuleElement, RingElement, Element 3 | from sage.rings.polynomial.polydict cimport ETuple, PolyDict 4 | from sage.rings.polynomial.multi_polynomial cimport MPolynomial 5 | from sage.rings.polynomial.polynomial_element cimport Polynomial 6 | 7 | cdef class LaurentPolynomial_mpair(CommutativeAlgebraElement): 8 | cdef ETuple _mon 9 | cdef MPolynomial _poly 10 | cdef PolyDict _prod 11 | cdef _new_c(self) 12 | -------------------------------------------------------------------------------- /sage/structure/parent_base.pxd: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # SAGE: System for Algebra and Geometry Experimentation 3 | # Copyright (C) 2006 William Stein 4 | # Distributed under the terms of the GNU General Public License (GPL) 5 | # The full text of the GPL is available at: 6 | # http://www.gnu.org/licenses/ 7 | ############################################################################### 8 | 9 | cimport parent_old 10 | 11 | cdef class ParentWithBase(parent_old.Parent): 12 | pass 13 | -------------------------------------------------------------------------------- /sage/modular/modform/defaults.py: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | # Copyright (C) 2004--2006 William Stein 3 | # 4 | # Distributed under the terms of the GNU General Public License (GPL) 5 | # 6 | # http://www.gnu.org/licenses/ 7 | ######################################################################### 8 | 9 | # The default precision for computation and display of q-expansions of 10 | # modular forms. 11 | from sage.rings.all import Integer 12 | DEFAULT_PRECISION = Integer(6) 13 | DEFAULT_VARIABLE = 'q' 14 | 15 | -------------------------------------------------------------------------------- /sage/modules/vector_integer_sparse_h.pxi: -------------------------------------------------------------------------------- 1 | ############################################################# 2 | # 3 | # Sparse Vector over mpq_t (the GMP rationals) 4 | # 5 | ############################################################# 6 | 7 | include "../ext/cdefs.pxi" 8 | 9 | cdef struct mpz_vector: 10 | mpz_t *entries # array of nonzero entries 11 | Py_ssize_t *positions # positions of those nonzero entries, starting at 0 12 | Py_ssize_t degree # the degree of this sparse vector 13 | Py_ssize_t num_nonzero # the number of nonzero entries of this vector. 14 | 15 | -------------------------------------------------------------------------------- /sage/modules/vector_rational_sparse_h.pxi: -------------------------------------------------------------------------------- 1 | ############################################################# 2 | # 3 | # Sparse Vector over mpq_t (the GMP rationals) 4 | # 5 | ############################################################# 6 | 7 | include "../ext/cdefs.pxi" 8 | 9 | cdef struct mpq_vector: 10 | mpq_t *entries # array of nonzero entries 11 | Py_ssize_t *positions # positions of those nonzero entries, starting at 0 12 | Py_ssize_t degree # the degree of this sparse vector 13 | Py_ssize_t num_nonzero # the number of nonzero entries of this vector. 14 | 15 | -------------------------------------------------------------------------------- /doc/en/reference/combinat/words.rst: -------------------------------------------------------------------------------- 1 | Words 2 | ===== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | ../sage/combinat/words/alphabet 8 | ../sage/combinat/words/abstract_word 9 | ../sage/combinat/words/nfactor_enumerable_word 10 | ../sage/combinat/words/finite_word 11 | ../sage/combinat/words/infinite_word 12 | ../sage/combinat/words/word 13 | ../sage/combinat/words/word_generators 14 | ../sage/combinat/words/words 15 | ../sage/combinat/words/shuffle_product 16 | ../sage/combinat/words/suffix_trees 17 | ../sage/combinat/words/morphism 18 | ../sage/combinat/words/paths 19 | -------------------------------------------------------------------------------- /sage/structure/coerce_maps.pxd: -------------------------------------------------------------------------------- 1 | from sage.categories.action cimport Action 2 | from sage.categories.map cimport Map 3 | 4 | cdef class DefaultConvertMap(Map): 5 | cdef public bint _force_use 6 | cdef public bint _is_coercion 7 | 8 | cdef class DefaultConvertMap_unique(DefaultConvertMap): 9 | pass 10 | 11 | cdef class NamedConvertMap(Map): 12 | cdef readonly method_name 13 | cdef public bint _force_use 14 | 15 | cdef class TryMap(Map): 16 | cdef Map _map_p 17 | cdef Map _map_b 18 | cdef _error_types 19 | 20 | cdef Map CCallableConvertMap(domain, codomain, void* func, name) 21 | -------------------------------------------------------------------------------- /sage/structure/coerce_actions.pxd: -------------------------------------------------------------------------------- 1 | 2 | from element cimport Element, RingElement, ModuleElement 3 | from parent cimport Parent 4 | 5 | from sage.categories.action cimport Action 6 | from sage.categories.map cimport Map 7 | 8 | 9 | cdef class ModuleAction(Action): 10 | cdef Map connecting 11 | cdef extended_base 12 | 13 | cdef class LeftModuleAction(ModuleAction): 14 | pass 15 | 16 | cdef class RightModuleAction(ModuleAction): 17 | cdef public bint is_inplace 18 | 19 | cdef class PyScalarAction(Action): 20 | cdef Action _action 21 | 22 | cdef class IntegerMulAction(Action): 23 | pass -------------------------------------------------------------------------------- /sage/combinat/enumeration_mod_permgroup.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.list_clone cimport ClonableIntArray 2 | from cpython cimport bool 3 | 4 | cpdef list all_children(ClonableIntArray v, int max_part) 5 | cpdef int lex_cmp_partial(ClonableIntArray t1, ClonableIntArray t2, int step) 6 | cpdef int lex_cmp(ClonableIntArray t1, ClonableIntArray t2) 7 | cpdef bool is_canonical(list sgs, ClonableIntArray v) 8 | cpdef ClonableIntArray canonical_representative_of_orbit_of(list sgs, ClonableIntArray v) 9 | cpdef list canonical_children(list sgs, ClonableIntArray v, int max_part) 10 | cpdef set orbit(list sgs, ClonableIntArray v) 11 | -------------------------------------------------------------------------------- /sage/gsl/gsl_zeta.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_zeta.h": 2 | 3 | double gsl_sf_zeta_int(int n) 4 | 5 | int gsl_sf_zeta_int_e(int n, gsl_sf_result * result) 6 | 7 | double gsl_sf_zeta(double s) 8 | 9 | int gsl_sf_zeta_e(double s, gsl_sf_result * result) 10 | 11 | double gsl_sf_hzeta(double s, double q) 12 | 13 | int gsl_sf_hzeta_e(double s, double q, gsl_sf_result * result) 14 | 15 | double gsl_sf_eta_int(int n) 16 | 17 | int gsl_sf_eta_int_e(int n, gsl_sf_result * result) 18 | 19 | double gsl_sf_eta(double s) 20 | 21 | int gsl_sf_eta_e(double s, gsl_sf_result * result) 22 | 23 | -------------------------------------------------------------------------------- /sage/matrix/matrix.pxd: -------------------------------------------------------------------------------- 1 | """ 2 | Generic matrices 3 | """ 4 | 5 | ############################################################################### 6 | # SAGE: System for Algebra and Geometry Experimentation 7 | # Copyright (C) 2006 William Stein 8 | # Distributed under the terms of the GNU General Public License (GPL) 9 | # The full text of the GPL is available at: 10 | # http://www.gnu.org/licenses/ 11 | ############################################################################### 12 | 13 | cimport matrix2 14 | 15 | cdef class Matrix(matrix2.Matrix): 16 | pass 17 | -------------------------------------------------------------------------------- /sage/misc/randstate.pxd: -------------------------------------------------------------------------------- 1 | include "../ext/cdefs.pxi" 2 | 3 | cdef class randstate: 4 | cdef gmp_randstate_t gmp_state 5 | cdef object _seed 6 | cdef object _python_random 7 | 8 | cdef object _gap_saved_seed 9 | cdef object _pari_saved_seed 10 | 11 | cdef object _gp_saved_seeds 12 | 13 | cpdef set_seed_libc(self, bint force) 14 | cpdef set_seed_ntl(self, bint force) 15 | 16 | cpdef int c_random(self) 17 | cpdef double c_rand_double(self) 18 | 19 | cpdef ZZ_seed(self) 20 | cpdef long_seed(self) 21 | 22 | cpdef randstate current_randstate() 23 | cpdef int random() 24 | -------------------------------------------------------------------------------- /sage/modules/free_module_element.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport Vector 2 | 3 | cdef class FreeModuleElement(Vector): 4 | cdef bint _is_mutable 5 | cdef int _cmp_same_ambient_c(left, FreeModuleElement right) 6 | 7 | cdef class FreeModuleElement_generic_dense(FreeModuleElement): 8 | # data 9 | cdef object _entries 10 | 11 | # cdef'd methods 12 | cdef _new_c(self, object v) 13 | 14 | 15 | cdef class FreeModuleElement_generic_sparse(FreeModuleElement): 16 | # data 17 | cdef object _entries 18 | 19 | # cdef'd methods 20 | cdef _new_c(self, object v) 21 | 22 | -------------------------------------------------------------------------------- /sage/gsl/gsl_psi.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_psi.h": 2 | 3 | double gsl_sf_psi_int(int n) 4 | 5 | int gsl_sf_psi_int_e(int n, gsl_sf_result * result) 6 | 7 | double gsl_sf_psi(double x) 8 | 9 | int gsl_sf_psi_e(double x, gsl_sf_result * result) 10 | 11 | double gsl_sf_psi_1piy(double y) 12 | 13 | int gsl_sf_psi_1piy_e(double y, gsl_sf_result * result) 14 | 15 | double gsl_sf_psi_1_int(int n) 16 | 17 | int gsl_sf_psi_1_int_e(int n, gsl_sf_result * result) 18 | 19 | double gsl_sf_psi_n(int m, double x) 20 | 21 | int gsl_sf_psi_n_e(int m, double x, gsl_sf_result * result) 22 | 23 | -------------------------------------------------------------------------------- /sage/gsl/gsl_log.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_log.h": 2 | 3 | double gsl_sf_log(double x) 4 | 5 | int gsl_sf_log_e(double x, gsl_sf_result * result) 6 | 7 | double gsl_sf_log_abs(double x) 8 | 9 | int gsl_sf_log_abs_e(double x, gsl_sf_result * result) 10 | 11 | int gsl_sf_complex_log_e(double zr, double zi, gsl_sf_result * lnr, gsl_sf_result * theta) 12 | 13 | double gsl_sf_log_1plusx(double x) 14 | 15 | int gsl_sf_log_1plusx_e(double x, gsl_sf_result * result) 16 | 17 | double gsl_sf_log_1plusx_mx(double x) 18 | 19 | int gsl_sf_log_1plusx_mx_e(double x, gsl_sf_result * result) 20 | 21 | -------------------------------------------------------------------------------- /sage/gsl/math.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "math.h": 2 | double cos(double x) 3 | double sin(double x) 4 | double tan (double x) 5 | double asin (double x) 6 | double acos (double x) 7 | double atan (double x) 8 | double atan2 (double y, double x) 9 | double exp (double x) 10 | double exp2 (double x) 11 | double exp10 (double x) 12 | double log(double x) 13 | double log10 (double x) 14 | double log2 (double x) 15 | double pow (double base, double power) 16 | #double sqrt(double x) 17 | double sinh (double x) 18 | double cosh (double x) 19 | double tanh (double x) 20 | double fabs(double x) 21 | 22 | -------------------------------------------------------------------------------- /sage/rings/polynomial/polydict.pxd: -------------------------------------------------------------------------------- 1 | include '../../ext/cdefs.pxi' 2 | 3 | cdef class PolyDict: 4 | cdef object __repn 5 | cdef object __zero 6 | 7 | cdef class ETuple: 8 | cdef size_t _length 9 | cdef size_t _nonzero 10 | cdef int *_data 11 | 12 | cpdef ETuple eadd(ETuple self, ETuple self) 13 | cpdef ETuple esub(ETuple self, ETuple self) 14 | cpdef ETuple emul(ETuple self, int factor) 15 | cpdef ETuple emin(ETuple self, ETuple self) 16 | cpdef ETuple emax(ETuple self, ETuple self) 17 | cpdef ETuple eadd_p(ETuple self, int other, int pos) 18 | cdef ETuple _new(ETuple self) 19 | -------------------------------------------------------------------------------- /sage/structure/mutability.pxd: -------------------------------------------------------------------------------- 1 | """ 2 | Mutability -- Pyrex Implementation 3 | """ 4 | 5 | ########################################################################## 6 | # 7 | # SAGE: System for Algebra and Geometry Experimentation 8 | # 9 | # Copyright (C) 2006 William Stein 10 | # 11 | # Distributed under the terms of the GNU General Public License (GPL) 12 | # http://www.gnu.org/licenses/ 13 | ########################################################################## 14 | 15 | cdef class Mutability: 16 | cdef bint _is_immutable 17 | cdef _require_mutable_cdef(self) 18 | -------------------------------------------------------------------------------- /doc/en/introspect/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Sage introspection build configuration file. 3 | # See sage.server.notebook.cell.set_introspect_html() for details. 4 | 5 | import sys, os 6 | sys.path.append(os.environ['SAGE_DOC']) 7 | from common.conf import * 8 | 9 | extensions = ['sphinx.ext.autodoc', 'sphinx.ext.jsmath', 'sphinx.ext.todo', 10 | 'sphinx.ext.extlinks'] 11 | 12 | templates_path = ['templates'] 13 | html_static_path = ['static'] 14 | 15 | html_use_modindex = False 16 | html_use_index = False 17 | html_split_index = False 18 | html_copy_source = False 19 | 20 | todo_include_todos = True 21 | -------------------------------------------------------------------------------- /doc/en/reference/other/sagetex.rst: -------------------------------------------------------------------------------- 1 | Installing and using SageTeX 2 | ============================ 3 | 4 | SageTeX is a system for embedding computations and plots from Sage into 5 | LaTeX documents. It is included by default with Sage, so if you have 6 | installed Sage, you already have SageTeX. However, to get it to work, 7 | you need to make TeX aware of SageTeX. Instructions for that are in the 8 | "Make SageTeX known to TeX" section of the `Sage installation guide 9 | `_ (`this link 10 | <../../installation/index.html>`_ should take you to a local copy of the 11 | installation guide). 12 | -------------------------------------------------------------------------------- /sage/gsl/gsl_laguerre.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_laguerre.h": 2 | 3 | double gsl_sf_laguerre_1(double a, double x) 4 | 5 | double gsl_sf_laguerre_2(double a, double x) 6 | 7 | double gsl_sf_laguerre_3(double a, double x) 8 | 9 | int gsl_sf_laguerre_1_e(double a, double x, gsl_sf_result * result) 10 | 11 | int gsl_sf_laguerre_2_e(double a, double x, gsl_sf_result * result) 12 | 13 | int gsl_sf_laguerre_3_e(double a, double x, gsl_sf_result * result) 14 | 15 | double gsl_sf_laguerre_n(int n, double a, double x) 16 | 17 | int gsl_sf_laguerre_n_e(int n, double a, double x, gsl_sf_result * result) 18 | 19 | -------------------------------------------------------------------------------- /doc/common/build_options.py: -------------------------------------------------------------------------------- 1 | ############################################### 2 | # Options for building the Sage documentation # 3 | ############################################### 4 | 5 | import os, re 6 | SAGE_DOC = os.environ['SAGE_DOC'] 7 | LANGUAGES = [d for d in os.listdir(SAGE_DOC) if re.match('^[a-z][a-z]$', d)] 8 | SPHINXOPTS = "" 9 | PAPER = "" 10 | OMIT = ["introspect"] # docs/dirs to omit when listing and building 'all' 11 | 12 | if PAPER: 13 | PAPEROPTS = "-D latex_paper_size=" + PAPER 14 | else: 15 | PAPEROPTS = "" 16 | 17 | #Note that this needs to have the doctrees dir 18 | ALLSPHINXOPTS = SPHINXOPTS + " " + PAPEROPTS + " " 19 | -------------------------------------------------------------------------------- /sage/matrix/matrix_mod2_dense.pxd: -------------------------------------------------------------------------------- 1 | # choose: dense or sparse 2 | 3 | cimport matrix_dense 4 | 5 | from sage.libs.m4ri cimport * 6 | 7 | cdef class Matrix_mod2_dense(matrix_dense.Matrix_dense): 8 | cdef mzd_t *_entries 9 | cdef object _one 10 | cdef object _zero 11 | 12 | cdef set_unsafe_int(self, Py_ssize_t i, Py_ssize_t j, int value) 13 | 14 | cpdef Matrix_mod2_dense _multiply_m4rm(Matrix_mod2_dense self, Matrix_mod2_dense right, int k) 15 | cpdef Matrix_mod2_dense _multiply_strassen(Matrix_mod2_dense self, Matrix_mod2_dense right, int cutoff) 16 | 17 | # For conversion to other systems 18 | cpdef _export_as_string(self) 19 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/history.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "base.html" %} 3 | 4 | {% block title %}Sage: History for {{username}} {% endblock %} 5 | 6 | {% block css %}main{% endblock %} 7 | 8 | {% block body %} 9 | 10 | {% include 'list_top.html' %} 11 | 12 |
13 |       {{ text | escape }}
14 |     
15 |
16 | Create a new Sage worksheet version of the last 100 commands in the above log. 17 | 18 | 19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /doc/en/reference/cryptography.rst: -------------------------------------------------------------------------------- 1 | Cryptography 2 | ============ 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/crypto/cryptosystem 8 | 9 | sage/crypto/cipher 10 | 11 | sage/crypto/classical 12 | sage/crypto/classical_cipher 13 | 14 | sage/crypto/block_cipher/sdes 15 | sage/crypto/block_cipher/miniaes 16 | 17 | sage/crypto/public_key/blum_goldwasser 18 | 19 | sage/crypto/stream 20 | sage/crypto/stream_cipher 21 | 22 | sage/crypto/lfsr 23 | sage/crypto/util 24 | sage/crypto/boolean_function 25 | 26 | sage/crypto/mq/sr 27 | sage/crypto/mq/mpolynomialsystem 28 | sage/crypto/mq/sbox 29 | 30 | sage/crypto/lattice -------------------------------------------------------------------------------- /sage/gsl/all.py: -------------------------------------------------------------------------------- 1 | # The pxi files in this directory are GPL'd work of 2 | # http://wwwteor.mi.infn.it/%7Epernici/pyrexgsl/pyrexgsl.html 3 | 4 | from fft import FastFourierTransform, FFT 5 | 6 | from interpolation import spline, Spline 7 | from dwt import WaveletTransform,DWT 8 | 9 | from dft import IndexedSequence 10 | 11 | from ode import ode_solver 12 | from ode import ode_system 13 | from probability_distribution import RealDistribution 14 | from integration import numerical_integral 15 | integral_numerical = numerical_integral 16 | from probability_distribution import SphericalDistribution 17 | from probability_distribution import GeneralDiscreteDistribution 18 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_ZZ_pContext_decl.pxd: -------------------------------------------------------------------------------- 1 | from sage.libs.ntl.ntl_ZZ_decl cimport ZZ_c 2 | 3 | cdef extern from "ntl_wrap.h": 4 | ctypedef struct ZZ_pContext_c "struct ZZ_pContext": 5 | void (*restore)() 6 | 7 | ZZ_pContext_c* ZZ_pContext_new "New"() 8 | ZZ_pContext_c* ZZ_pContext_construct "Construct"(void *mem) 9 | ZZ_pContext_c* ZZ_pContext_new_ZZ "ZZ_pContext_new"(ZZ_c* p) 10 | ZZ_pContext_c* ZZ_pContext_construct_ZZ "ZZ_pContext_construct"(void *mem, ZZ_c* p) 11 | void ZZ_pContext_destruct "Destruct"(ZZ_pContext_c *mem) 12 | void ZZ_pContext_delete "Delete"(ZZ_pContext_c *mem) 13 | -------------------------------------------------------------------------------- /sage/libs/ntl/ntl_lzz_pContext_decl.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "ntl_wrap.h": 2 | ctypedef struct zz_pContext_c "struct zz_pContext": 3 | pass 4 | 5 | zz_pContext_c* zz_pContext_new "New"() 6 | zz_pContext_c* zz_pContext_construct "Construct"(void *mem) 7 | zz_pContext_c* zz_pContext_new_long "zz_pContext_new"(long p) 8 | zz_pContext_c* zz_pContext_construct_long "zz_pContext_construct"(void *mem, long p) 9 | void zz_pContext_destruct "Destruct"(zz_pContext_c *mem) 10 | void zz_pContext_delete "Delete"(zz_pContext_c *mem) 11 | 12 | void zz_pContext_restore(zz_pContext_c *c) 13 | 14 | -------------------------------------------------------------------------------- /sage/rings/polynomial/polynomial_integer_dense_flint.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/cdefs.pxi" 2 | include "../../libs/flint/fmpz.pxi" 3 | include "../../libs/flint/fmpz_poly.pxi" 4 | 5 | from sage.libs.flint.ntl_interface cimport * 6 | 7 | from sage.rings.polynomial.polynomial_element cimport Polynomial 8 | from sage.rings.integer cimport Integer 9 | from sage.structure.parent cimport Parent 10 | 11 | cdef class Polynomial_integer_dense_flint(Polynomial): 12 | cdef fmpz_poly_t __poly 13 | 14 | cdef Polynomial_integer_dense_flint _new(self) 15 | cpdef bint is_zero(self) 16 | cpdef _unsafe_mutate(self, long n, value) 17 | cpdef Integer content(self) 18 | -------------------------------------------------------------------------------- /c_lib/include/gmp_globals.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef __cplusplus 4 | #define EXTERN extern "C" 5 | #else 6 | #define EXTERN extern 7 | #endif 8 | 9 | // these vars are all used in rational reconstruction; they're cached so we don't 10 | // have to recreate them with every call. 11 | EXTERN mpz_t u, v, q, u0, u1, u2, v0, v1, v2, t0, t1, t2, x, y, ssqr, m2; 12 | EXTERN mpq_t tmp; 13 | 14 | EXTERN mpz_t a1, a2, mod1, sage_mod2, g, s, t, xx; 15 | 16 | EXTERN mpz_t crtrr_a, crtrr_mod; 17 | 18 | EXTERN mpz_t rand_val, rand_n, rand_n1; 19 | 20 | EXTERN gmp_randstate_t rand_state; 21 | 22 | EXTERN void init_mpz_globals(); 23 | EXTERN void clear_mpz_globals(); 24 | 25 | -------------------------------------------------------------------------------- /sage/combinat/designs/all.py: -------------------------------------------------------------------------------- 1 | from block_design import (AffineGeometryDesign, 2 | ProjectiveGeometryDesign, 3 | WittDesign, HadamardDesign, 4 | BlockDesign_generic, BlockDesign) 5 | 6 | from ext_rep import (designs_from_XML, designs_from_XML_url) 7 | 8 | from incidence_structures import (IncidenceStructure, 9 | IncidenceStructureFromMatrix) 10 | 11 | from covering_design import (CoveringDesign, 12 | schonheim, 13 | trivial_covering_design, 14 | best_known_covering_design_www) 15 | 16 | -------------------------------------------------------------------------------- /sage/symbolic/expression.pxd: -------------------------------------------------------------------------------- 1 | from sage.libs.ginac cimport * 2 | 3 | from sage.structure.element cimport CommutativeRingElement 4 | 5 | 6 | cdef class Expression(CommutativeRingElement): 7 | cdef GEx _gobj 8 | cdef Expression coerce_in(self, z) 9 | cpdef object _eval_self(self, R) 10 | cpdef object _convert(self, R) 11 | cpdef bint is_polynomial(self, var) 12 | cpdef bint is_relational(self) 13 | cpdef bint is_infinity(self) 14 | cpdef object pyobject(self) 15 | cpdef Expression _subs_expr(self, expr) 16 | 17 | cdef Expression new_Expression_from_GEx(parent, GEx juice) 18 | cdef Expression new_Expression_from_pyobject(parent, x) 19 | -------------------------------------------------------------------------------- /sage/libs/flint/fmpz.pxi: -------------------------------------------------------------------------------- 1 | include "../ntl/decl.pxi" 2 | 3 | cdef extern from "FLINT/fmpz.h": 4 | 5 | ctypedef void * fmpz_t 6 | ctypedef void * mpz_t 7 | 8 | fmpz_t fmpz_init(unsigned long limbs) 9 | 10 | void fmpz_set_ui(fmpz_t res, unsigned long x) 11 | void fmpz_set_si(fmpz_t res, long x) 12 | 13 | void fmpz_clear(fmpz_t f) 14 | void fmpz_print(fmpz_t f) 15 | int fmpz_is_one(fmpz_t f) 16 | 17 | void fmpz_add_ui_inplace(fmpz_t output, unsigned long x) 18 | void fmpz_sub_ui_inplace(fmpz_t output, unsigned long x) 19 | 20 | void fmpz_to_mpz(mpz_t rop, fmpz_t op) 21 | void mpz_to_fmpz(fmpz_t rop, mpz_t op) 22 | 23 | -------------------------------------------------------------------------------- /sage/server/notebook/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}{% endblock %} 6 | 7 | {% block pre_main_css %}{% endblock %} 8 | 9 | {% block more_css %}{% endblock %} 10 | {% block javascript %}{% endblock %} 11 | 12 | 13 | {% block body %}{% endblock %} 14 | 15 | -------------------------------------------------------------------------------- /doc/en/reference/numerical.rst: -------------------------------------------------------------------------------- 1 | Numerical Optimization 2 | ====================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | sage/numerical/knapsack 8 | sage/numerical/mip 9 | sage/numerical/optimize 10 | 11 | LP Solver backends 12 | ------------------ 13 | 14 | .. toctree:: 15 | :maxdepth: 1 16 | 17 | sage/numerical/backends/generic_backend 18 | sage/numerical/backends/glpk_backend 19 | 20 | Sage also supports CBC (COIN-OR), CPLEX (ILOG) and Gurobi. In order to find out 21 | how to use them in Sage, please refer to the `Thematic Tutorial on Linear 22 | Programming 23 | `_. 24 | 25 | -------------------------------------------------------------------------------- /sage/modular/modform/periods.py: -------------------------------------------------------------------------------- 1 | """ 2 | Periods of modular forms. 3 | """ 4 | 5 | # The following idea just occurred to me. 6 | # We could use that $\langle T_n(g), x\rangle = \langle g, T_n(x)\rangle$ 7 | # for any Hecke operator $T_n$, so that we only need to compute 8 | # the period integrals $\langle g, x_i\rangle$. Then we obtain all pairings 9 | # $\langle T_n(g), x_i \rangle = \langle g , T_n(x_i) \rangle$. 10 | # Since the $T_n(g)$ span the simple $\T$-module $S_k(\Gamma;\Q)[I]$, 11 | # this must give all pairings. However, it requires computing 12 | # only $2d$ pairings instead of $2d^2$ pairings, which is potentially 13 | # a huge savings when $d$ is large. 14 | 15 | 16 | -------------------------------------------------------------------------------- /doc/en/bordeaux_2008/index.rst: -------------------------------------------------------------------------------- 1 | Three Lectures about Explicit Methods in Number Theory Using Sage 2 | ================================================================= 3 | 4 | This article is about using the mathematical software Sage to do 5 | computations with number fields and modular forms. It was written 6 | for the October 2008 Bordeaux meeting on explicit methods in number 7 | theory (http://www.math.u-bordeaux.fr/gtem2008/). It assumes 8 | no prior knowledge about Sage, but assumes a graduate level 9 | background in algebraic number theory. 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | introduction 15 | number_fields 16 | birds_eye_view 17 | modular_forms 18 | -------------------------------------------------------------------------------- /sage/rings/real_double.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport RingElement, ModuleElement, Element, FieldElement 2 | from sage.rings.ring cimport Field 3 | 4 | cdef extern from "limits.h": 5 | int INT_MAX 6 | double NAN 7 | 8 | cdef class RealDoubleField_class(Field): 9 | cdef _new_c(self, double value) 10 | 11 | cdef class RealDoubleElement(FieldElement): 12 | cdef double _value 13 | cdef _new_c(self, double value) 14 | cpdef RealDoubleElement abs(RealDoubleElement self) 15 | cdef RealDoubleElement __pow_float(self, double exponent) 16 | cdef RealDoubleElement __pow_int(self, int exponent) 17 | cdef _log_base(self, double log_of_base) 18 | 19 | 20 | -------------------------------------------------------------------------------- /sage/categories/action.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport Element 2 | from morphism cimport Morphism 3 | from map cimport Map 4 | from functor cimport Functor 5 | 6 | cdef class Action(Functor): 7 | cdef G 8 | cdef S 9 | cdef bint _is_left 10 | cdef op 11 | cpdef _call_(self, a, b) 12 | 13 | 14 | cdef class InverseAction(Action): 15 | cdef Action _action 16 | cdef Map S_precomposition 17 | 18 | cdef class PrecomposedAction(Action): 19 | cdef Action _action 20 | cdef Map left_precomposition 21 | cdef Map right_precomposition 22 | 23 | cdef class ActionEndomorphism(Morphism): 24 | cdef Action _action 25 | cdef Element _g 26 | -------------------------------------------------------------------------------- /doc/en/reference/modsym.rst: -------------------------------------------------------------------------------- 1 | .. _ch:modsym: 2 | 3 | Modular Symbols 4 | =============== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/modular/modsym/modsym 10 | 11 | sage/modular/modsym/space 12 | sage/modular/modsym/ambient 13 | sage/modular/modsym/subspace 14 | 15 | sage/modular/modsym/element 16 | sage/modular/modsym/modular_symbols 17 | sage/modular/modsym/manin_symbols 18 | 19 | sage/modular/modsym/boundary 20 | 21 | sage/modular/modsym/heilbronn 22 | 23 | sage/modular/modsym/p1list 24 | sage/modular/modsym/g1list 25 | sage/modular/modsym/ghlist 26 | 27 | sage/modular/modsym/relation_matrix 28 | 29 | sage/modular/modsym/p1list_nf 30 | 31 | -------------------------------------------------------------------------------- /sage/gsl/gsl_qrng.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_qrng.h": 2 | 3 | ctypedef struct gsl_qrng 4 | ctypedef struct gsl_qrng_type 5 | gsl_qrng_type * gsl_qrng_niederreiter_2 6 | gsl_qrng_type * gsl_qrng_sobol 7 | 8 | gsl_qrng * gsl_qrng_alloc(gsl_qrng_type * T, unsigned int d) 9 | 10 | void gsl_qrng_free(gsl_qrng * q) 11 | 12 | void gsl_qrng_init(gsl_qrng * q) 13 | 14 | int gsl_qrng_get(gsl_qrng * q, double x[]) 15 | 16 | char * gsl_qrng_name(gsl_qrng * q) 17 | 18 | size_t gsl_qrng_size(gsl_qrng * q) 19 | 20 | void * gsl_qrng_state(gsl_qrng * q) 21 | 22 | int gsl_qrng_memcpy(gsl_qrng * dest, gsl_qrng * src) 23 | 24 | gsl_qrng * gsl_qrng_clone(gsl_qrng * q) 25 | 26 | -------------------------------------------------------------------------------- /sage/rings/padics/pow_computer.pxd: -------------------------------------------------------------------------------- 1 | include "../../ext/cdefs.pxi" 2 | 3 | from sage.structure.sage_object cimport SageObject 4 | from sage.rings.integer cimport Integer 5 | 6 | cdef class PowComputer_class(SageObject): 7 | cdef Integer prime 8 | cdef bint in_field 9 | cdef int _initialized 10 | 11 | cdef unsigned long cache_limit 12 | cdef unsigned long prec_cap 13 | 14 | cdef mpz_t temp_m 15 | 16 | cdef Integer pow_Integer(self, long n) 17 | cdef mpz_t* pow_mpz_t_top(self) 18 | cdef mpz_t* pow_mpz_t_tmp(self, long n) 19 | 20 | cdef class PowComputer_base(PowComputer_class): 21 | cdef mpz_t* small_powers 22 | cdef mpz_t top_power 23 | cdef object __weakref__ -------------------------------------------------------------------------------- /doc/en/reference/modmisc.rst: -------------------------------------------------------------------------------- 1 | .. _ch:modmisc: 2 | 3 | Miscellaneous Modular-Form-Related Modules 4 | ========================================== 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/modular/dirichlet 10 | sage/modular/cusps 11 | sage/modular/dims 12 | sage/modular/buzzard 13 | 14 | sage/modular/local_comp/local_comp 15 | sage/modular/local_comp/smoothchar 16 | sage/modular/local_comp/type_space 17 | sage/modular/local_comp/liftings 18 | 19 | sage/modular/etaproducts 20 | sage/modular/overconvergent/weightspace 21 | sage/modular/overconvergent/genus0 22 | sage/modular/ssmod/ssmod 23 | sage/modular/quatalg/brandt 24 | 25 | sage/modular/cusps_nf 26 | 27 | -------------------------------------------------------------------------------- /doc/en/reference/modules.rst: -------------------------------------------------------------------------------- 1 | .. _ch:modules: 2 | 3 | Modules 4 | ======= 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | sage/modules/module 10 | sage/modules/free_module 11 | sage/modules/free_module_element 12 | 13 | sage/modules/complex_double_vector 14 | sage/modules/real_double_vector 15 | sage/modules/vector_callable_symbolic_dense 16 | 17 | sage/modules/vector_space_homspace 18 | sage/modules/vector_space_morphism 19 | 20 | sage/modules/free_module_homspace 21 | sage/modules/free_module_morphism 22 | 23 | sage/modules/matrix_morphism 24 | 25 | sage/modules/fg_pid/fgp_module 26 | sage/modules/fg_pid/fgp_element 27 | sage/modules/fg_pid/fgp_morphism 28 | -------------------------------------------------------------------------------- /sage/matrix/matrix_modn_dense_template_header.pxi: -------------------------------------------------------------------------------- 1 | """ 2 | Dense Matrix Template for C/C++ Library Interfaces 3 | """ 4 | 5 | cimport matrix_dense 6 | 7 | cdef extern from "../ext/multi_modular.h": 8 | ctypedef unsigned long mod_int 9 | mod_int MOD_INT_OVERFLOW 10 | 11 | cdef class Matrix_modn_dense_template(matrix_dense.Matrix_dense): 12 | cdef celement **_matrix 13 | cdef celement *_entries 14 | cdef mod_int p 15 | cdef xgcd_eliminate (self, celement * row1, celement* row2, Py_ssize_t start_col) 16 | cdef set_unsafe_int(self, Py_ssize_t i, Py_ssize_t j, int value) 17 | cpdef _export_as_string(self) 18 | cdef int _copy_row_to_mod_int_array(self, mod_int *to, Py_ssize_t i) 19 | -------------------------------------------------------------------------------- /doc/en/bordeaux_2008/modular_forms.rst: -------------------------------------------------------------------------------- 1 | Modular Forms 2 | ============= 3 | 4 | This section is about computing with modular forms, modular symbols, 5 | and modular abelian varieties. Most of the Sage functionality we 6 | describe below is new code written for Sage by myself, Craig Citro, 7 | Robert Bradshaw, and Jordi Quer in consultation with John Cremona. It 8 | has much overlap in functionality with the modular forms code in 9 | Magma, which I developed during 1998-2004. 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | modular_forms_and_hecke_operators 15 | modular_symbols 16 | method_of_graphs 17 | level_one_forms 18 | half_integral 19 | generators_for_rings 20 | l_series 21 | modabvar -------------------------------------------------------------------------------- /doc/en/reference/calculus.rst: -------------------------------------------------------------------------------- 1 | Symbolic Calculus 2 | ================= 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | sage/symbolic/expression 8 | sage/symbolic/relation 9 | sage/symbolic/function_factory 10 | sage/calculus/calculus 11 | sage/symbolic/units 12 | sage/symbolic/ring 13 | sage/calculus/functional 14 | sage/symbolic/function 15 | sage/symbolic/integration/integral 16 | sage/calculus/test_sympy 17 | sage/calculus/tests 18 | sage/symbolic/expression_conversions 19 | sage/calculus/wester 20 | sage/calculus/desolvers 21 | sage/gsl/ode 22 | sage/gsl/integration 23 | sage/calculus/riemann 24 | sage/gsl/interpolation 25 | sage/calculus/interpolators 26 | -------------------------------------------------------------------------------- /sage/gsl/gsl_erf.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "gsl/gsl_sf_erf.h": 2 | 3 | double gsl_sf_erf(double x) 4 | 5 | int gsl_sf_erf_e(double x, gsl_sf_result * result) 6 | 7 | double gsl_sf_erfc(double x) 8 | 9 | int gsl_sf_erfc_e(double x, gsl_sf_result * result) 10 | 11 | double gsl_sf_log_erfc(double x) 12 | 13 | int gsl_sf_log_erfc_e(double x, gsl_sf_result * result) 14 | 15 | double gsl_sf_erf_Z(double x) 16 | 17 | int gsl_sf_erf_Z_e(double x, gsl_sf_result * result) 18 | 19 | double gsl_sf_erf_Q(double x) 20 | 21 | int gsl_sf_erf_Q_e(double x, gsl_sf_result * result) 22 | 23 | double gsl_sf_hazard(double x) 24 | 25 | int gsl_sf_hazard_e(double x, gsl_sf_result * result) 26 | 27 | -------------------------------------------------------------------------------- /sage/modules/vector_double_dense.pxd: -------------------------------------------------------------------------------- 1 | include '../ext/cdefs.pxi' 2 | 3 | cimport free_module_element 4 | cimport numpy as cnumpy 5 | 6 | cdef class Vector_double_dense(free_module_element.FreeModuleElement): 7 | cdef object _numpy_dtype 8 | # cdef cnumpy.NPY_TYPES _numpy_dtypeint 9 | cdef int _numpy_dtypeint 10 | cdef object _python_dtype 11 | cdef object _sage_dtype 12 | cdef object _sage_vector_dtype 13 | cdef cnumpy.ndarray _vector_numpy 14 | cdef set_unsafe(self, Py_ssize_t i, object value) 15 | cdef get_unsafe(self, Py_ssize_t i) 16 | cdef Vector_double_dense _new(self, cnumpy.ndarray vector_numpy) 17 | cdef _replace_self_with_numpy(self, cnumpy.ndarray numpy_array) 18 | -------------------------------------------------------------------------------- /sage/stats/hmm/hmm.pxd: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Copyright (C) 2010 William Stein 3 | # Distributed under the terms of the GNU General Public License (GPL) v2+. 4 | # The full text of the GPL is available at: 5 | # http://www.gnu.org/licenses/ 6 | ############################################################################# 7 | 8 | 9 | from sage.finance.time_series cimport TimeSeries 10 | from sage.stats.intlist cimport IntList 11 | 12 | cdef class HiddenMarkovModel: 13 | cdef int N 14 | cdef TimeSeries A, pi 15 | 16 | cdef TimeSeries _baum_welch_gamma(self, TimeSeries alpha, TimeSeries beta) 17 | 18 | -------------------------------------------------------------------------------- /sage/symbolic/pynac_cc.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | inline long double sage_logl(long double x) 4 | { 5 | #if defined(__CYGWIN__) 6 | return log(x); 7 | #else 8 | return logl(x); 9 | #endif 10 | } 11 | 12 | inline long double sage_sqrtl(long double x) 13 | { 14 | #if defined(__CYGWIN__) 15 | return sqrt(x); 16 | #else 17 | return sqrtl(x); 18 | #endif 19 | } 20 | 21 | inline long double sage_tgammal(long double x) 22 | { 23 | #if defined(__CYGWIN__) 24 | return tgamma(x); 25 | #else 26 | return tgammal(x); 27 | #endif 28 | } 29 | 30 | inline long double sage_lgammal(long double x) 31 | { 32 | #if defined(__CYGWIN__) 33 | return lgamma(x); 34 | #else 35 | return lgammal(x); 36 | #endif 37 | } 38 | -------------------------------------------------------------------------------- /sage/ext/pthread.pxi: -------------------------------------------------------------------------------- 1 | cdef extern from "pthread.h": 2 | ctypedef int pthread_t # actual type will be used by Pyrex 3 | ctypedef int pthread_attr_t 4 | int pthread_create(pthread_t *thread, 5 | pthread_attr_t *attr, 6 | void *(*start_routine)(void *), 7 | void *arg) 8 | int pthread_join(pthread_t thread, void **value_ptr) 9 | void pthread_exit(void *value_pt) 10 | int pthread_attr_init(pthread_attr_t *) 11 | int pthread_attr_destroy(pthread_attr_t *) 12 | int pthread_attr_setdetachstate(pthread_attr_t *,int) 13 | int pthread_join(pthread_t ,void **) 14 | 15 | cdef enum: 16 | PTHREAD_CREATE_JOINABLE 17 | -------------------------------------------------------------------------------- /sage/groups/perm_gps/permgroup_element.pxd: -------------------------------------------------------------------------------- 1 | from sage.structure.element cimport MultiplicativeGroupElement, MonoidElement, Element 2 | from sage.structure.list_clone cimport ClonableIntArray 3 | 4 | cdef class PermutationGroupElement(MultiplicativeGroupElement): 5 | cdef int* perm 6 | cdef int n 7 | cdef int perm_buf[15] # to avoid malloc for small elements 8 | cdef __gap 9 | cdef Element _gap_element 10 | cdef __tuple 11 | cdef PermutationGroupElement _new_c(self) 12 | cpdef _gap_list(self) 13 | cpdef list(self) 14 | cdef public __custom_name 15 | cpdef list _act_on_list_on_position(self, list x) 16 | cpdef ClonableIntArray _act_on_array_on_position(self, ClonableIntArray x) 17 | -------------------------------------------------------------------------------- /sage/matrix/matrix_mod2e_dense.pxd: -------------------------------------------------------------------------------- 1 | # choose: dense or sparse 2 | 3 | from sage.rings.finite_rings.element_givaro cimport GivaroGfq, Cache_givaro 4 | 5 | from sage.libs.m4rie cimport mzed_t 6 | 7 | cimport matrix_dense 8 | 9 | cdef class Matrix_mod2e_dense(matrix_dense.Matrix_dense): 10 | cdef mzed_t *_entries 11 | cdef Cache_givaro cc 12 | cdef object _one 13 | cdef object _zero 14 | 15 | cpdef Matrix_mod2e_dense _multiply_travolta(Matrix_mod2e_dense self, Matrix_mod2e_dense right) 16 | cpdef Matrix_mod2e_dense _multiply_karatsuba(Matrix_mod2e_dense self, Matrix_mod2e_dense right) 17 | cpdef Matrix_mod2e_dense _multiply_strassen(Matrix_mod2e_dense self, Matrix_mod2e_dense right, cutoff=*) 18 | -------------------------------------------------------------------------------- /sage/structure/nonexact.py: -------------------------------------------------------------------------------- 1 | import sage.rings.integer 2 | 3 | class Nonexact: 4 | def __init__(self, prec=20): 5 | self.__default_prec = sage.rings.integer.Integer(prec) 6 | 7 | def default_prec(self): 8 | r""" 9 | Return the default precision for self. Use 10 | \code{set_default_prec} to set the default precision. 11 | """ 12 | try: 13 | return self.__default_prec 14 | except AttributeError: 15 | self.default_prec = 20 16 | return self.__default_prec 17 | return self.__default_prec 18 | 19 | def set_default_prec(self, prec): 20 | self.__default_prec = sage.rings.integer.Integer(prec) 21 | 22 | 23 | -------------------------------------------------------------------------------- /sage/quadratic_forms/all.py: -------------------------------------------------------------------------------- 1 | from binary_qf import BinaryQF, BinaryQF_reduced_representatives 2 | 3 | from quadratic_form import QuadraticForm, DiagonalQuadraticForm, is_QuadraticForm 4 | 5 | from random_quadraticform import random_quadraticform, random_quadraticform_with_conditions 6 | 7 | from extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number 8 | 9 | from special_values import gamma__exact, zeta__exact, QuadraticBernoulliNumber, \ 10 | quadratic_L_function__exact, quadratic_L_function__numerical 11 | 12 | from genera.genus import is_GlobalGenus, is_2_adic_genus 13 | #is_trivial_symbol 14 | 15 | from constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form 16 | 17 | -------------------------------------------------------------------------------- /sage/misc/classcall_metaclass.pxd: -------------------------------------------------------------------------------- 1 | #***************************************************************************** 2 | # Copyright (C) 2012 Florent Hivert 3 | # 4 | # Distributed under the terms of the GNU General Public License (GPL) 5 | # http://www.gnu.org/licenses/ 6 | #***************************************************************************** 7 | 8 | cdef extern from "object.h": 9 | ctypedef class __builtin__.type [object PyHeapTypeObject]: 10 | pass 11 | 12 | from sage.misc.nested_class cimport NestedClassMetaclass 13 | 14 | cdef class ClasscallMetaclass(NestedClassMetaclass): 15 | cdef object classcall 16 | cdef object classget 17 | cdef object classcontains 18 | -------------------------------------------------------------------------------- /sage/rings/polynomial/polynomial_zmod_flint.pxd: -------------------------------------------------------------------------------- 1 | cdef extern from "zn_poly/zn_poly.h": 2 | # This header needs to appear before the flint headers. 3 | pass 4 | 5 | from sage.libs.flint.zmod_poly cimport zmod_poly_t, zmod_poly_struct 6 | from sage.structure.parent cimport Parent 7 | 8 | ctypedef zmod_poly_struct celement 9 | 10 | include "polynomial_template_header.pxi" 11 | 12 | cdef class Polynomial_zmod_flint(Polynomial_template): 13 | cdef Polynomial_template _new(self) 14 | cdef _set_list(self, x) 15 | cpdef _mul_trunc(self, Polynomial_zmod_flint other, length) 16 | cpdef _mul_trunc_opposite(self, Polynomial_zmod_flint other, length) 17 | cpdef rational_reconstruct(self, m, n_deg=?, d_deg=?) 18 | 19 | -------------------------------------------------------------------------------- /sage/combinat/crystals/all.py: -------------------------------------------------------------------------------- 1 | from letters import CrystalOfLetters 2 | from spins import CrystalOfSpins 3 | from spins import CrystalOfSpinsPlus 4 | from spins import CrystalOfSpinsMinus 5 | from tensor_product import TensorProductOfCrystals 6 | from tensor_product import CrystalOfTableaux 7 | from fast_crystals import FastCrystal 8 | from affine import AffineCrystalFromClassical 9 | from affine import AffineCrystalFromClassicalAndPromotion 10 | from kirillov_reshetikhin import KirillovReshetikhinCrystal 11 | from highest_weight_crystals import HighestWeightCrystal 12 | from direct_sum import DirectSumOfCrystals 13 | from alcove_path import ClassicalCrystalOfAlcovePaths 14 | from alcove_path import ClassicalCrystalOfAlcovePathsElement 15 | 16 | -------------------------------------------------------------------------------- /sage/modules/real_double_vector.py: -------------------------------------------------------------------------------- 1 | """ 2 | Pickling for the old RDF vector class 3 | 4 | AUTHORS: 5 | 6 | - Jason Grout 7 | 8 | TESTS:: 9 | 10 | sage: v = vector(RDF, [1,2,3,4]) 11 | sage: loads(dumps(v)) == v 12 | True 13 | """ 14 | ############################################################################### 15 | # Copyright (C) 2008 Jason Grout 16 | # Distributed under the terms of the GNU General Public License (GPL) 17 | # http://www.gnu.org/licenses/ 18 | ############################################################################### 19 | from vector_real_double_dense import Vector_real_double_dense 20 | 21 | RealDoubleVectorSpaceElement = Vector_real_double_dense 22 | -------------------------------------------------------------------------------- /sage/interacts/statistics.py: -------------------------------------------------------------------------------- 1 | """ 2 | Interacts for Statistics 3 | 4 | AUTHORS: 5 | 6 | - Harald Schilly (2011-01-16): initial version (#9623) partially based on work by Lauri Ruotsalainen 7 | 8 | """ 9 | 10 | #***************************************************************************** 11 | # Copyright (C) 2011 Harald Schilly 12 | # 13 | # Distributed under the terms of the GNU General Public License (GPL) 14 | # as published by the Free Software Foundation; either version 2 of 15 | # the License, or (at your option) any later version. 16 | # http://www.gnu.org/licenses/ 17 | #***************************************************************************** 18 | 19 | from library import coin 20 | -------------------------------------------------------------------------------- /sage/modular/hecke/all.py: -------------------------------------------------------------------------------- 1 | from homspace import HeckeModuleHomspace, is_HeckeModuleHomspace 2 | 3 | from module import HeckeModule_free_module, HeckeModule_generic, is_HeckeModule 4 | 5 | from hecke_operator import HeckeOperator, is_HeckeOperator 6 | 7 | from degenmap import DegeneracyMap 8 | 9 | from algebra import HeckeAlgebra, is_HeckeAlgebra 10 | 11 | from morphism import (HeckeModuleMorphism, HeckeModuleMorphism_matrix, 12 | is_HeckeModuleMorphism, 13 | is_HeckeModuleMorphism_matrix) 14 | 15 | from element import HeckeModuleElement, is_HeckeModuleElement 16 | 17 | from submodule import HeckeSubmodule, is_HeckeSubmodule 18 | 19 | from ambient_module import AmbientHeckeModule, is_AmbientHeckeModule 20 | -------------------------------------------------------------------------------- /sage/rings/real_interval_field.py: -------------------------------------------------------------------------------- 1 | """ 2 | Field of Arbitrary Precision Real Number Intervals 3 | """ 4 | 5 | from sage.rings.real_mpfi import (RealIntervalField, RealIntervalFieldElement as RealIntervalFieldElementClass, 6 | create_RealIntervalFieldElement as RealIntervalFieldElement) 7 | 8 | def is_RealIntervalField(x): 9 | return isinstance(x, RealIntervalField) 10 | 11 | def is_RealIntervalFieldElement(x): 12 | return isinstance(x, RealIntervalFieldElementClass) 13 | 14 | def __reduce__RealIntervalField(prec, sci_not): 15 | return RealIntervalField(prec, sci_not) 16 | 17 | def __reduce__RealIntervalFieldElement(parent, x, base=10): 18 | return RealIntervalFieldElementClass(parent, x, base=base) 19 | -------------------------------------------------------------------------------- /sage/schemes/hyperelliptic_curves/hyperelliptic_g2_finite_field.py: -------------------------------------------------------------------------------- 1 | """ 2 | Hyperelliptic curves over a finite field 3 | """ 4 | 5 | #***************************************************************************** 6 | # Copyright (C) 2006 David Kohel 7 | # Distributed under the terms of the GNU General Public License (GPL) 8 | # http://www.gnu.org/licenses/ 9 | #***************************************************************************** 10 | 11 | import hyperelliptic_finite_field, hyperelliptic_g2_generic 12 | 13 | class HyperellipticCurve_g2_finite_field( 14 | hyperelliptic_g2_generic.HyperellipticCurve_g2_generic, 15 | hyperelliptic_finite_field.HyperellipticCurve_finite_field): 16 | pass 17 | 18 | --------------------------------------------------------------------------------