passagemath-modules 10.5.46__cp310-cp310-macosx_14_0_arm64.whl → 10.6.20__cp310-cp310-macosx_14_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-modules might be problematic. Click here for more details.
- {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +49 -44
- {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +320 -314
- passagemath_modules.dylibs/libmpc.3.dylib +0 -0
- passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
- sage/algebras/clifford_algebra.py +2 -2
- sage/algebras/clifford_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/clifford_algebra_element.pyx +4 -2
- sage/algebras/exterior_algebra_groebner.cpython-310-darwin.so +0 -0
- sage/algebras/exterior_algebra_groebner.pyx +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +83 -5
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +28 -3
- sage/algebras/finite_gca.py +1 -1
- sage/algebras/lie_algebras/bgg_dual_module.py +18 -11
- sage/algebras/lie_algebras/classical_lie_algebra.py +3 -3
- sage/algebras/lie_algebras/examples.py +2 -2
- sage/algebras/lie_algebras/free_lie_algebra.py +1 -1
- sage/algebras/lie_algebras/heisenberg.py +4 -4
- sage/algebras/lie_algebras/lie_algebra.py +1 -1
- sage/algebras/lie_algebras/lie_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/lie_algebras/lie_algebra_element.pyx +63 -27
- sage/algebras/lie_algebras/quotient.py +40 -29
- sage/algebras/lie_algebras/subalgebra.py +76 -53
- sage/algebras/lie_algebras/verma_module.py +1 -3
- sage/algebras/octonion_algebra.cpython-310-darwin.so +0 -0
- sage/algebras/octonion_algebra.pyx +1 -1
- sage/algebras/orlik_solomon.py +4 -4
- sage/algebras/orlik_terao.py +4 -4
- sage/algebras/steenrod/steenrod_algebra.py +37 -30
- sage/algebras/steenrod/steenrod_algebra_bases.py +2 -2
- sage/algebras/steenrod/steenrod_algebra_misc.py +4 -4
- sage/algebras/steenrod/steenrod_algebra_mult.py +2 -2
- sage/all__sagemath_modules.py +1 -0
- sage/calculus/integration.cpython-310-darwin.so +0 -0
- sage/calculus/integration.pyx +6 -5
- sage/calculus/interpolation.cpython-310-darwin.so +0 -0
- sage/calculus/interpolators.cpython-310-darwin.so +0 -0
- sage/calculus/ode.cpython-310-darwin.so +0 -0
- sage/calculus/ode.pxd +2 -2
- sage/calculus/ode.pyx +6 -4
- sage/calculus/riemann.cpython-310-darwin.so +0 -0
- sage/calculus/riemann.pyx +68 -48
- sage/calculus/transforms/dwt.cpython-310-darwin.so +0 -0
- sage/calculus/transforms/fft.cpython-310-darwin.so +0 -0
- sage/coding/ag_code_decoders.cpython-310-darwin.so +0 -0
- sage/coding/ag_code_decoders.pyx +31 -31
- sage/coding/binary_code.cpython-310-darwin.so +0 -0
- sage/coding/binary_code.pxd +6 -6
- sage/coding/binary_code.pyx +212 -173
- sage/coding/guruswami_sudan/utils.py +3 -5
- sage/coding/kasami_codes.cpython-310-darwin.so +0 -0
- sage/coding/kasami_codes.pyx +20 -24
- sage/coding/linear_code.py +2 -2
- sage/coding/linear_code_no_metric.py +5 -5
- sage/coding/linear_rank_metric.py +81 -19
- sage/combinat/free_module.py +22 -2
- sage/combinat/root_system/ambient_space.py +1 -1
- sage/combinat/root_system/associahedron.py +4 -4
- sage/combinat/root_system/braid_move_calculator.py +1 -1
- sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
- sage/combinat/root_system/branching_rules.py +2 -2
- sage/combinat/root_system/cartan_type.py +14 -14
- sage/combinat/root_system/coxeter_group.py +2 -2
- sage/combinat/root_system/coxeter_type.py +11 -0
- sage/combinat/root_system/extended_affine_weyl_group.py +8 -8
- sage/combinat/root_system/fundamental_group.py +2 -4
- sage/combinat/root_system/hecke_algebra_representation.py +1 -1
- sage/combinat/root_system/pieri_factors.py +2 -2
- sage/combinat/root_system/root_lattice_realization_algebras.py +1 -1
- sage/combinat/root_system/root_lattice_realizations.py +1 -1
- sage/combinat/root_system/type_folded.py +3 -3
- sage/combinat/root_system/type_reducible.py +8 -7
- sage/combinat/root_system/type_super_A.py +2 -2
- sage/combinat/root_system/weight_lattice_realizations.py +9 -8
- sage/combinat/root_system/weyl_characters.py +1 -1
- sage/crypto/__init__.py +1 -0
- sage/crypto/block_cipher/des.py +1 -1
- sage/crypto/block_cipher/miniaes.py +3 -3
- sage/crypto/block_cipher/present.py +3 -3
- sage/crypto/block_cipher/sdes.py +3 -3
- sage/crypto/boolean_function.cpython-310-darwin.so +0 -0
- sage/crypto/boolean_function.pyx +22 -23
- sage/crypto/key_exchange/diffie_hellman.py +4 -9
- sage/crypto/mq/sr.py +1 -1
- sage/crypto/public_key/blum_goldwasser.py +3 -3
- sage/crypto/sbox.cpython-310-darwin.so +0 -0
- sage/crypto/sbox.pyx +1 -1
- sage/crypto/sboxes.py +22 -0
- sage/crypto/util.py +4 -6
- sage/ext/interpreters/__init__.py +1 -1
- sage/ext/interpreters/all__sagemath_modules.py +1 -1
- sage/ext/interpreters/wrapper_cc.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_cc.pxd +5 -5
- sage/ext/interpreters/wrapper_cc.pyx +1 -1
- sage/ext/interpreters/wrapper_cdf.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_cdf.pxd +5 -7
- sage/ext/interpreters/wrapper_cdf.pyx +4 -10
- sage/ext/interpreters/wrapper_rdf.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_rdf.pxd +1 -1
- sage/ext/interpreters/wrapper_rdf.pyx +1 -1
- sage/ext/interpreters/wrapper_rr.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_rr.pxd +5 -5
- sage/ext/interpreters/wrapper_rr.pyx +1 -2
- sage/geometry/toric_lattice.py +3 -3
- sage/geometry/toric_lattice_element.cpython-310-darwin.so +0 -0
- sage/groups/additive_abelian/additive_abelian_group.py +1 -1
- sage/groups/additive_abelian/qmodnz.py +4 -4
- sage/groups/matrix_gps/coxeter_group.py +17 -4
- sage/groups/matrix_gps/group_element.cpython-310-darwin.so +0 -0
- sage/groups/misc_gps/argument_groups.py +2 -2
- sage/groups/misc_gps/imaginary_groups.py +4 -4
- sage/groups/perm_gps/partn_ref/refinement_binary.cpython-310-darwin.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-310-darwin.so +0 -0
- sage/homology/chain_complex.py +0 -2
- sage/homology/hochschild_complex.py +3 -3
- sage/homology/homology_morphism.py +6 -6
- sage/homology/homology_vector_space_with_basis.py +1 -1
- sage/libs/gsl/array.cpython-310-darwin.so +0 -0
- sage/libs/mpmath/utils.cpython-310-darwin.so +0 -0
- sage/matrix/action.cpython-310-darwin.so +0 -0
- sage/matrix/args.cpython-310-darwin.so +0 -0
- sage/matrix/args.pyx +25 -10
- sage/matrix/benchmark.py +8 -4
- sage/matrix/compute_J_ideal.py +2 -2
- sage/matrix/constructor.cpython-310-darwin.so +0 -0
- sage/matrix/echelon_matrix.cpython-310-darwin.so +0 -0
- sage/matrix/echelon_matrix.pyx +1 -1
- sage/matrix/matrix0.cpython-310-darwin.so +0 -0
- sage/matrix/matrix0.pxd +3 -3
- sage/matrix/matrix0.pyx +7 -5
- sage/matrix/matrix1.cpython-310-darwin.so +0 -0
- sage/matrix/matrix1.pyx +87 -48
- sage/matrix/matrix2.cpython-310-darwin.so +0 -0
- sage/matrix/matrix2.pxd +3 -3
- sage/matrix/matrix2.pyx +758 -75
- sage/matrix/matrix_cdv.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_double_dense.pyx +1 -1
- sage/matrix/matrix_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_dense.pyx +2 -3
- sage/matrix/matrix_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_double_dense.pyx +11 -5
- sage/matrix/matrix_double_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_sparse.pyx +1 -1
- sage/matrix/matrix_laurent_mpolynomial_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_numpy_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_numpy_integer_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_polynomial_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_polynomial_dense.pyx +952 -261
- sage/matrix/matrix_real_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_sparse.pyx +2 -3
- sage/matrix/matrix_window.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_window.pyx +2 -2
- sage/matrix/misc_mpfr.cpython-310-darwin.so +0 -0
- sage/matrix/operation_table.py +0 -2
- sage/matrix/special.py +4 -0
- sage/matrix/strassen.cpython-310-darwin.so +0 -0
- sage/matrix/strassen.pyx +1 -1
- sage/matroids/basis_exchange_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/basis_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/chow_ring.py +68 -65
- sage/matroids/chow_ring_ideal.py +41 -38
- sage/matroids/circuit_closures_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/circuits_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/database_matroids.py +16 -5
- sage/matroids/dual_matroid.py +2 -2
- sage/matroids/extension.cpython-310-darwin.so +0 -0
- sage/matroids/flats_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/gammoid.py +1 -1
- sage/matroids/graphic_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/graphic_matroid.pyx +3 -3
- sage/matroids/lean_matrix.cpython-310-darwin.so +0 -0
- sage/matroids/lean_matrix.pyx +22 -22
- sage/matroids/linear_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/linear_matroid.pyx +13 -13
- sage/matroids/matroid.cpython-310-darwin.so +0 -0
- sage/matroids/matroid.pyx +15 -15
- sage/matroids/matroids_plot_helpers.py +48 -46
- sage/matroids/minor_matroid.py +2 -2
- sage/matroids/set_system.cpython-310-darwin.so +0 -0
- sage/matroids/transversal_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/transversal_matroid.pyx +3 -3
- sage/matroids/union_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/union_matroid.pyx +3 -0
- sage/matroids/unpickling.cpython-310-darwin.so +0 -0
- sage/matroids/utilities.py +2 -2
- sage/misc/c3.cpython-310-darwin.so +0 -0
- sage/misc/compat.py +1 -2
- sage/misc/pickle_old.cpython-310-darwin.so +0 -0
- sage/modules/diamond_cutting.py +117 -30
- sage/modules/fg_pid/fgp_module.py +3 -3
- sage/modules/filtered_vector_space.py +4 -4
- sage/modules/finite_submodule_iter.cpython-310-darwin.so +0 -0
- sage/modules/fp_graded/free_module.py +2 -2
- sage/modules/fp_graded/module.py +2 -2
- sage/modules/fp_graded/morphism.py +4 -4
- sage/modules/fp_graded/steenrod/morphism.py +1 -1
- sage/modules/free_module.py +144 -15
- sage/modules/free_module_element.cpython-310-darwin.so +0 -0
- sage/modules/free_module_element.pyx +4 -4
- sage/modules/free_module_integer.py +2 -2
- sage/modules/free_module_morphism.py +3 -3
- sage/modules/free_module_pseudohomspace.py +352 -0
- sage/modules/free_module_pseudomorphism.py +578 -0
- sage/modules/free_quadratic_module_integer_symmetric.py +24 -13
- sage/modules/matrix_morphism.py +9 -9
- sage/modules/multi_filtered_vector_space.py +4 -4
- sage/modules/ore_module.py +2208 -0
- sage/modules/ore_module_element.py +178 -0
- sage/modules/ore_module_homspace.py +147 -0
- sage/modules/ore_module_morphism.py +968 -0
- sage/modules/quotient_module.py +11 -1
- sage/modules/submodule.py +1 -1
- sage/modules/torsion_quadratic_module.py +1 -1
- sage/modules/vector_complex_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_sparse.pyx +4 -4
- sage/modules/vector_modn_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_modn_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_numpy_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_numpy_integer_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_dense.pyx +1 -1
- sage/modules/vector_rational_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_sparse.pyx +5 -5
- sage/modules/vector_real_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_space_morphism.py +2 -2
- sage/modules/with_basis/cell_module.py +17 -0
- sage/modules/with_basis/indexed_element.cpython-310-darwin.so +0 -0
- sage/modules/with_basis/indexed_element.pyx +1 -1
- sage/modules/with_basis/invariant.py +1 -1
- sage/modules/with_basis/representation.py +0 -1
- sage/modules/with_basis/subquotient.py +2 -2
- sage/numerical/gauss_legendre.cpython-310-darwin.so +0 -0
- sage/probability/probability_distribution.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/binary_qf.py +7 -7
- sage/quadratic_forms/bqf_class_group.py +26 -92
- sage/quadratic_forms/count_local_2.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/extras.py +1 -1
- sage/quadratic_forms/quadratic_form.py +5 -4
- sage/quadratic_forms/quadratic_form__equivalence_testing.py +7 -4
- sage/quadratic_forms/quadratic_form__evaluate.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/quadratic_form__local_field_invariants.py +10 -10
- sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +2 -2
- sage/quadratic_forms/ternary.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/ternary_qf.py +50 -83
- sage/rings/complex_conversion.cpython-310-darwin.so +0 -0
- sage/rings/complex_double.cpython-310-darwin.so +0 -0
- sage/rings/complex_double.pxd +1 -0
- sage/rings/complex_double.pyx +37 -32
- sage/rings/complex_mpc.cpython-310-darwin.so +0 -0
- sage/rings/complex_mpc.pyx +27 -23
- sage/rings/complex_mpfr.cpython-310-darwin.so +0 -0
- sage/rings/complex_mpfr.pyx +11 -9
- sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +277 -21
- sage/rings/function_field/drinfeld_modules/drinfeld_module.py +10 -1
- sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1 -1
- sage/rings/function_field/drinfeld_modules/homset.py +1 -2
- sage/rings/function_field/drinfeld_modules/morphism.py +2 -2
- sage/rings/function_field/hermite_form_polynomial.cpython-310-darwin.so +0 -0
- sage/rings/function_field/khuri_makdisi.cpython-310-darwin.so +0 -0
- sage/rings/function_field/khuri_makdisi.pyx +27 -25
- sage/rings/invariants/invariant_theory.py +61 -60
- sage/rings/invariants/reconstruction.py +8 -8
- sage/rings/polynomial/laurent_polynomial_mpair.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/ore_function_element.py +1 -1
- sage/rings/polynomial/ore_polynomial_element.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/ore_polynomial_element.pyx +8 -8
- sage/rings/polynomial/ore_polynomial_ring.py +134 -17
- sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_element.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.pyx +3 -4
- sage/rings/polynomial/skew_polynomial_finite_order.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_order.pyx +2 -5
- sage/rings/real_double_element_gsl.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfr.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfr.pyx +25 -7
- sage/rings/ring_extension.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension.pyx +4 -2
- sage/rings/ring_extension_conversion.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension_element.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension_element.pyx +42 -0
- sage/rings/ring_extension_morphism.cpython-310-darwin.so +0 -0
- sage/schemes/projective/cohomology.py +2 -2
- sage/stats/basic_stats.py +9 -6
- sage/stats/distributions/dgs_misc.h +11 -4
- sage/stats/distributions/discrete_gaussian_integer.cpython-310-darwin.so +0 -0
- sage/stats/distributions/discrete_gaussian_integer.pyx +9 -7
- sage/stats/hmm/chmm.cpython-310-darwin.so +0 -0
- sage/stats/hmm/chmm.pyx +13 -13
- sage/stats/hmm/distributions.cpython-310-darwin.so +0 -0
- sage/stats/hmm/distributions.pxd +3 -3
- sage/stats/hmm/distributions.pyx +3 -3
- sage/stats/hmm/hmm.cpython-310-darwin.so +0 -0
- sage/stats/hmm/hmm.pxd +3 -3
- sage/stats/hmm/hmm.pyx +6 -6
- sage/stats/hmm/util.cpython-310-darwin.so +0 -0
- sage/stats/hmm/util.pyx +6 -6
- sage/stats/intlist.cpython-310-darwin.so +0 -0
- sage/stats/intlist.pxd +3 -3
- sage/stats/time_series.cpython-310-darwin.so +0 -0
- sage/tensor/modules/alternating_contr_tensor.py +3 -3
- sage/tensor/modules/comp.py +3 -3
- sage/tensor/modules/ext_pow_free_module.py +3 -3
- sage/tensor/modules/format_utilities.py +3 -3
- sage/tensor/modules/free_module_linear_group.py +3 -3
- sage/tensor/modules/free_module_morphism.py +0 -1
- sage/tensor/modules/tensor_free_module.py +3 -3
- sage/tensor/modules/tensor_free_submodule.py +1 -1
- sage/tensor/modules/tensor_free_submodule_basis.py +1 -1
- sage/tensor/modules/tensor_with_indices.py +5 -5
- {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +0 -0
- {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
sage/stats/hmm/chmm.pyx
CHANGED
|
@@ -8,22 +8,22 @@ AUTHOR:
|
|
|
8
8
|
- William Stein, 2010-03
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
# ***************************************************************************
|
|
12
12
|
# Copyright (C) 2010 William Stein <wstein@gmail.com>
|
|
13
13
|
#
|
|
14
14
|
# This program is free software: you can redistribute it and/or modify
|
|
15
15
|
# it under the terms of the GNU General Public License as published by
|
|
16
16
|
# the Free Software Foundation, either version 2 of the License, or
|
|
17
17
|
# (at your option) any later version.
|
|
18
|
-
#
|
|
19
|
-
|
|
18
|
+
# https://www.gnu.org/licenses/
|
|
19
|
+
# ***************************************************************************
|
|
20
20
|
|
|
21
21
|
from cpython.object cimport PyObject_RichCompare
|
|
22
22
|
from libc.math cimport log, sqrt, exp, isnormal, isfinite, M_PI
|
|
23
23
|
cdef double sqrt2pi = sqrt(2*M_PI)
|
|
24
24
|
from cysignals.signals cimport sig_on, sig_off
|
|
25
25
|
|
|
26
|
-
from sage.misc.flatten
|
|
26
|
+
from sage.misc.flatten import flatten
|
|
27
27
|
from sage.structure.element import Matrix
|
|
28
28
|
|
|
29
29
|
from sage.stats.time_series cimport TimeSeries
|
|
@@ -331,10 +331,10 @@ cdef class GaussianHiddenMarkovModel(HiddenMarkovModel):
|
|
|
331
331
|
sage: hmm.GaussianHiddenMarkovModel([[.1,.9],[.5,.5]], [(1,.5), (-1,3)], [.1,.9]).__repr__()
|
|
332
332
|
'Gaussian Hidden Markov Model with 2 States\nTransition matrix:\n[0.1 0.9]\n[0.5 0.5]\nEmission parameters:\n[(1.0, 0.5), (-1.0, 3.0)]\nInitial probabilities: [0.1000, 0.9000]'
|
|
333
333
|
"""
|
|
334
|
-
s = "Gaussian Hidden Markov Model with %s States"%self.N
|
|
335
|
-
s += '\nTransition matrix:\n%s'%self.transition_matrix()
|
|
336
|
-
s += '\nEmission parameters:\n%s'%self.emission_parameters()
|
|
337
|
-
s += '\nInitial probabilities: %s'%self.initial_probabilities()
|
|
334
|
+
s = "Gaussian Hidden Markov Model with %s States" % self.N
|
|
335
|
+
s += '\nTransition matrix:\n%s' % self.transition_matrix()
|
|
336
|
+
s += '\nEmission parameters:\n%s' % self.emission_parameters()
|
|
337
|
+
s += '\nInitial probabilities: %s' % self.initial_probabilities()
|
|
338
338
|
return s
|
|
339
339
|
|
|
340
340
|
def generate_sequence(self, Py_ssize_t length, starting_state=None):
|
|
@@ -422,7 +422,7 @@ cdef class GaussianHiddenMarkovModel(HiddenMarkovModel):
|
|
|
422
422
|
else:
|
|
423
423
|
q = starting_state
|
|
424
424
|
if q < 0 or q>= self.N:
|
|
425
|
-
raise ValueError("starting state must be between 0 and %s"%(self.N-1))
|
|
425
|
+
raise ValueError("starting state must be between 0 and %s" % (self.N-1))
|
|
426
426
|
|
|
427
427
|
states._values[0] = q
|
|
428
428
|
obs._values[0] = self.random_sample(q, rstate)
|
|
@@ -1144,10 +1144,10 @@ cdef class GaussianMixtureHiddenMarkovModel(GaussianHiddenMarkovModel):
|
|
|
1144
1144
|
sage: hmm.GaussianMixtureHiddenMarkovModel([[.9,.1],[.4,.6]], [[(.4,(0,1)), (.6,(1,0.1))],[(1,(0,1))]], [.7,.3]).__repr__()
|
|
1145
1145
|
'Gaussian Mixture Hidden Markov Model with 2 States\nTransition matrix:\n[0.9 0.1]\n[0.4 0.6]\nEmission parameters:\n[0.4*N(0.0,1.0) + 0.6*N(1.0,0.1), 1.0*N(0.0,1.0)]\nInitial probabilities: [0.7000, 0.3000]'
|
|
1146
1146
|
"""
|
|
1147
|
-
s = "Gaussian Mixture Hidden Markov Model with %s States"%self.N
|
|
1148
|
-
s += '\nTransition matrix:\n%s'%self.transition_matrix()
|
|
1149
|
-
s += '\nEmission parameters:\n%s'%self.emission_parameters()
|
|
1150
|
-
s += '\nInitial probabilities: %s'%self.initial_probabilities()
|
|
1147
|
+
s = "Gaussian Mixture Hidden Markov Model with %s States" % self.N
|
|
1148
|
+
s += '\nTransition matrix:\n%s' % self.transition_matrix()
|
|
1149
|
+
s += '\nEmission parameters:\n%s' % self.emission_parameters()
|
|
1150
|
+
s += '\nInitial probabilities: %s' % self.initial_probabilities()
|
|
1151
1151
|
return s
|
|
1152
1152
|
|
|
1153
1153
|
def __reduce__(self):
|
|
Binary file
|
sage/stats/hmm/distributions.pxd
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-modules
|
|
2
|
-
|
|
2
|
+
# ##########################################################################
|
|
3
3
|
# Copyright (C) 2010 William Stein <wstein@gmail.com>
|
|
4
4
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
5
5
|
# The full text of the GPL is available at:
|
|
6
|
-
#
|
|
7
|
-
|
|
6
|
+
# https://www.gnu.org/licenses/
|
|
7
|
+
# ##########################################################################
|
|
8
8
|
|
|
9
9
|
from sage.stats.time_series cimport TimeSeries
|
|
10
10
|
from sage.stats.intlist cimport IntList
|
sage/stats/hmm/distributions.pyx
CHANGED
|
@@ -13,12 +13,12 @@ AUTHOR:
|
|
|
13
13
|
- William Stein, 2010-03
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
# ##########################################################################
|
|
17
17
|
# Copyright (C) 2010 William Stein <wstein@gmail.com>
|
|
18
18
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
19
19
|
# The full text of the GPL is available at:
|
|
20
|
-
#
|
|
21
|
-
|
|
20
|
+
# https://www.gnu.org/licenses/
|
|
21
|
+
# ##########################################################################
|
|
22
22
|
|
|
23
23
|
from cpython.object cimport PyObject_RichCompare
|
|
24
24
|
|
|
Binary file
|
sage/stats/hmm/hmm.pxd
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-modules
|
|
2
|
-
|
|
2
|
+
# ##########################################################################
|
|
3
3
|
# Copyright (C) 2010 William Stein <wstein@gmail.com>
|
|
4
4
|
# Distributed under the terms of the GNU General Public License (GPL) v2+.
|
|
5
5
|
# The full text of the GPL is available at:
|
|
6
|
-
#
|
|
7
|
-
|
|
6
|
+
# https://www.gnu.org/licenses/
|
|
7
|
+
# ##########################################################################
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
from sage.stats.time_series cimport TimeSeries
|
sage/stats/hmm/hmm.pyx
CHANGED
|
@@ -444,13 +444,13 @@ cdef class DiscreteHiddenMarkovModel(HiddenMarkovModel):
|
|
|
444
444
|
sage: m.__repr__()
|
|
445
445
|
'Discrete Hidden Markov Model with 2 States and 2 Emissions\nTransition matrix:\n[0.4 0.6]\n[0.1 0.9]\nEmission matrix:\n[0.1 0.9]\n[0.5 0.5]\nInitial probabilities: [0.2000, 0.8000]'
|
|
446
446
|
"""
|
|
447
|
-
s = "Discrete Hidden Markov Model with %s States and %s Emissions"%(
|
|
447
|
+
s = "Discrete Hidden Markov Model with %s States and %s Emissions" % (
|
|
448
448
|
self.N, self.n_out)
|
|
449
|
-
s += '\nTransition matrix:\n%s'%self.transition_matrix()
|
|
450
|
-
s += '\nEmission matrix:\n%s'%self.emission_matrix()
|
|
451
|
-
s += '\nInitial probabilities: %s'%self.initial_probabilities()
|
|
449
|
+
s += '\nTransition matrix:\n%s' % self.transition_matrix()
|
|
450
|
+
s += '\nEmission matrix:\n%s' % self.emission_matrix()
|
|
451
|
+
s += '\nInitial probabilities: %s' % self.initial_probabilities()
|
|
452
452
|
if self._emission_symbols is not None:
|
|
453
|
-
s += '\nEmission symbols: %s'%self._emission_symbols
|
|
453
|
+
s += '\nEmission symbols: %s' % self._emission_symbols
|
|
454
454
|
return s
|
|
455
455
|
|
|
456
456
|
def _emission_symbols_to_IntList(self, obs):
|
|
@@ -774,7 +774,7 @@ cdef class DiscreteHiddenMarkovModel(HiddenMarkovModel):
|
|
|
774
774
|
else:
|
|
775
775
|
q = starting_state
|
|
776
776
|
if q < 0 or q >= self.N:
|
|
777
|
-
raise ValueError("starting state must be between 0 and %s"%(self.N-1))
|
|
777
|
+
raise ValueError("starting state must be between 0 and %s" % (self.N-1))
|
|
778
778
|
|
|
779
779
|
states._values[0] = q
|
|
780
780
|
# Generate a symbol from state q
|
|
Binary file
|
sage/stats/hmm/util.pyx
CHANGED
|
@@ -5,19 +5,20 @@ Hidden Markov Models -- Utility functions
|
|
|
5
5
|
|
|
6
6
|
AUTHOR:
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
- William Stein, 2010-03
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
# ##########################################################################
|
|
12
12
|
# Copyright (C) 2010 William Stein <wstein@gmail.com>
|
|
13
13
|
# Distributed under the terms of the GNU General Public License (GPL) v2+.
|
|
14
14
|
# The full text of the GPL is available at:
|
|
15
|
-
#
|
|
16
|
-
|
|
15
|
+
# https://www.gnu.org/licenses/
|
|
16
|
+
# ##########################################################################
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
from sage.structure.element import Matrix
|
|
20
|
-
from sage.misc.flatten
|
|
20
|
+
from sage.misc.flatten import flatten
|
|
21
|
+
|
|
21
22
|
|
|
22
23
|
cdef class HMM_Util:
|
|
23
24
|
"""
|
|
@@ -124,7 +125,6 @@ cdef class HMM_Util:
|
|
|
124
125
|
This function is used internally by the ``__init__`` methods of
|
|
125
126
|
Hidden Markov Models to make a transition matrix from ``A``.
|
|
126
127
|
|
|
127
|
-
|
|
128
128
|
INPUT:
|
|
129
129
|
|
|
130
130
|
- ``A`` -- matrix, list, list of lists, or :class:`TimeSeries`
|
|
Binary file
|
sage/stats/intlist.pxd
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-modules
|
|
2
|
-
|
|
2
|
+
# ##########################################################################
|
|
3
3
|
# Copyright (C) 2010 William Stein <wstein@gmail.com>
|
|
4
4
|
# Distributed under the terms of the GNU General Public License (GPL) v2+.
|
|
5
5
|
# The full text of the GPL is available at:
|
|
6
|
-
#
|
|
7
|
-
|
|
6
|
+
# https://www.gnu.org/licenses/
|
|
7
|
+
# ##########################################################################
|
|
8
8
|
|
|
9
9
|
cdef class IntList:
|
|
10
10
|
cdef int* _values
|
|
Binary file
|
|
@@ -28,14 +28,14 @@ REFERENCES:
|
|
|
28
28
|
- Chap. 23 of R. Godement : *Algebra* [God1968]_
|
|
29
29
|
- Chap. 15 of S. Lang : *Algebra* [Lan2002]_
|
|
30
30
|
"""
|
|
31
|
-
|
|
31
|
+
# ****************************************************************************
|
|
32
32
|
# Copyright (C) 2017 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
33
33
|
#
|
|
34
34
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
35
35
|
# as published by the Free Software Foundation; either version 2 of
|
|
36
36
|
# the License, or (at your option) any later version.
|
|
37
|
-
#
|
|
38
|
-
|
|
37
|
+
# https://www.gnu.org/licenses/
|
|
38
|
+
# ****************************************************************************
|
|
39
39
|
|
|
40
40
|
from sage.tensor.modules.free_module_tensor import FreeModuleTensor
|
|
41
41
|
from sage.tensor.modules.comp import Components, CompFullyAntiSym
|
sage/tensor/modules/comp.py
CHANGED
|
@@ -233,7 +233,7 @@ In case of symmetries, only non-redundant components are stored::
|
|
|
233
233
|
{(0, 1): 3}
|
|
234
234
|
"""
|
|
235
235
|
|
|
236
|
-
#
|
|
236
|
+
# ****************************************************************************
|
|
237
237
|
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
238
238
|
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
|
|
239
239
|
# Copyright (C) 2015 Marco Mancini <marco.mancini@obspm.fr>
|
|
@@ -241,8 +241,8 @@ In case of symmetries, only non-redundant components are stored::
|
|
|
241
241
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
242
242
|
# as published by the Free Software Foundation; either version 2 of
|
|
243
243
|
# the License, or (at your option) any later version.
|
|
244
|
-
#
|
|
245
|
-
|
|
244
|
+
# https://www.gnu.org/licenses/
|
|
245
|
+
# ****************************************************************************
|
|
246
246
|
|
|
247
247
|
from sage.structure.sage_object import SageObject
|
|
248
248
|
from sage.rings.integer import Integer
|
|
@@ -46,14 +46,14 @@ REFERENCES:
|
|
|
46
46
|
- \K. Conrad: *Exterior powers* [Con2013]_
|
|
47
47
|
- Chap. 19 of S. Lang: *Algebra* [Lan2002]_
|
|
48
48
|
"""
|
|
49
|
-
|
|
49
|
+
# ****************************************************************************
|
|
50
50
|
# Copyright (C) 2017 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
51
51
|
#
|
|
52
52
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
53
53
|
# as published by the Free Software Foundation; either version 2 of
|
|
54
54
|
# the License, or (at your option) any later version.
|
|
55
|
-
#
|
|
56
|
-
|
|
55
|
+
# https://www.gnu.org/licenses/
|
|
56
|
+
# ****************************************************************************
|
|
57
57
|
|
|
58
58
|
from sage.misc.cachefunc import cached_method
|
|
59
59
|
from sage.rings.integer import Integer
|
|
@@ -11,15 +11,15 @@ AUTHORS:
|
|
|
11
11
|
- Michael Jung (2020): extended usage of :func:`is_atomic()`
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
# ****************************************************************************
|
|
15
15
|
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
16
16
|
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
|
|
17
17
|
#
|
|
18
18
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
19
19
|
# as published by the Free Software Foundation; either version 2 of
|
|
20
20
|
# the License, or (at your option) any later version.
|
|
21
|
-
#
|
|
22
|
-
|
|
21
|
+
# https://www.gnu.org/licenses/
|
|
22
|
+
# ****************************************************************************
|
|
23
23
|
from __future__ import annotations
|
|
24
24
|
|
|
25
25
|
from typing import TYPE_CHECKING
|
|
@@ -20,14 +20,14 @@ REFERENCES:
|
|
|
20
20
|
|
|
21
21
|
- Chap. 15 of R. Godement : *Algebra* [God1968]_
|
|
22
22
|
"""
|
|
23
|
-
|
|
23
|
+
# ****************************************************************************
|
|
24
24
|
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
25
25
|
#
|
|
26
26
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
27
27
|
# as published by the Free Software Foundation; either version 2 of
|
|
28
28
|
# the License, or (at your option) any later version.
|
|
29
|
-
#
|
|
30
|
-
|
|
29
|
+
# https://www.gnu.org/licenses/
|
|
30
|
+
# ****************************************************************************
|
|
31
31
|
|
|
32
32
|
from sage.misc.cachefunc import cached_method
|
|
33
33
|
from sage.structure.unique_representation import UniqueRepresentation
|
|
@@ -1359,7 +1359,6 @@ class FiniteRankFreeModuleEndomorphism(FiniteRankFreeModuleMorphism):
|
|
|
1359
1359
|
sage: latex(phi)
|
|
1360
1360
|
\mathrm{Id}
|
|
1361
1361
|
"""
|
|
1362
|
-
from sage.matrix.special import identity_matrix
|
|
1363
1362
|
from sage.misc.constant_function import ConstantFunction
|
|
1364
1363
|
|
|
1365
1364
|
fmodule = parent.domain()
|
|
@@ -48,15 +48,15 @@ REFERENCES:
|
|
|
48
48
|
- Chap. 21 (Exer. 4) of R. Godement: *Algebra* [God1968]_
|
|
49
49
|
- Chap. 16 of S. Lang: *Algebra* [Lan2002]_
|
|
50
50
|
"""
|
|
51
|
-
|
|
51
|
+
# ****************************************************************************
|
|
52
52
|
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
53
53
|
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
|
|
54
54
|
#
|
|
55
55
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
56
56
|
# as published by the Free Software Foundation; either version 2 of
|
|
57
57
|
# the License, or (at your option) any later version.
|
|
58
|
-
#
|
|
59
|
-
|
|
58
|
+
# https://www.gnu.org/licenses/
|
|
59
|
+
# ****************************************************************************
|
|
60
60
|
|
|
61
61
|
from sage.categories.modules import Modules
|
|
62
62
|
from sage.misc.cachefunc import cached_method
|
|
@@ -13,7 +13,7 @@ AUTHORS:
|
|
|
13
13
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
14
14
|
# as published by the Free Software Foundation; either version 2 of
|
|
15
15
|
# the License, or (at your option) any later version.
|
|
16
|
-
#
|
|
16
|
+
# https://www.gnu.org/licenses/
|
|
17
17
|
# ******************************************************************************
|
|
18
18
|
|
|
19
19
|
import itertools
|
|
@@ -13,7 +13,7 @@ AUTHORS:
|
|
|
13
13
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
14
14
|
# as published by the Free Software Foundation; either version 2 of
|
|
15
15
|
# the License, or (at your option) any later version.
|
|
16
|
-
#
|
|
16
|
+
# https://www.gnu.org/licenses/
|
|
17
17
|
# ******************************************************************************
|
|
18
18
|
|
|
19
19
|
from sage.tensor.modules.free_module_basis import Basis_abstract
|
|
@@ -8,19 +8,19 @@ AUTHORS:
|
|
|
8
8
|
- Eric Gourgoulhon, Michal Bejger (2014-2015): initial version
|
|
9
9
|
- Léo Brunswic (2019): add multiple symmetries and multiple contractions
|
|
10
10
|
"""
|
|
11
|
-
|
|
11
|
+
# ****************************************************************************
|
|
12
12
|
# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
13
13
|
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
|
|
14
14
|
#
|
|
15
15
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
16
16
|
# as published by the Free Software Foundation; either version 2 of
|
|
17
17
|
# the License, or (at your option) any later version.
|
|
18
|
-
#
|
|
19
|
-
|
|
18
|
+
# https://www.gnu.org/licenses/
|
|
19
|
+
# ****************************************************************************
|
|
20
|
+
from itertools import combinations
|
|
21
|
+
import re
|
|
20
22
|
|
|
21
23
|
from sage.structure.sage_object import SageObject
|
|
22
|
-
import re
|
|
23
|
-
from itertools import combinations
|
|
24
24
|
|
|
25
25
|
# Regular expression for the allowed characters in index notation.
|
|
26
26
|
# This includes Unicode word constituents but excludes digits and underscores.
|
|
File without changes
|
{passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt
RENAMED
|
File without changes
|