mathematicskit 0.1.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mathematicskit-0.1.0 → mathematicskit-0.2.1}/LICENSE +1 -1
- mathematicskit-0.2.1/PKG-INFO +201 -0
- mathematicskit-0.2.1/README.md +151 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/__init__.py +4 -4
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/__init__.py +94 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/core/base.py +51 -5
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/__init__.py +60 -0
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/actions.py +92 -0
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/codes.py +103 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/systems/finite_fields.py +11 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/systems/groups.py +111 -2
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/homomorphisms.py +117 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/systems/polynomial_ring.py +2 -2
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/structure.py +399 -0
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/subgroups.py +157 -0
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_actions.py +39 -0
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_codes.py +39 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/tests/test_finite_fields.py +19 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/tests/test_groups.py +41 -2
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_homomorphisms.py +39 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/tests/test_polynomial_ring.py +15 -2
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_structure.py +105 -0
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_subgroups.py +94 -0
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_visualizers.py +15 -0
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/utils/checks.py +4 -4
- mathematicskit-0.2.1/mathematicskit/abstract_algebra/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/visualizers/plots.py +1 -1
- mathematicskit-0.2.1/mathematicskit/calculus/__init__.py +78 -0
- mathematicskit-0.2.1/mathematicskit/calculus/core/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/core/base.py +21 -7
- mathematicskit-0.2.1/mathematicskit/calculus/systems/__init__.py +54 -0
- mathematicskit-0.2.1/mathematicskit/calculus/systems/exhaustion.py +59 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/systems/finite_differences.py +38 -2
- mathematicskit-0.2.1/mathematicskit/calculus/systems/quadrature.py +460 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/systems/taylor_series.py +47 -19
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/tests/test_autodiff.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/tests/test_dual_numbers.py +1 -1
- mathematicskit-0.2.1/mathematicskit/calculus/tests/test_exhaustion.py +38 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/tests/test_finite_differences.py +21 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/tests/test_quadrature.py +1 -1
- mathematicskit-0.2.1/mathematicskit/calculus/tests/test_quadrature_rules.py +90 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/tests/test_taylor_series.py +15 -8
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/tests/test_visualizers.py +4 -4
- mathematicskit-0.2.1/mathematicskit/calculus/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/utils/series_utils.py +2 -2
- mathematicskit-0.2.1/mathematicskit/calculus/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/visualizers/plots.py +3 -3
- mathematicskit-0.2.1/mathematicskit/combinatorics/__init__.py +85 -0
- mathematicskit-0.2.1/mathematicskit/combinatorics/core/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/core/base.py +18 -4
- mathematicskit-0.2.1/mathematicskit/combinatorics/systems/__init__.py +60 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/systems/counting.py +2 -2
- mathematicskit-0.2.1/mathematicskit/combinatorics/systems/designs.py +114 -0
- mathematicskit-0.2.1/mathematicskit/combinatorics/systems/extremal.py +124 -0
- mathematicskit-0.2.1/mathematicskit/combinatorics/systems/matching.py +85 -0
- mathematicskit-0.2.1/mathematicskit/combinatorics/systems/necklaces.py +71 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/systems/pascals_triangle.py +2 -2
- mathematicskit-0.2.1/mathematicskit/combinatorics/systems/sequences.py +149 -0
- mathematicskit-0.2.1/mathematicskit/combinatorics/systems/trees.py +116 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/tests/test_counting.py +7 -1
- mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_designs.py +36 -0
- mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_extremal.py +63 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/tests/test_inclusion_exclusion.py +1 -1
- mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_matching.py +30 -0
- mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_necklaces.py +23 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/tests/test_partitions.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/tests/test_pascals_triangle.py +2 -2
- mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_sequences.py +50 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/tests/test_special_numbers.py +3 -3
- mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_trees.py +24 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/tests/test_visualizers.py +4 -4
- mathematicskit-0.2.1/mathematicskit/combinatorics/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/utils/bell_number.py +2 -2
- mathematicskit-0.2.1/mathematicskit/combinatorics/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/visualizers/plots.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/constants.py +2 -2
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/__init__.py +58 -0
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/core/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/core/base.py +3 -3
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/__init__.py +34 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/systems/box_counting.py +8 -6
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/systems/cellular_automata.py +1 -1
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/curves.py +229 -0
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/dla.py +89 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/systems/ifs.py +4 -4
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/lsystems.py +101 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/systems/lyapunov.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/systems/mandelbrot_julia.py +3 -3
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/maps.py +49 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/tests/test_box_counting.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/tests/test_cellular_automata.py +1 -1
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/tests/test_curves.py +76 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/tests/test_ifs.py +1 -1
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/tests/test_lsystems.py +35 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/tests/test_lyapunov.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/tests/test_mandelbrot_julia.py +1 -1
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/tests/test_maps_and_dla.py +49 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/tests/test_visualizers.py +6 -6
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/utils/ifs_utils.py +1 -1
- mathematicskit-0.2.1/mathematicskit/fractals_chaos/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/visualizers/plots.py +7 -7
- mathematicskit-0.2.1/mathematicskit/geometry/__init__.py +82 -0
- mathematicskit-0.2.1/mathematicskit/geometry/core/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/core/base.py +83 -3
- mathematicskit-0.2.1/mathematicskit/geometry/systems/__init__.py +39 -0
- mathematicskit-0.2.1/mathematicskit/geometry/systems/bezier.py +65 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/systems/convex_hull.py +11 -6
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/systems/curves.py +2 -2
- mathematicskit-0.2.1/mathematicskit/geometry/systems/distances.py +38 -0
- mathematicskit-0.2.1/mathematicskit/geometry/systems/enclosing.py +82 -0
- mathematicskit-0.2.1/mathematicskit/geometry/systems/polygon.py +154 -0
- mathematicskit-0.2.1/mathematicskit/geometry/systems/polyhedra.py +56 -0
- mathematicskit-0.2.1/mathematicskit/geometry/systems/proximity.py +82 -0
- mathematicskit-0.2.1/mathematicskit/geometry/systems/simplification.py +64 -0
- mathematicskit-0.2.1/mathematicskit/geometry/systems/surfaces.py +146 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/systems/triangulation.py +1 -1
- mathematicskit-0.2.1/mathematicskit/geometry/tests/test_algorithms.py +93 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/tests/test_convex_hull.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/tests/test_curves.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/tests/test_intersections.py +1 -1
- mathematicskit-0.2.1/mathematicskit/geometry/tests/test_measurement.py +70 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/tests/test_polygon.py +1 -1
- mathematicskit-0.2.1/mathematicskit/geometry/tests/test_surfaces.py +45 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/tests/test_triangulation.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/tests/test_visualizers.py +6 -6
- mathematicskit-0.2.1/mathematicskit/geometry/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/utils/curves_library.py +1 -1
- mathematicskit-0.2.1/mathematicskit/geometry/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/visualizers/plots.py +5 -5
- mathematicskit-0.2.1/mathematicskit/graph_theory/__init__.py +99 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/core/__init__.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/core/base.py +96 -5
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/__init__.py +38 -0
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/assignment.py +44 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/systems/coloring.py +9 -4
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/components.py +62 -0
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/enumeration.py +49 -0
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/extremal.py +101 -0
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/hamiltonian.py +67 -0
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/matching.py +83 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/systems/max_flow.py +12 -2
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/ranking.py +68 -0
- mathematicskit-0.2.1/mathematicskit/graph_theory/systems/search.py +75 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/systems/shortest_paths.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/systems/spanning_tree.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/systems/spectral.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/test_coloring.py +12 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/test_generators.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/test_graph.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/test_max_flow.py +21 -2
- mathematicskit-0.2.1/mathematicskit/graph_theory/tests/test_new_algorithms.py +174 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/test_shortest_paths.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/test_spanning_tree.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/test_spectral.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/test_visualizers.py +5 -5
- mathematicskit-0.2.1/mathematicskit/graph_theory/utils/__init__.py +21 -0
- mathematicskit-0.2.1/mathematicskit/graph_theory/utils/generators.py +197 -0
- mathematicskit-0.2.1/mathematicskit/graph_theory/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/visualizers/plots.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/integrators/__init__.py +6 -6
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/integrators/adaptive.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/integrators/tests/test_integrators.py +2 -2
- mathematicskit-0.2.1/mathematicskit/linalg/__init__.py +110 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/core/__init__.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/core/base.py +79 -13
- mathematicskit-0.2.1/mathematicskit/linalg/systems/__init__.py +56 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/systems/cholesky.py +1 -1
- mathematicskit-0.2.1/mathematicskit/linalg/systems/cramer.py +68 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/systems/eigen.py +4 -2
- mathematicskit-0.2.1/mathematicskit/linalg/systems/gershgorin.py +59 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/systems/iterative.py +8 -8
- mathematicskit-0.2.1/mathematicskit/linalg/systems/lanczos.py +73 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/systems/lu.py +16 -4
- mathematicskit-0.2.1/mathematicskit/linalg/systems/matrix_polynomial.py +84 -0
- mathematicskit-0.2.1/mathematicskit/linalg/systems/pseudoinverse.py +91 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/systems/qr.py +11 -5
- mathematicskit-0.2.1/mathematicskit/linalg/systems/schur.py +78 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/systems/stability.py +2 -2
- mathematicskit-0.2.1/mathematicskit/linalg/systems/stationary.py +224 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/systems/svd.py +4 -4
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/test_cholesky.py +3 -3
- mathematicskit-0.2.1/mathematicskit/linalg/tests/test_classical.py +105 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/test_eigen.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/test_iterative.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/test_lu.py +23 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/test_qr.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/test_stability.py +1 -1
- mathematicskit-0.2.1/mathematicskit/linalg/tests/test_stationary_and_spectral.py +106 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/test_svd.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/test_visualizers.py +4 -4
- mathematicskit-0.2.1/mathematicskit/linalg/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/utils/matrix_utils.py +1 -1
- mathematicskit-0.2.1/mathematicskit/linalg/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/visualizers/plots.py +3 -3
- mathematicskit-0.2.1/mathematicskit/number_theory/__init__.py +71 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/core/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/core/base.py +41 -9
- mathematicskit-0.2.1/mathematicskit/number_theory/systems/__init__.py +42 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/systems/continued_fractions.py +43 -12
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/systems/crt.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/systems/diophantine.py +12 -4
- mathematicskit-0.2.1/mathematicskit/number_theory/systems/factorization.py +74 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/systems/modular_arithmetic.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/systems/primality.py +58 -7
- mathematicskit-0.2.1/mathematicskit/number_theory/systems/prime_distribution.py +109 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/systems/quadratic_residues.py +143 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/systems/sums_of_squares.py +104 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/systems/zeta.py +58 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_continued_fractions.py +75 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/tests/test_crt.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/tests/test_diophantine.py +12 -1
- mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_factorization.py +48 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/tests/test_gcd_lcm.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/tests/test_modular_arithmetic.py +1 -1
- mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_primality.py +81 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_prime_distribution.py +50 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_quadratic_residues.py +66 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_sums_of_squares.py +53 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/tests/test_totient.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/tests/test_visualizers.py +3 -3
- mathematicskit-0.2.1/mathematicskit/number_theory/utils/__init__.py +5 -0
- mathematicskit-0.2.1/mathematicskit/number_theory/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/visualizers/plots.py +3 -3
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/__init__.py +69 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/core/__init__.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/core/base.py +48 -5
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/__init__.py +37 -0
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/acceleration.py +57 -0
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/approximation.py +265 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/systems/chebyshev.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/systems/interpolation.py +68 -3
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/polynomials.py +141 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/systems/regression.py +9 -6
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/systems/root_finding.py +157 -8
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/systems/splines.py +3 -3
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/summation.py +68 -0
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/tests/test_acceleration.py +31 -0
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/tests/test_approximation.py +98 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/tests/test_chebyshev.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/tests/test_error_analysis.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/tests/test_interpolation.py +33 -1
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/tests/test_polynomials.py +71 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/tests/test_regression.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/tests/test_root_finding.py +55 -6
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/tests/test_splines.py +1 -1
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/tests/test_summation.py +38 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/tests/test_visualizers.py +5 -5
- mathematicskit-0.2.1/mathematicskit/numerical_analysis/utils/__init__.py +9 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/utils/error_analysis.py +8 -6
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/visualizers/__init__.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/visualizers/plots.py +4 -4
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/__init__.py +77 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/core/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/core/base.py +43 -7
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/__init__.py +58 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/chaotic_flows.py +186 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/chemical_oscillators.py +97 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/epidemics.py +156 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/excitable.py +133 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/systems/limit_cycles.py +55 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/systems/phase_portrait.py +4 -4
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/systems/poincare.py +1 -1
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/population.py +186 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/systems/stability.py +91 -16
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/synchronization.py +149 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/tests/test_bifurcations.py +1 -1
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_chaotic_flows.py +59 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_chemical_oscillators.py +30 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_epidemics.py +43 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_excitable.py +37 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/tests/test_limit_cycles.py +14 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/tests/test_logistic_map.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/tests/test_phase_portrait.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/tests/test_poincare.py +1 -1
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_population.py +53 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/tests/test_stability.py +24 -1
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_synchronization.py +48 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/tests/test_visualizers.py +5 -5
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/utils/__init__.py +5 -0
- mathematicskit-0.2.1/mathematicskit/ode_dynamics/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/visualizers/plots.py +4 -4
- mathematicskit-0.2.1/mathematicskit/optimization/__init__.py +92 -0
- mathematicskit-0.2.1/mathematicskit/optimization/core/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/core/base.py +99 -9
- mathematicskit-0.2.1/mathematicskit/optimization/systems/__init__.py +37 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/systems/conjugate_gradient.py +5 -5
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/systems/constrained.py +7 -7
- mathematicskit-0.2.1/mathematicskit/optimization/systems/direct_search.py +77 -0
- mathematicskit-0.2.1/mathematicskit/optimization/systems/dynamic_programming.py +72 -0
- mathematicskit-0.2.1/mathematicskit/optimization/systems/frank_wolfe.py +103 -0
- mathematicskit-0.2.1/mathematicskit/optimization/systems/game_theory.py +80 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/systems/gradient_descent.py +6 -6
- mathematicskit-0.2.1/mathematicskit/optimization/systems/least_squares.py +76 -0
- mathematicskit-0.2.1/mathematicskit/optimization/systems/linear_programming.py +131 -0
- mathematicskit-0.2.1/mathematicskit/optimization/systems/momentum.py +152 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/systems/newton_quasi_newton.py +9 -9
- mathematicskit-0.2.1/mathematicskit/optimization/systems/scalar_search.py +78 -0
- mathematicskit-0.2.1/mathematicskit/optimization/systems/stochastic.py +81 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/tests/test_comparison.py +4 -4
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/tests/test_conjugate_gradient.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/tests/test_constrained.py +1 -1
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_direct_search.py +28 -0
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_dynamic_programming.py +45 -0
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_frank_wolfe.py +45 -0
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_game_theory.py +42 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/tests/test_gradient_descent.py +2 -2
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_least_squares.py +40 -0
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_linear_programming.py +71 -0
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_momentum.py +61 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/tests/test_newton_quasi_newton.py +9 -2
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_scalar_search.py +38 -0
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_stochastic.py +30 -0
- mathematicskit-0.2.1/mathematicskit/optimization/tests/test_test_functions.py +69 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/tests/test_visualizers.py +6 -6
- mathematicskit-0.2.1/mathematicskit/optimization/utils/__init__.py +24 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/utils/comparison.py +4 -4
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/utils/line_search.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/utils/test_functions.py +24 -5
- mathematicskit-0.2.1/mathematicskit/optimization/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/visualizers/plots.py +3 -3
- mathematicskit-0.2.1/mathematicskit/probability/__init__.py +83 -0
- mathematicskit-0.2.1/mathematicskit/probability/core/__init__.py +21 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/core/base.py +69 -6
- mathematicskit-0.2.1/mathematicskit/probability/systems/__init__.py +48 -0
- mathematicskit-0.2.1/mathematicskit/probability/systems/bayes.py +80 -0
- mathematicskit-0.2.1/mathematicskit/probability/systems/branching.py +111 -0
- mathematicskit-0.2.1/mathematicskit/probability/systems/buffon.py +73 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/systems/continuous.py +39 -3
- mathematicskit-0.2.1/mathematicskit/probability/systems/continuous_time_markov.py +81 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/systems/discrete.py +1 -1
- mathematicskit-0.2.1/mathematicskit/probability/systems/inequalities.py +57 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/systems/limit_theorems.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/systems/markov_chain.py +11 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/systems/monte_carlo.py +3 -3
- mathematicskit-0.2.1/mathematicskit/probability/systems/queueing.py +52 -0
- mathematicskit-0.2.1/mathematicskit/probability/systems/st_petersburg.py +79 -0
- mathematicskit-0.2.1/mathematicskit/probability/systems/stochastic_processes.py +158 -0
- mathematicskit-0.2.1/mathematicskit/probability/tests/test_classical_problems.py +90 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/tests/test_continuous.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/tests/test_discrete.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/tests/test_limit_theorems.py +3 -3
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/tests/test_markov_chain.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/tests/test_monte_carlo.py +3 -3
- mathematicskit-0.2.1/mathematicskit/probability/tests/test_stochastic_processes.py +113 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/tests/test_visualizers.py +6 -6
- mathematicskit-0.2.1/mathematicskit/probability/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/utils/diagnostics.py +2 -2
- mathematicskit-0.2.1/mathematicskit/probability/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/visualizers/plots.py +3 -3
- mathematicskit-0.2.1/mathematicskit/special_functions/__init__.py +77 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/core/__init__.py +5 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/core/base.py +81 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/__init__.py +53 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/airy.py +46 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/systems/bessel.py +1 -1
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/elliptic.py +132 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/error_functions.py +93 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/systems/fourier_transform.py +1 -1
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/gamma_beta.py +160 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/hypergeometric.py +80 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/lambert_w.py +56 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/mathieu.py +122 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/systems/orthogonal_polynomials.py +2 -2
- mathematicskit-0.2.1/mathematicskit/special_functions/systems/zeta.py +85 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_airy.py +49 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/tests/test_bessel.py +1 -1
- mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_elliptic.py +74 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_error_functions.py +65 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/tests/test_fourier_transform.py +1 -1
- mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_gamma_beta.py +71 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_hypergeometric.py +66 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_lambert_w.py +47 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_mathieu.py +56 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/tests/test_orthogonal_polynomials.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/tests/test_visualizers.py +3 -3
- mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_zeta.py +44 -0
- mathematicskit-0.2.1/mathematicskit/special_functions/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/utils/orthogonality.py +2 -2
- mathematicskit-0.2.1/mathematicskit/special_functions/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/visualizers/plots.py +3 -3
- mathematicskit-0.2.1/mathematicskit/statistics/__init__.py +91 -0
- mathematicskit-0.2.1/mathematicskit/statistics/core/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/core/base.py +123 -2
- mathematicskit-0.2.1/mathematicskit/statistics/systems/__init__.py +52 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/systems/bootstrap.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/systems/confidence_intervals.py +3 -3
- mathematicskit-0.2.1/mathematicskit/statistics/systems/correlation.py +99 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/systems/descriptive.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/systems/hypothesis_tests.py +16 -8
- mathematicskit-0.2.1/mathematicskit/statistics/systems/jackknife.py +62 -0
- mathematicskit-0.2.1/mathematicskit/statistics/systems/likelihood.py +95 -0
- mathematicskit-0.2.1/mathematicskit/statistics/systems/multiple_testing.py +86 -0
- mathematicskit-0.2.1/mathematicskit/statistics/systems/nonparametric.py +167 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/systems/regression.py +2 -2
- mathematicskit-0.2.1/mathematicskit/statistics/systems/shrinkage.py +64 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/tests/test_bootstrap.py +2 -2
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/tests/test_confidence_intervals.py +1 -1
- mathematicskit-0.2.1/mathematicskit/statistics/tests/test_correlation.py +45 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/tests/test_descriptive.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/tests/test_effect_size.py +1 -1
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/tests/test_hypothesis_tests.py +1 -1
- mathematicskit-0.2.1/mathematicskit/statistics/tests/test_jackknife.py +28 -0
- mathematicskit-0.2.1/mathematicskit/statistics/tests/test_likelihood.py +58 -0
- mathematicskit-0.2.1/mathematicskit/statistics/tests/test_multiple_testing.py +43 -0
- mathematicskit-0.2.1/mathematicskit/statistics/tests/test_nonparametric.py +74 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/tests/test_regression.py +1 -1
- mathematicskit-0.2.1/mathematicskit/statistics/tests/test_shrinkage.py +36 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/tests/test_visualizers.py +3 -3
- mathematicskit-0.2.1/mathematicskit/statistics/utils/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/utils/effect_size.py +1 -1
- mathematicskit-0.2.1/mathematicskit/statistics/visualizers/__init__.py +5 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/visualizers/plots.py +4 -4
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/tests/test_package.py +3 -3
- mathematicskit-0.2.1/mathematicskit.egg-info/PKG-INFO +201 -0
- mathematicskit-0.2.1/mathematicskit.egg-info/SOURCES.txt +448 -0
- mathematicskit-0.2.1/mathematicskit.egg-info/top_level.txt +1 -0
- {mathematicskit-0.1.0 → mathematicskit-0.2.1}/pyproject.toml +23 -26
- mathematicskit-0.1.0/PKG-INFO +0 -201
- mathematicskit-0.1.0/README.md +0 -151
- mathematicskit-0.1.0/mathematicskit.egg-info/PKG-INFO +0 -201
- mathematicskit-0.1.0/mathematicskit.egg-info/SOURCES.txt +0 -308
- mathematicskit-0.1.0/mathematicskit.egg-info/top_level.txt +0 -1
- mathematicskit-0.1.0/mathkit/abstract_algebra/__init__.py +0 -43
- mathematicskit-0.1.0/mathkit/abstract_algebra/systems/__init__.py +0 -23
- mathematicskit-0.1.0/mathkit/abstract_algebra/systems/subgroups.py +0 -144
- mathematicskit-0.1.0/mathkit/abstract_algebra/tests/test_subgroups.py +0 -59
- mathematicskit-0.1.0/mathkit/abstract_algebra/tests/test_visualizers.py +0 -15
- mathematicskit-0.1.0/mathkit/abstract_algebra/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/abstract_algebra/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/calculus/__init__.py +0 -48
- mathematicskit-0.1.0/mathkit/calculus/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/calculus/systems/__init__.py +0 -27
- mathematicskit-0.1.0/mathkit/calculus/systems/quadrature.py +0 -184
- mathematicskit-0.1.0/mathkit/calculus/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/calculus/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/combinatorics/__init__.py +0 -43
- mathematicskit-0.1.0/mathkit/combinatorics/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/combinatorics/systems/__init__.py +0 -23
- mathematicskit-0.1.0/mathkit/combinatorics/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/combinatorics/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/fractals_chaos/__init__.py +0 -41
- mathematicskit-0.1.0/mathkit/fractals_chaos/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/fractals_chaos/systems/__init__.py +0 -20
- mathematicskit-0.1.0/mathkit/fractals_chaos/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/fractals_chaos/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/geometry/__init__.py +0 -42
- mathematicskit-0.1.0/mathkit/geometry/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/geometry/systems/__init__.py +0 -19
- mathematicskit-0.1.0/mathkit/geometry/systems/polygon.py +0 -73
- mathematicskit-0.1.0/mathkit/geometry/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/geometry/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/graph_theory/__init__.py +0 -47
- mathematicskit-0.1.0/mathkit/graph_theory/systems/__init__.py +0 -19
- mathematicskit-0.1.0/mathkit/graph_theory/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/graph_theory/utils/generators.py +0 -111
- mathematicskit-0.1.0/mathkit/graph_theory/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/linalg/__init__.py +0 -78
- mathematicskit-0.1.0/mathkit/linalg/systems/__init__.py +0 -35
- mathematicskit-0.1.0/mathkit/linalg/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/linalg/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/number_theory/__init__.py +0 -48
- mathematicskit-0.1.0/mathkit/number_theory/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/number_theory/systems/__init__.py +0 -26
- mathematicskit-0.1.0/mathkit/number_theory/tests/test_continued_fractions.py +0 -43
- mathematicskit-0.1.0/mathkit/number_theory/tests/test_primality.py +0 -50
- mathematicskit-0.1.0/mathkit/number_theory/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/number_theory/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/numerical_analysis/__init__.py +0 -48
- mathematicskit-0.1.0/mathkit/numerical_analysis/systems/__init__.py +0 -22
- mathematicskit-0.1.0/mathkit/numerical_analysis/utils/__init__.py +0 -9
- mathematicskit-0.1.0/mathkit/ode_dynamics/__init__.py +0 -44
- mathematicskit-0.1.0/mathkit/ode_dynamics/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/ode_dynamics/systems/__init__.py +0 -30
- mathematicskit-0.1.0/mathkit/ode_dynamics/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/ode_dynamics/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/optimization/__init__.py +0 -49
- mathematicskit-0.1.0/mathkit/optimization/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/optimization/systems/__init__.py +0 -19
- mathematicskit-0.1.0/mathkit/optimization/systems/linear_programming.py +0 -67
- mathematicskit-0.1.0/mathkit/optimization/tests/test_linear_programming.py +0 -37
- mathematicskit-0.1.0/mathkit/optimization/utils/__init__.py +0 -17
- mathematicskit-0.1.0/mathkit/optimization/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/probability/__init__.py +0 -43
- mathematicskit-0.1.0/mathkit/probability/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/probability/systems/__init__.py +0 -24
- mathematicskit-0.1.0/mathkit/probability/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/probability/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/special_functions/__init__.py +0 -39
- mathematicskit-0.1.0/mathkit/special_functions/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/special_functions/core/base.py +0 -38
- mathematicskit-0.1.0/mathkit/special_functions/systems/__init__.py +0 -22
- mathematicskit-0.1.0/mathkit/special_functions/systems/gamma_beta.py +0 -87
- mathematicskit-0.1.0/mathkit/special_functions/tests/test_gamma_beta.py +0 -42
- mathematicskit-0.1.0/mathkit/special_functions/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/special_functions/visualizers/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/statistics/__init__.py +0 -54
- mathematicskit-0.1.0/mathkit/statistics/core/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/statistics/systems/__init__.py +0 -33
- mathematicskit-0.1.0/mathkit/statistics/utils/__init__.py +0 -5
- mathematicskit-0.1.0/mathkit/statistics/visualizers/__init__.py +0 -5
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/systems/autodiff.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/systems/dual_numbers.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/calculus/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/systems/inclusion_exclusion.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/systems/partitions.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/systems/special_numbers.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/combinatorics/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/fractals_chaos/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/systems/intersections.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/geometry/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/graph_theory/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/integrators/fixed_step.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/integrators/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/linalg/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/systems/totient.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/number_theory/utils/gcd_lcm.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/numerical_analysis/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/systems/bifurcations.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/systems/logistic_map.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/ode_dynamics/utils/period_estimation.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/optimization/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/probability/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/special_functions/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/statistics/tests/__init__.py +0 -0
- {mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/tests/__init__.py +0 -0
- {mathematicskit-0.1.0 → mathematicskit-0.2.1}/mathematicskit.egg-info/dependency_links.txt +0 -0
- {mathematicskit-0.1.0 → mathematicskit-0.2.1}/mathematicskit.egg-info/requires.txt +0 -0
- {mathematicskit-0.1.0 → mathematicskit-0.2.1}/setup.cfg +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mathematicskit
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Unified computational mathematics toolkit: numerical analysis, linear algebra, calculus, dynamical systems, optimization, probability, statistics, number theory, combinatorics, graph theory, abstract algebra, geometry, special functions, and fractals/chaos -- all hand-rolled from first principles.
|
|
5
|
+
Author-email: Charles Poli <cpoli374@gmail.com>
|
|
6
|
+
Maintainer-email: Charles Poli <cpoli374@gmail.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/cpoli/mathematicskit
|
|
9
|
+
Project-URL: Issues, https://github.com/cpoli/mathematicskit/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/cpoli/mathematicskit/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: Documentation, https://cpoli.github.io/mathematicskit/
|
|
12
|
+
Keywords: mathematics,numerical-analysis,linear-algebra,computational-mathematics,optimization,graph-theory,number-theory,probability,statistics
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: numpy>=1.24
|
|
26
|
+
Requires-Dist: scipy>=1.10
|
|
27
|
+
Requires-Dist: matplotlib>=3.6
|
|
28
|
+
Requires-Dist: numba>=0.58
|
|
29
|
+
Requires-Dist: plotly>=5.15
|
|
30
|
+
Requires-Dist: sympy>=1.11
|
|
31
|
+
Requires-Dist: tqdm>=4.65
|
|
32
|
+
Provides-Extra: test
|
|
33
|
+
Requires-Dist: pytest>=7.0; extra == "test"
|
|
34
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
35
|
+
Requires-Dist: hypothesis>=6.90; extra == "test"
|
|
36
|
+
Requires-Dist: pillow>=9.0; extra == "test"
|
|
37
|
+
Provides-Extra: docs
|
|
38
|
+
Requires-Dist: sphinx>=7.0; extra == "docs"
|
|
39
|
+
Requires-Dist: pydata-sphinx-theme>=0.15; extra == "docs"
|
|
40
|
+
Requires-Dist: sphinx-autodoc-typehints>=1.25; extra == "docs"
|
|
41
|
+
Requires-Dist: myst-parser>=2.0; extra == "docs"
|
|
42
|
+
Requires-Dist: sphinx-gallery>=0.15; extra == "docs"
|
|
43
|
+
Requires-Dist: sphinx-design>=0.6; extra == "docs"
|
|
44
|
+
Provides-Extra: dev
|
|
45
|
+
Requires-Dist: mathematicskit[docs,test]; extra == "dev"
|
|
46
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
47
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
48
|
+
Requires-Dist: pre-commit>=3.7; extra == "dev"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
# mathematicskit
|
|
52
|
+
|
|
53
|
+
| | |
|
|
54
|
+
|:--|:-:|
|
|
55
|
+
| Package | [](https://pypi.org/project/mathematicskit/) [](https://pypi.org/project/mathematicskit/) |
|
|
56
|
+
| Quality | [](https://github.com/cpoli/mathematicskit/blob/main/LICENSE) [](https://github.com/cpoli/mathematicskit/actions/workflows/ci.yml) [](https://codecov.io/gh/cpoli/mathematicskit) [](#coverage) |
|
|
57
|
+
| Documentation | [](https://cpoli.github.io/mathematicskit/) |
|
|
58
|
+
| Code style | [](https://github.com/astral-sh/ruff) |
|
|
59
|
+
| Downloads | [](https://pepy.tech/project/mathematicskit) [](https://pepy.tech/project/mathematicskit) |
|
|
60
|
+
| Community | [](https://github.com/cpoli/mathematicskit) [](https://github.com/cpoli/mathematicskit) [](https://github.com/cpoli/mathematicskit/graphs/contributors) [](https://github.com/cpoli/mathematicskit/commits/main) |
|
|
61
|
+
|
|
62
|
+
A unified toolkit for computational mathematics, spanning the field end
|
|
63
|
+
to end: Newton's method chasing roots and Poincare sections of the
|
|
64
|
+
driven Duffing oscillator, Mandelbrot sets and the Feigenbaum route to
|
|
65
|
+
chaos, Dijkstra's shortest paths and finite-field arithmetic, the
|
|
66
|
+
Central Limit Theorem in action and Bessel functions in closed form --
|
|
67
|
+
with each domain's docs tracing the field's own foundational
|
|
68
|
+
breakthroughs in chronological, pedagogical order, every historical
|
|
69
|
+
milestone linked directly to the runnable code that reproduces it. 14
|
|
70
|
+
domain subpackages, one consistent NumPy-based API -- built directly on
|
|
71
|
+
`numpy`/`scipy` for anything they already implement (decompositions,
|
|
72
|
+
eigensolvers, quadrature, statistical distributions, optimization
|
|
73
|
+
routines, and more), hand-rolling an algorithm from scratch only where
|
|
74
|
+
no `numpy`/`scipy` equivalent exists (e.g. graph algorithms, the simplex
|
|
75
|
+
method, modular arithmetic) or where the algorithm's own iterate
|
|
76
|
+
behavior is the pedagogical subject (e.g. root-finder convergence
|
|
77
|
+
history, autodiff). No hard dependency on `networkx`, `cvxpy`, or
|
|
78
|
+
SageMath. Sharing common ODE integrators throughout. Conventionally
|
|
79
|
+
imported as `mk`.
|
|
80
|
+
|
|
81
|
+
All 14 domains from `mathkit-spec.md`'s build plan are implemented --
|
|
82
|
+
see [Subpackages](#subpackages) for the full list, or browse the docs at
|
|
83
|
+
<https://cpoli.github.io/mathematicskit/>.
|
|
84
|
+
|
|
85
|
+
## Install
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python -m venv .venv && source .venv/bin/activate
|
|
89
|
+
pip install -e ".[dev]"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Published on PyPI as `mathematicskit` (the shorter name `mathkit` was
|
|
93
|
+
already taken by an unrelated package) -- `pip install mathematicskit`,
|
|
94
|
+
then `import mathematicskit as mk` as usual.
|
|
95
|
+
|
|
96
|
+
## Quick start
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
import mathematicskit as mk
|
|
100
|
+
|
|
101
|
+
spline = mk.numerical_analysis.CubicSpline(x=[0, 1, 2, 3], y=[0, 1, 0, 1], boundary="natural")
|
|
102
|
+
print(spline.evaluate(1.5))
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Subpackages
|
|
106
|
+
|
|
107
|
+
Domain subpackages, each with runnable examples linked below:
|
|
108
|
+
|
|
109
|
+
- [`mathematicskit.numerical_analysis`](https://cpoli.github.io/mathematicskit/api/gallery/numerical_analysis/) -- root finding (bisection, Newton-Raphson, secant, fixed-point, hand-rolled for their convergence history), Lagrange/Newton (hand-rolled) plus scipy-backed cubic-spline interpolation, numpy-backed Chebyshev nodes, `numpy.linalg.lstsq`-based polynomial regression, and `numpy.linalg.cond`-based error/condition-number analysis.
|
|
110
|
+
- [`mathematicskit.linalg`](https://cpoli.github.io/mathematicskit/api/gallery/linalg/) -- LU/QR/Cholesky decompositions and eigenvalue computation via `scipy.linalg`/`numpy.linalg`, power/inverse iteration (hand-rolled), SVD, conjugate gradient and GMRES via `scipy.sparse.linalg`, and least-squares stability (normal equations vs. QR vs. `numpy.linalg.lstsq`).
|
|
111
|
+
- [`mathematicskit.calculus`](https://cpoli.github.io/mathematicskit/api/gallery/calculus/) -- finite-difference derivatives with Richardson extrapolation (hand-rolled), `scipy.integrate`-backed trapezoidal/Simpson/Gauss-Legendre/adaptive quadrature, forward-mode (dual numbers) and reverse-mode (backpropagation) automatic differentiation (hand-rolled), and Taylor/Maclaurin series.
|
|
112
|
+
- [`mathematicskit.ode_dynamics`](https://cpoli.github.io/mathematicskit/api/gallery/ode_dynamics/) -- Jacobian-linearization fixed-point stability (node/saddle/spiral/center), phase portraits, the logistic map's Feigenbaum route to chaos, saddle-node/pitchfork/Hopf bifurcation normal forms, the Van der Pol limit cycle, and Poincare sections of the driven Duffing oscillator.
|
|
113
|
+
- [`mathematicskit.fractals_chaos`](https://cpoli.github.io/mathematicskit/api/gallery/fractals_chaos/) -- Lyapunov exponent estimation, box-counting fractal dimension, Numba-accelerated Mandelbrot/Julia set generation, iterated function systems (Barnsley fern, Sierpinski triangle/carpet), and cellular automata (Wolfram rules, Conway's Game of Life).
|
|
114
|
+
- [`mathematicskit.optimization`](https://cpoli.github.io/mathematicskit/api/gallery/optimization/) -- gradient descent and nonlinear conjugate gradient (hand-rolled, iterate-path-exposing), Newton's method and BFGS via `scipy.optimize.minimize`, Lagrange multipliers and KKT-condition verification, a quadratic-penalty method, and linear programming via `scipy.optimize.linprog`.
|
|
115
|
+
- [`mathematicskit.probability`](https://cpoli.github.io/mathematicskit/api/gallery/probability/) -- binomial/Poisson/geometric/uniform/exponential/normal/gamma distributions via `scipy.stats` (plus mathematicskit's own MGFs), Monte Carlo integration with variance reduction (importance sampling, control variates), Law of Large Numbers/Central Limit Theorem simulation, and discrete-time Markov chains.
|
|
116
|
+
- [`mathematicskit.statistics`](https://cpoli.github.io/mathematicskit/api/gallery/statistics/) -- descriptive statistics, z/t/chi-square hypothesis tests and one-way ANOVA, confidence intervals for means/proportions/variances, OLS linear regression with residual diagnostics, and bootstrap resampling via `scipy.stats.bootstrap`.
|
|
117
|
+
- [`mathematicskit.number_theory`](https://cpoli.github.io/mathematicskit/api/gallery/number_theory/) -- the extended Euclidean algorithm and modular inverses, fast modular exponentiation, primality testing (trial division, Miller-Rabin) and prime generation, the Chinese Remainder Theorem, continued fractions and best rational approximations, Euler's totient/Mobius/divisor-sum functions, and linear/Pell Diophantine equation solvers (hand-rolled -- exact-integer number theory has no `numpy`/`scipy` equivalent).
|
|
118
|
+
- [`mathematicskit.combinatorics`](https://cpoli.github.io/mathematicskit/api/gallery/combinatorics/) -- permutation/combination counting via `scipy.special.perm`/`comb` (sequence generation via `itertools`), a hand-rolled Pascal's triangle, integer partitions and Young/Ferrers diagrams, the inclusion-exclusion principle and derangements, and Stirling/Catalan/Bell numbers (hand-rolled -- no scipy/numpy equivalent).
|
|
119
|
+
- [`mathematicskit.graph_theory`](https://cpoli.github.io/mathematicskit/api/gallery/graph_theory/) -- a lightweight own graph container (no `networkx`); shortest paths (Dijkstra/Bellman-Ford/Floyd-Warshall) and minimum spanning tree (Kruskal) via `scipy.sparse.csgraph`, with a hand-rolled Prim's kept for comparison; maximum flow/minimum cut via `scipy.sparse.csgraph.maximum_flow`; hand-rolled graph coloring (greedy, exact backtracking); and spectral graph theory (Laplacian via scipy, eigendecomposition via `numpy.linalg.eigh`).
|
|
120
|
+
- [`mathematicskit.abstract_algebra`](https://cpoli.github.io/mathematicskit/api/gallery/abstract_algebra/) -- cyclic and permutation groups with Cayley tables and group-property checks, subgroup/coset enumeration, finite field arithmetic (`GF(p)`/`GF(p^n)` via irreducible polynomials), and polynomial ring arithmetic over Z/Q/finite fields (hand-rolled throughout -- no scipy/numpy equivalent).
|
|
121
|
+
- [`mathematicskit.geometry`](https://cpoli.github.io/mathematicskit/api/gallery/geometry/) -- convex hull via `scipy.spatial.ConvexHull` (with a hand-rolled Graham scan comparison), Delaunay triangulation/Voronoi diagrams via `scipy.spatial`, hand-rolled segment intersection and point-in-polygon tests, polygon area/centroid via the shoelace formula, and curvature/arc-length/the Frenet-Serret frame for parametric curves.
|
|
122
|
+
- [`mathematicskit.special_functions`](https://cpoli.github.io/mathematicskit/api/gallery/special_functions/) -- the gamma/beta functions and Bessel functions via `scipy.special`, orthogonal polynomial families (Legendre/Chebyshev/Hermite/Laguerre) via `numpy.polynomial` with numerically-verified orthogonality, and the discrete Fourier transform via `numpy.fft` alongside a hand-rolled naive-DFT-vs-radix-2-FFT pedagogical speed comparison.
|
|
123
|
+
|
|
124
|
+
Shared infrastructure, used across the subpackages above rather than
|
|
125
|
+
standalone toolkits:
|
|
126
|
+
|
|
127
|
+
- `mathematicskit.constants` -- mathematical constants and default numerical
|
|
128
|
+
tolerances shared across subpackages.
|
|
129
|
+
- `mathematicskit.integrators` -- shared numerical ODE integrators (RK4,
|
|
130
|
+
leapfrog, Yoshida4, adaptive Dormand-Prince), used by
|
|
131
|
+
`mathematicskit.ode_dynamics`.
|
|
132
|
+
|
|
133
|
+
## Test
|
|
134
|
+
|
|
135
|
+
Tests live alongside each subpackage, at `mathematicskit/<name>/tests/`.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
pytest # everything
|
|
139
|
+
pytest mathematicskit/numerical_analysis/tests # a single subpackage
|
|
140
|
+
|
|
141
|
+
# docstring examples, across every subpackage:
|
|
142
|
+
MPLBACKEND=Agg pytest --doctest-modules mathematicskit --ignore-glob="*/tests/*"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Both commands, plus `ruff check`/`ruff format --check`, run in CI on
|
|
146
|
+
every PR (`.github/workflows/ci.yml`) across Python 3.9-3.12 on Linux and
|
|
147
|
+
macOS. See [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR.
|
|
148
|
+
|
|
149
|
+
### Coverage
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
MPLBACKEND=Agg pytest -q --cov=mathematicskit --cov-report=term
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
620 tests, 96% line coverage overall. Per-subpackage coverage:
|
|
156
|
+
|
|
157
|
+
| Subpackage | Coverage | | Subpackage | Coverage |
|
|
158
|
+
|:--|--:|---|:--|--:|
|
|
159
|
+
| `abstract_algebra` | 97% | | `ode_dynamics` | 92% |
|
|
160
|
+
| `calculus` | 95% | | `optimization` | 99% |
|
|
161
|
+
| `combinatorics` | 98% | | `probability` | 98% |
|
|
162
|
+
| `fractals_chaos` | 92% | | `special_functions` | 100% |
|
|
163
|
+
| `geometry` | 100% | | `statistics` | 99% |
|
|
164
|
+
| `graph_theory` | 99% | | `integrators` | 50% |
|
|
165
|
+
| `linalg` | 95% | | `constants` | 100% |
|
|
166
|
+
| `number_theory` | 99% | | | |
|
|
167
|
+
| `numerical_analysis` | 97% | | | |
|
|
168
|
+
|
|
169
|
+
`visualizers/` modules are smoke-tested only (correct return type/shape,
|
|
170
|
+
or that `anim.save()` succeeds) rather than covered line-by-line, per the
|
|
171
|
+
testing convention in [CLAUDE.md](CLAUDE.md). `integrators` sits lower
|
|
172
|
+
because several of its fixed-step/adaptive methods aren't exercised
|
|
173
|
+
directly by its own tests, only indirectly through the two subpackages
|
|
174
|
+
(`ode_dynamics`, `fractals_chaos`) that call into it.
|
|
175
|
+
|
|
176
|
+
## Docs
|
|
177
|
+
|
|
178
|
+
Built docs are hosted at <https://cpoli.github.io/mathematicskit/>, served from
|
|
179
|
+
the `gh-pages` branch. To build locally:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
pip install -e ".[docs]"
|
|
183
|
+
cd docs && make html
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
See `docs/source/history/` for a chronology of each domain's foundational
|
|
187
|
+
results, linked to the corresponding implementation at each step.
|
|
188
|
+
|
|
189
|
+
## Citation
|
|
190
|
+
|
|
191
|
+
If you use mathematicskit in your research, please cite it — see
|
|
192
|
+
[CITATION.cff](CITATION.cff).
|
|
193
|
+
|
|
194
|
+
## Contributing
|
|
195
|
+
|
|
196
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Please note that this project
|
|
197
|
+
follows the [Contributor Covenant](CODE_OF_CONDUCT.md).
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
MIT -- see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# mathematicskit
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
|:--|:-:|
|
|
5
|
+
| Package | [](https://pypi.org/project/mathematicskit/) [](https://pypi.org/project/mathematicskit/) |
|
|
6
|
+
| Quality | [](https://github.com/cpoli/mathematicskit/blob/main/LICENSE) [](https://github.com/cpoli/mathematicskit/actions/workflows/ci.yml) [](https://codecov.io/gh/cpoli/mathematicskit) [](#coverage) |
|
|
7
|
+
| Documentation | [](https://cpoli.github.io/mathematicskit/) |
|
|
8
|
+
| Code style | [](https://github.com/astral-sh/ruff) |
|
|
9
|
+
| Downloads | [](https://pepy.tech/project/mathematicskit) [](https://pepy.tech/project/mathematicskit) |
|
|
10
|
+
| Community | [](https://github.com/cpoli/mathematicskit) [](https://github.com/cpoli/mathematicskit) [](https://github.com/cpoli/mathematicskit/graphs/contributors) [](https://github.com/cpoli/mathematicskit/commits/main) |
|
|
11
|
+
|
|
12
|
+
A unified toolkit for computational mathematics, spanning the field end
|
|
13
|
+
to end: Newton's method chasing roots and Poincare sections of the
|
|
14
|
+
driven Duffing oscillator, Mandelbrot sets and the Feigenbaum route to
|
|
15
|
+
chaos, Dijkstra's shortest paths and finite-field arithmetic, the
|
|
16
|
+
Central Limit Theorem in action and Bessel functions in closed form --
|
|
17
|
+
with each domain's docs tracing the field's own foundational
|
|
18
|
+
breakthroughs in chronological, pedagogical order, every historical
|
|
19
|
+
milestone linked directly to the runnable code that reproduces it. 14
|
|
20
|
+
domain subpackages, one consistent NumPy-based API -- built directly on
|
|
21
|
+
`numpy`/`scipy` for anything they already implement (decompositions,
|
|
22
|
+
eigensolvers, quadrature, statistical distributions, optimization
|
|
23
|
+
routines, and more), hand-rolling an algorithm from scratch only where
|
|
24
|
+
no `numpy`/`scipy` equivalent exists (e.g. graph algorithms, the simplex
|
|
25
|
+
method, modular arithmetic) or where the algorithm's own iterate
|
|
26
|
+
behavior is the pedagogical subject (e.g. root-finder convergence
|
|
27
|
+
history, autodiff). No hard dependency on `networkx`, `cvxpy`, or
|
|
28
|
+
SageMath. Sharing common ODE integrators throughout. Conventionally
|
|
29
|
+
imported as `mk`.
|
|
30
|
+
|
|
31
|
+
All 14 domains from `mathkit-spec.md`'s build plan are implemented --
|
|
32
|
+
see [Subpackages](#subpackages) for the full list, or browse the docs at
|
|
33
|
+
<https://cpoli.github.io/mathematicskit/>.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
python -m venv .venv && source .venv/bin/activate
|
|
39
|
+
pip install -e ".[dev]"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Published on PyPI as `mathematicskit` (the shorter name `mathkit` was
|
|
43
|
+
already taken by an unrelated package) -- `pip install mathematicskit`,
|
|
44
|
+
then `import mathematicskit as mk` as usual.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
import mathematicskit as mk
|
|
50
|
+
|
|
51
|
+
spline = mk.numerical_analysis.CubicSpline(x=[0, 1, 2, 3], y=[0, 1, 0, 1], boundary="natural")
|
|
52
|
+
print(spline.evaluate(1.5))
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Subpackages
|
|
56
|
+
|
|
57
|
+
Domain subpackages, each with runnable examples linked below:
|
|
58
|
+
|
|
59
|
+
- [`mathematicskit.numerical_analysis`](https://cpoli.github.io/mathematicskit/api/gallery/numerical_analysis/) -- root finding (bisection, Newton-Raphson, secant, fixed-point, hand-rolled for their convergence history), Lagrange/Newton (hand-rolled) plus scipy-backed cubic-spline interpolation, numpy-backed Chebyshev nodes, `numpy.linalg.lstsq`-based polynomial regression, and `numpy.linalg.cond`-based error/condition-number analysis.
|
|
60
|
+
- [`mathematicskit.linalg`](https://cpoli.github.io/mathematicskit/api/gallery/linalg/) -- LU/QR/Cholesky decompositions and eigenvalue computation via `scipy.linalg`/`numpy.linalg`, power/inverse iteration (hand-rolled), SVD, conjugate gradient and GMRES via `scipy.sparse.linalg`, and least-squares stability (normal equations vs. QR vs. `numpy.linalg.lstsq`).
|
|
61
|
+
- [`mathematicskit.calculus`](https://cpoli.github.io/mathematicskit/api/gallery/calculus/) -- finite-difference derivatives with Richardson extrapolation (hand-rolled), `scipy.integrate`-backed trapezoidal/Simpson/Gauss-Legendre/adaptive quadrature, forward-mode (dual numbers) and reverse-mode (backpropagation) automatic differentiation (hand-rolled), and Taylor/Maclaurin series.
|
|
62
|
+
- [`mathematicskit.ode_dynamics`](https://cpoli.github.io/mathematicskit/api/gallery/ode_dynamics/) -- Jacobian-linearization fixed-point stability (node/saddle/spiral/center), phase portraits, the logistic map's Feigenbaum route to chaos, saddle-node/pitchfork/Hopf bifurcation normal forms, the Van der Pol limit cycle, and Poincare sections of the driven Duffing oscillator.
|
|
63
|
+
- [`mathematicskit.fractals_chaos`](https://cpoli.github.io/mathematicskit/api/gallery/fractals_chaos/) -- Lyapunov exponent estimation, box-counting fractal dimension, Numba-accelerated Mandelbrot/Julia set generation, iterated function systems (Barnsley fern, Sierpinski triangle/carpet), and cellular automata (Wolfram rules, Conway's Game of Life).
|
|
64
|
+
- [`mathematicskit.optimization`](https://cpoli.github.io/mathematicskit/api/gallery/optimization/) -- gradient descent and nonlinear conjugate gradient (hand-rolled, iterate-path-exposing), Newton's method and BFGS via `scipy.optimize.minimize`, Lagrange multipliers and KKT-condition verification, a quadratic-penalty method, and linear programming via `scipy.optimize.linprog`.
|
|
65
|
+
- [`mathematicskit.probability`](https://cpoli.github.io/mathematicskit/api/gallery/probability/) -- binomial/Poisson/geometric/uniform/exponential/normal/gamma distributions via `scipy.stats` (plus mathematicskit's own MGFs), Monte Carlo integration with variance reduction (importance sampling, control variates), Law of Large Numbers/Central Limit Theorem simulation, and discrete-time Markov chains.
|
|
66
|
+
- [`mathematicskit.statistics`](https://cpoli.github.io/mathematicskit/api/gallery/statistics/) -- descriptive statistics, z/t/chi-square hypothesis tests and one-way ANOVA, confidence intervals for means/proportions/variances, OLS linear regression with residual diagnostics, and bootstrap resampling via `scipy.stats.bootstrap`.
|
|
67
|
+
- [`mathematicskit.number_theory`](https://cpoli.github.io/mathematicskit/api/gallery/number_theory/) -- the extended Euclidean algorithm and modular inverses, fast modular exponentiation, primality testing (trial division, Miller-Rabin) and prime generation, the Chinese Remainder Theorem, continued fractions and best rational approximations, Euler's totient/Mobius/divisor-sum functions, and linear/Pell Diophantine equation solvers (hand-rolled -- exact-integer number theory has no `numpy`/`scipy` equivalent).
|
|
68
|
+
- [`mathematicskit.combinatorics`](https://cpoli.github.io/mathematicskit/api/gallery/combinatorics/) -- permutation/combination counting via `scipy.special.perm`/`comb` (sequence generation via `itertools`), a hand-rolled Pascal's triangle, integer partitions and Young/Ferrers diagrams, the inclusion-exclusion principle and derangements, and Stirling/Catalan/Bell numbers (hand-rolled -- no scipy/numpy equivalent).
|
|
69
|
+
- [`mathematicskit.graph_theory`](https://cpoli.github.io/mathematicskit/api/gallery/graph_theory/) -- a lightweight own graph container (no `networkx`); shortest paths (Dijkstra/Bellman-Ford/Floyd-Warshall) and minimum spanning tree (Kruskal) via `scipy.sparse.csgraph`, with a hand-rolled Prim's kept for comparison; maximum flow/minimum cut via `scipy.sparse.csgraph.maximum_flow`; hand-rolled graph coloring (greedy, exact backtracking); and spectral graph theory (Laplacian via scipy, eigendecomposition via `numpy.linalg.eigh`).
|
|
70
|
+
- [`mathematicskit.abstract_algebra`](https://cpoli.github.io/mathematicskit/api/gallery/abstract_algebra/) -- cyclic and permutation groups with Cayley tables and group-property checks, subgroup/coset enumeration, finite field arithmetic (`GF(p)`/`GF(p^n)` via irreducible polynomials), and polynomial ring arithmetic over Z/Q/finite fields (hand-rolled throughout -- no scipy/numpy equivalent).
|
|
71
|
+
- [`mathematicskit.geometry`](https://cpoli.github.io/mathematicskit/api/gallery/geometry/) -- convex hull via `scipy.spatial.ConvexHull` (with a hand-rolled Graham scan comparison), Delaunay triangulation/Voronoi diagrams via `scipy.spatial`, hand-rolled segment intersection and point-in-polygon tests, polygon area/centroid via the shoelace formula, and curvature/arc-length/the Frenet-Serret frame for parametric curves.
|
|
72
|
+
- [`mathematicskit.special_functions`](https://cpoli.github.io/mathematicskit/api/gallery/special_functions/) -- the gamma/beta functions and Bessel functions via `scipy.special`, orthogonal polynomial families (Legendre/Chebyshev/Hermite/Laguerre) via `numpy.polynomial` with numerically-verified orthogonality, and the discrete Fourier transform via `numpy.fft` alongside a hand-rolled naive-DFT-vs-radix-2-FFT pedagogical speed comparison.
|
|
73
|
+
|
|
74
|
+
Shared infrastructure, used across the subpackages above rather than
|
|
75
|
+
standalone toolkits:
|
|
76
|
+
|
|
77
|
+
- `mathematicskit.constants` -- mathematical constants and default numerical
|
|
78
|
+
tolerances shared across subpackages.
|
|
79
|
+
- `mathematicskit.integrators` -- shared numerical ODE integrators (RK4,
|
|
80
|
+
leapfrog, Yoshida4, adaptive Dormand-Prince), used by
|
|
81
|
+
`mathematicskit.ode_dynamics`.
|
|
82
|
+
|
|
83
|
+
## Test
|
|
84
|
+
|
|
85
|
+
Tests live alongside each subpackage, at `mathematicskit/<name>/tests/`.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pytest # everything
|
|
89
|
+
pytest mathematicskit/numerical_analysis/tests # a single subpackage
|
|
90
|
+
|
|
91
|
+
# docstring examples, across every subpackage:
|
|
92
|
+
MPLBACKEND=Agg pytest --doctest-modules mathematicskit --ignore-glob="*/tests/*"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Both commands, plus `ruff check`/`ruff format --check`, run in CI on
|
|
96
|
+
every PR (`.github/workflows/ci.yml`) across Python 3.9-3.12 on Linux and
|
|
97
|
+
macOS. See [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR.
|
|
98
|
+
|
|
99
|
+
### Coverage
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
MPLBACKEND=Agg pytest -q --cov=mathematicskit --cov-report=term
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
620 tests, 96% line coverage overall. Per-subpackage coverage:
|
|
106
|
+
|
|
107
|
+
| Subpackage | Coverage | | Subpackage | Coverage |
|
|
108
|
+
|:--|--:|---|:--|--:|
|
|
109
|
+
| `abstract_algebra` | 97% | | `ode_dynamics` | 92% |
|
|
110
|
+
| `calculus` | 95% | | `optimization` | 99% |
|
|
111
|
+
| `combinatorics` | 98% | | `probability` | 98% |
|
|
112
|
+
| `fractals_chaos` | 92% | | `special_functions` | 100% |
|
|
113
|
+
| `geometry` | 100% | | `statistics` | 99% |
|
|
114
|
+
| `graph_theory` | 99% | | `integrators` | 50% |
|
|
115
|
+
| `linalg` | 95% | | `constants` | 100% |
|
|
116
|
+
| `number_theory` | 99% | | | |
|
|
117
|
+
| `numerical_analysis` | 97% | | | |
|
|
118
|
+
|
|
119
|
+
`visualizers/` modules are smoke-tested only (correct return type/shape,
|
|
120
|
+
or that `anim.save()` succeeds) rather than covered line-by-line, per the
|
|
121
|
+
testing convention in [CLAUDE.md](CLAUDE.md). `integrators` sits lower
|
|
122
|
+
because several of its fixed-step/adaptive methods aren't exercised
|
|
123
|
+
directly by its own tests, only indirectly through the two subpackages
|
|
124
|
+
(`ode_dynamics`, `fractals_chaos`) that call into it.
|
|
125
|
+
|
|
126
|
+
## Docs
|
|
127
|
+
|
|
128
|
+
Built docs are hosted at <https://cpoli.github.io/mathematicskit/>, served from
|
|
129
|
+
the `gh-pages` branch. To build locally:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
pip install -e ".[docs]"
|
|
133
|
+
cd docs && make html
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
See `docs/source/history/` for a chronology of each domain's foundational
|
|
137
|
+
results, linked to the corresponding implementation at each step.
|
|
138
|
+
|
|
139
|
+
## Citation
|
|
140
|
+
|
|
141
|
+
If you use mathematicskit in your research, please cite it — see
|
|
142
|
+
[CITATION.cff](CITATION.cff).
|
|
143
|
+
|
|
144
|
+
## Contributing
|
|
145
|
+
|
|
146
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Please note that this project
|
|
147
|
+
follows the [Contributor Covenant](CODE_OF_CONDUCT.md).
|
|
148
|
+
|
|
149
|
+
## License
|
|
150
|
+
|
|
151
|
+
MIT -- see [LICENSE](LICENSE).
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""mathematicskit: unified toolkit for computational mathematics.
|
|
2
2
|
|
|
3
3
|
Import as ``mk`` by convention::
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import mathematicskit as mk
|
|
6
6
|
mk.numerical_analysis.CubicSpline(x=[0, 1, 2], y=[0, 1, 0], boundary="natural")
|
|
7
7
|
|
|
8
8
|
Domains are added incrementally; see ``__all__`` for what's currently
|
|
9
9
|
implemented, and CHANGELOG.md for the full roadmap.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
from
|
|
12
|
+
from mathematicskit import (
|
|
13
13
|
abstract_algebra,
|
|
14
14
|
calculus,
|
|
15
15
|
combinatorics,
|
|
@@ -28,7 +28,7 @@ from mathkit import (
|
|
|
28
28
|
statistics,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
|
-
__version__ = "0.1
|
|
31
|
+
__version__ = "0.2.1"
|
|
32
32
|
|
|
33
33
|
__all__ = [
|
|
34
34
|
"abstract_algebra",
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""mathematicskit.abstract_algebra: group, ring, and field theory made computational.
|
|
2
|
+
|
|
3
|
+
Every algorithm here is hand-rolled from its textbook definition --
|
|
4
|
+
finite group/ring/field theory has no ``numpy``/``scipy`` equivalent.
|
|
5
|
+
Cyclic, permutation, dihedral, and quaternion group implementations
|
|
6
|
+
with Cayley table generation; group-property checks (order, identity,
|
|
7
|
+
inverses, abelian, cyclicity); subgroup and coset enumeration for small
|
|
8
|
+
groups; structure theory (normal subgroups and quotients, derived
|
|
9
|
+
series and solvability, Sylow subgroups, composition series); group
|
|
10
|
+
actions and Burnside orbit counting; homomorphisms and their kernels
|
|
11
|
+
and images; Reed-Solomon codes over ``GF(p)``; finite
|
|
12
|
+
field arithmetic (``GF(p)`` and ``GF(p^n)`` via irreducible polynomials
|
|
13
|
+
over ``GF(p)``); and polynomial ring arithmetic (addition,
|
|
14
|
+
multiplication, division with remainder, gcd) over :math:`\\mathbb{Z}`,
|
|
15
|
+
:math:`\\mathbb{Q}`, and finite fields.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from mathematicskit.abstract_algebra.core.base import (
|
|
19
|
+
CompositionSeriesResult,
|
|
20
|
+
FiniteGroup,
|
|
21
|
+
GroupPropertiesResult,
|
|
22
|
+
HomomorphismResult,
|
|
23
|
+
Polynomial,
|
|
24
|
+
SylowResult,
|
|
25
|
+
)
|
|
26
|
+
from mathematicskit.abstract_algebra.systems.actions import count_orbits, orbits
|
|
27
|
+
from mathematicskit.abstract_algebra.systems.codes import rs_decode_erasures, rs_encode
|
|
28
|
+
from mathematicskit.abstract_algebra.systems.finite_fields import GF, find_irreducible_polynomial, is_irreducible
|
|
29
|
+
from mathematicskit.abstract_algebra.systems.groups import CyclicGroup, DihedralGroup, PermutationGroup, QuaternionGroup, group_properties
|
|
30
|
+
from mathematicskit.abstract_algebra.systems.homomorphisms import analyze_homomorphism, homomorphism_image, homomorphism_kernel, is_homomorphism
|
|
31
|
+
from mathematicskit.abstract_algebra.systems.polynomial_ring import poly_add, poly_divmod, poly_gcd, poly_mul, poly_sub
|
|
32
|
+
from mathematicskit.abstract_algebra.systems.structure import (
|
|
33
|
+
QuotientGroup,
|
|
34
|
+
Subgroup,
|
|
35
|
+
commutator_subgroup,
|
|
36
|
+
composition_series,
|
|
37
|
+
derived_series,
|
|
38
|
+
elements_of_order,
|
|
39
|
+
generated_subgroup,
|
|
40
|
+
is_normal_subgroup,
|
|
41
|
+
is_solvable,
|
|
42
|
+
quotient_group,
|
|
43
|
+
sylow_subgroups,
|
|
44
|
+
)
|
|
45
|
+
from mathematicskit.abstract_algebra.systems.subgroups import all_subgroups, cyclic_subgroup, left_cosets
|
|
46
|
+
from mathematicskit.abstract_algebra.utils.checks import is_cyclic
|
|
47
|
+
|
|
48
|
+
__version__ = "0.1.0"
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
"__version__",
|
|
52
|
+
"FiniteGroup",
|
|
53
|
+
"GroupPropertiesResult",
|
|
54
|
+
"Polynomial",
|
|
55
|
+
"CyclicGroup",
|
|
56
|
+
"PermutationGroup",
|
|
57
|
+
"group_properties",
|
|
58
|
+
"is_cyclic",
|
|
59
|
+
"cyclic_subgroup",
|
|
60
|
+
"all_subgroups",
|
|
61
|
+
"left_cosets",
|
|
62
|
+
"GF",
|
|
63
|
+
"is_irreducible",
|
|
64
|
+
"find_irreducible_polynomial",
|
|
65
|
+
"poly_add",
|
|
66
|
+
"poly_sub",
|
|
67
|
+
"poly_mul",
|
|
68
|
+
"poly_divmod",
|
|
69
|
+
"poly_gcd",
|
|
70
|
+
"SylowResult",
|
|
71
|
+
"CompositionSeriesResult",
|
|
72
|
+
"HomomorphismResult",
|
|
73
|
+
"DihedralGroup",
|
|
74
|
+
"QuaternionGroup",
|
|
75
|
+
"Subgroup",
|
|
76
|
+
"generated_subgroup",
|
|
77
|
+
"elements_of_order",
|
|
78
|
+
"is_normal_subgroup",
|
|
79
|
+
"QuotientGroup",
|
|
80
|
+
"quotient_group",
|
|
81
|
+
"commutator_subgroup",
|
|
82
|
+
"derived_series",
|
|
83
|
+
"is_solvable",
|
|
84
|
+
"sylow_subgroups",
|
|
85
|
+
"composition_series",
|
|
86
|
+
"orbits",
|
|
87
|
+
"count_orbits",
|
|
88
|
+
"is_homomorphism",
|
|
89
|
+
"homomorphism_kernel",
|
|
90
|
+
"homomorphism_image",
|
|
91
|
+
"analyze_homomorphism",
|
|
92
|
+
"rs_encode",
|
|
93
|
+
"rs_decode_erasures",
|
|
94
|
+
]
|
{mathematicskit-0.1.0/mathkit → mathematicskit-0.2.1/mathematicskit}/abstract_algebra/core/base.py
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
r"""Abstract base class for finite groups, and a coefficient-generic
|
|
2
|
-
polynomial class, shared across
|
|
2
|
+
polynomial class, shared across mathematicskit.abstract_algebra's systems/
|
|
3
3
|
modules.
|
|
4
4
|
|
|
5
5
|
Every algorithm in this domain is hand-rolled from its textbook
|
|
@@ -17,21 +17,21 @@ from typing import Optional
|
|
|
17
17
|
|
|
18
18
|
import numpy as np
|
|
19
19
|
|
|
20
|
-
__all__ = ["FiniteGroup", "GroupPropertiesResult", "Polynomial"]
|
|
20
|
+
__all__ = ["FiniteGroup", "GroupPropertiesResult", "SylowResult", "CompositionSeriesResult", "HomomorphismResult", "Polynomial"]
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
class FiniteGroup(ABC):
|
|
24
24
|
r"""Common interface for a finite group :math:`(G, \cdot)`.
|
|
25
25
|
|
|
26
|
-
Concrete subclasses (:class:`~
|
|
27
|
-
:class:`~
|
|
26
|
+
Concrete subclasses (:class:`~mathematicskit.abstract_algebra.systems.groups.CyclicGroup`,
|
|
27
|
+
:class:`~mathematicskit.abstract_algebra.systems.groups.PermutationGroup`)
|
|
28
28
|
provide the element set and the group operation; this base class
|
|
29
29
|
derives the Cayley table, abelian check, and element orders purely
|
|
30
30
|
from those. See Dummit & Foote, *Abstract Algebra*, 3rd ed., Ch. 1.
|
|
31
31
|
|
|
32
32
|
Examples
|
|
33
33
|
--------
|
|
34
|
-
>>> from
|
|
34
|
+
>>> from mathematicskit.abstract_algebra.systems.groups import CyclicGroup
|
|
35
35
|
>>> g = CyclicGroup(4)
|
|
36
36
|
>>> g.order
|
|
37
37
|
4
|
|
@@ -124,6 +124,41 @@ class GroupPropertiesResult:
|
|
|
124
124
|
"""dict: ``{element: order}`` for every element."""
|
|
125
125
|
|
|
126
126
|
|
|
127
|
+
@dataclass
|
|
128
|
+
class SylowResult:
|
|
129
|
+
"""Container for the Sylow :math:`p`-subgroups of a finite group."""
|
|
130
|
+
|
|
131
|
+
p: int
|
|
132
|
+
sylow_order: int
|
|
133
|
+
"""int: :math:`p^k`, the largest power of ``p`` dividing :math:`|G|`."""
|
|
134
|
+
subgroups: list
|
|
135
|
+
"""list of list: Every Sylow :math:`p`-subgroup, each as a list of elements."""
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def count(self) -> int:
|
|
139
|
+
"""int: :math:`n_p`, the number of Sylow :math:`p`-subgroups."""
|
|
140
|
+
return len(self.subgroups)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
@dataclass
|
|
144
|
+
class CompositionSeriesResult:
|
|
145
|
+
"""Container for a composition series :math:`G = G_0 > G_1 > \\dots > G_m = \\{e\\}`."""
|
|
146
|
+
|
|
147
|
+
series: list
|
|
148
|
+
"""list of list: The subgroups :math:`G_0, \\dots, G_m`, largest first."""
|
|
149
|
+
factor_orders: list
|
|
150
|
+
"""list of int: The orders :math:`|G_i / G_{i+1}|` of the composition factors."""
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
@dataclass
|
|
154
|
+
class HomomorphismResult:
|
|
155
|
+
"""Container for a group homomorphism's kernel and image."""
|
|
156
|
+
|
|
157
|
+
kernel: list
|
|
158
|
+
image: list
|
|
159
|
+
is_homomorphism: bool
|
|
160
|
+
|
|
161
|
+
|
|
127
162
|
class Polynomial:
|
|
128
163
|
r"""A polynomial with coefficients over :math:`\mathbb{Q}` (``modulus=None``,
|
|
129
164
|
stored as exact :class:`fractions.Fraction`) or :math:`\mathrm{GF}(p)`
|
|
@@ -189,19 +224,29 @@ class Polynomial:
|
|
|
189
224
|
return -1
|
|
190
225
|
return len(self.coeffs) - 1
|
|
191
226
|
|
|
227
|
+
def _check_same_field(self, other: Polynomial) -> None:
|
|
228
|
+
"""Reject arithmetic between polynomials over different coefficient fields."""
|
|
229
|
+
if not isinstance(other, Polynomial):
|
|
230
|
+
raise TypeError(f"expected a Polynomial, got {type(other).__name__}")
|
|
231
|
+
if self.modulus != other.modulus:
|
|
232
|
+
raise ValueError(f"cannot combine polynomials over different fields (modulus {self.modulus} vs {other.modulus})")
|
|
233
|
+
|
|
192
234
|
def _pad(self, n: int) -> list:
|
|
193
235
|
zero = Fraction(0) if self.modulus is None else 0
|
|
194
236
|
return self.coeffs + [zero] * (n - len(self.coeffs))
|
|
195
237
|
|
|
196
238
|
def __add__(self, other: Polynomial) -> Polynomial:
|
|
239
|
+
self._check_same_field(other)
|
|
197
240
|
n = max(len(self.coeffs), len(other.coeffs))
|
|
198
241
|
return self._wrap([self._reduce(a + b) for a, b in zip(self._pad(n), other._pad(n))])
|
|
199
242
|
|
|
200
243
|
def __sub__(self, other: Polynomial) -> Polynomial:
|
|
244
|
+
self._check_same_field(other)
|
|
201
245
|
n = max(len(self.coeffs), len(other.coeffs))
|
|
202
246
|
return self._wrap([self._reduce(a - b) for a, b in zip(self._pad(n), other._pad(n))])
|
|
203
247
|
|
|
204
248
|
def __mul__(self, other: Polynomial) -> Polynomial:
|
|
249
|
+
self._check_same_field(other)
|
|
205
250
|
result = [Fraction(0) if self.modulus is None else 0] * (len(self.coeffs) + len(other.coeffs) - 1)
|
|
206
251
|
for i, a in enumerate(self.coeffs):
|
|
207
252
|
for j, b in enumerate(other.coeffs):
|
|
@@ -216,6 +261,7 @@ class Polynomial:
|
|
|
216
261
|
|
|
217
262
|
def __divmod__(self, other: Polynomial):
|
|
218
263
|
r"""Polynomial long division: ``self = quotient * other + remainder``, ``deg(remainder) < deg(other)``."""
|
|
264
|
+
self._check_same_field(other)
|
|
219
265
|
if other.degree == -1:
|
|
220
266
|
raise ZeroDivisionError("division by the zero polynomial")
|
|
221
267
|
remainder = self._wrap(list(self.coeffs))
|