From 5adb22a7350e9c23f617a8cc0ddd0a27d01fc0db Mon Sep 17 00:00:00 2001 From: gmou3 Date: Sun, 16 Jun 2024 16:24:17 +0300 Subject: [PATCH] Docstring edits Remove redundant spaces, indefinite articles, and trailing dots. Up to `combinat`. --- .../algebras/affine_nil_temperley_lieb.py | 2 +- src/sage/algebras/cluster_algebra.py | 11 +- src/sage/algebras/fusion_rings/fusion_ring.py | 4 +- src/sage/algebras/lie_algebras/examples.py | 2 +- .../abelian_lie_conformal_algebra.py | 2 +- ..._conformal_algebra_with_structure_coefs.py | 2 +- src/sage/algebras/nil_coxeter_algebra.py | 2 +- src/sage/algebras/schur_algebra.py | 6 +- src/sage/arith/misc.py | 39 +++-- src/sage/calculus/functional.py | 10 +- src/sage/categories/bialgebras_with_basis.py | 2 +- src/sage/categories/commutative_rings.py | 2 +- ...aded_connected_hopf_algebras_with_basis.py | 2 +- src/sage/categories/finite_coxeter_groups.py | 2 +- .../categories/finite_permutation_groups.py | 2 +- src/sage/categories/modules_with_basis.py | 2 +- src/sage/categories/monoids.py | 4 +- src/sage/categories/semigroups.py | 2 +- src/sage/categories/weyl_groups.py | 2 +- src/sage/coding/binary_code.pyx | 2 +- src/sage/coding/code_constructions.py | 6 +- src/sage/coding/databases.py | 6 +- src/sage/coding/delsarte_bounds.py | 4 +- src/sage/combinat/binary_tree.py | 9 +- src/sage/combinat/chas/fsym.py | 2 +- .../cluster_algebra_quiver/mutation_class.py | 2 +- src/sage/combinat/core.py | 6 +- .../combinat/crystals/kirillov_reshetikhin.py | 2 +- .../combinat/designs/difference_family.py | 2 +- .../designs/evenly_distributed_sets.pyx | 2 +- src/sage/combinat/dlx.py | 7 +- src/sage/combinat/integer_lists/base.pyx | 4 +- src/sage/combinat/integer_lists/invlex.pyx | 20 +-- src/sage/combinat/k_tableau.py | 4 +- src/sage/combinat/matrices/hadamard_matrix.py | 4 +- src/sage/combinat/matrices/latin.py | 48 +++--- src/sage/combinat/ncsf_qsym/combinatorics.py | 8 +- .../combinat/ncsf_qsym/generic_basis_code.py | 4 +- src/sage/combinat/ncsf_qsym/ncsf.py | 80 ++++----- src/sage/combinat/ncsf_qsym/qsym.py | 2 +- src/sage/combinat/ncsym/bases.py | 18 +-- src/sage/combinat/ncsym/dual.py | 6 +- src/sage/combinat/ncsym/ncsym.py | 48 +++--- .../combinat/path_tableaux/path_tableau.py | 4 +- src/sage/combinat/posets/cartesian_product.py | 7 +- src/sage/combinat/posets/hasse_diagram.py | 10 +- src/sage/combinat/posets/lattices.py | 14 +- src/sage/combinat/posets/linear_extensions.py | 2 +- src/sage/combinat/posets/poset_examples.py | 12 +- src/sage/combinat/posets/posets.py | 27 ++-- src/sage/combinat/ranker.py | 2 +- src/sage/combinat/ribbon_tableau.py | 26 +-- .../rigged_configurations/kr_tableaux.py | 8 +- .../combinat/root_system/branching_rules.py | 10 +- src/sage/combinat/root_system/cartan_type.py | 4 +- .../root_system/extended_affine_weyl_group.py | 4 +- .../hecke_algebra_representation.py | 2 +- .../root_system/integrable_representations.py | 8 +- .../non_symmetric_macdonald_polynomials.py | 4 +- .../combinat/root_system/pieri_factors.py | 2 +- src/sage/combinat/root_system/plot.py | 3 +- .../root_system/reflection_group_complex.py | 2 +- .../root_system/root_lattice_realizations.py | 2 +- src/sage/combinat/root_system/root_system.py | 4 +- .../combinat/root_system/weyl_characters.py | 22 +-- src/sage/combinat/sf/character.py | 2 +- src/sage/combinat/sf/dual.py | 2 +- src/sage/combinat/sf/elementary.py | 14 +- src/sage/combinat/sf/hall_littlewood.py | 8 +- src/sage/combinat/sf/hecke.py | 4 +- src/sage/combinat/sf/homogeneous.py | 4 +- src/sage/combinat/sf/jack.py | 4 +- src/sage/combinat/sf/k_dual.py | 4 +- src/sage/combinat/sf/kfpoly.py | 2 +- src/sage/combinat/sf/llt.py | 4 +- src/sage/combinat/sf/macdonald.py | 11 +- src/sage/combinat/sf/monomial.py | 2 +- src/sage/combinat/sf/new_kschur.py | 6 +- src/sage/combinat/sf/orthotriang.py | 2 +- src/sage/combinat/sf/powersum.py | 16 +- src/sage/combinat/sf/schur.py | 8 +- src/sage/combinat/sf/sf.py | 8 +- src/sage/combinat/sf/sfa.py | 139 ++++++++-------- src/sage/combinat/sf/witt.py | 2 +- .../combinat/species/composition_species.py | 2 +- .../combinat/species/partition_species.py | 2 +- src/sage/combinat/species/product_species.py | 2 +- src/sage/combinat/species/species.py | 17 +- src/sage/combinat/species/structure.py | 4 +- src/sage/combinat/symmetric_group_algebra.py | 12 +- src/sage/combinat/tableau.py | 12 +- src/sage/combinat/tiling.py | 6 +- src/sage/combinat/words/abstract_word.py | 70 ++++---- src/sage/combinat/words/finite_word.py | 54 +++---- src/sage/combinat/words/morphic.py | 2 +- src/sage/combinat/words/morphism.py | 65 ++++---- src/sage/combinat/words/paths.py | 2 +- src/sage/combinat/words/suffix_trees.py | 31 ++-- src/sage/combinat/words/word.py | 50 +++--- src/sage/combinat/words/word_char.pyx | 2 +- src/sage/combinat/words/word_datatypes.pyx | 34 ++-- src/sage/combinat/words/word_generators.py | 73 +++++---- .../combinat/words/word_infinite_datatypes.py | 16 +- src/sage/combinat/words/word_options.py | 20 +-- src/sage/combinat/words/words.py | 152 +++++++++--------- src/sage/combinat/yang_baxter_graph.py | 4 +- 106 files changed, 705 insertions(+), 744 deletions(-) diff --git a/src/sage/algebras/affine_nil_temperley_lieb.py b/src/sage/algebras/affine_nil_temperley_lieb.py index f71417c6093..5ac6d4b1d3c 100644 --- a/src/sage/algebras/affine_nil_temperley_lieb.py +++ b/src/sage/algebras/affine_nil_temperley_lieb.py @@ -23,7 +23,7 @@ class AffineNilTemperleyLiebTypeA(CombinatorialFreeModule): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer The affine nilTemperley Lieb algebra is generated by `a_i` for `i=0,1,\ldots,n-1` subject to the relations `a_i a_i = a_i a_{i+1} a_i = a_{i+1} a_i a_{i+1} = 0` and diff --git a/src/sage/algebras/cluster_algebra.py b/src/sage/algebras/cluster_algebra.py index ceedb3dede8..7cf63e055d6 100644 --- a/src/sage/algebras/cluster_algebra.py +++ b/src/sage/algebras/cluster_algebra.py @@ -1991,12 +1991,13 @@ def F_polynomial(self, g_vector): def find_g_vector(self, g_vector, depth=infinity): r""" - Return a mutation sequence to obtain a seed containing the g-vector ``g_vector`` from the initial seed. + Return a mutation sequence to obtain a seed containing the g-vector + ``g_vector`` from the initial seed. INPUT: - ``g_vector`` -- tuple; the g-vector to find - - ``depth`` -- a positive integer or infinity (default: ``infinity``); + - ``depth`` -- positive integer or infinity (default: ``infinity``); the maximum distance from ``self.current_seed`` to reach OUTPUT: @@ -2222,7 +2223,7 @@ def seeds(self, **kwargs): - ``allowed_directions`` -- iterable of integers (default: ``range(self.rank())``); the directions in which to mutate - - ``depth`` -- a positive integer or infinity (default: ``infinity``); + - ``depth`` -- positive integer or infinity (default: ``infinity``); the maximum depth at which to stop searching - ``catch_KeyboardInterrupt`` -- boolean (default: ``False``); whether to @@ -2344,7 +2345,7 @@ def explore_to_depth(self, depth): INPUT: - - ``depth`` -- a positive integer or infinity; the maximum depth + - ``depth`` -- positive integer or infinity; the maximum depth at which to stop searching EXAMPLES:: @@ -2371,7 +2372,7 @@ def cluster_fan(self, depth=infinity): INPUT: - - ``depth`` -- a positive integer or infinity (default: ``infinity``); + - ``depth`` -- positive integer or infinity (default: ``infinity``); the maximum depth at which to compute EXAMPLES:: diff --git a/src/sage/algebras/fusion_rings/fusion_ring.py b/src/sage/algebras/fusion_rings/fusion_ring.py index ed156784d47..3ec5e7482d6 100644 --- a/src/sage/algebras/fusion_rings/fusion_ring.py +++ b/src/sage/algebras/fusion_rings/fusion_ring.py @@ -39,7 +39,7 @@ class FusionRing(WeylCharacterRing): INPUT: - ``ct`` -- the Cartan type of a simple (finite-dimensional) Lie algebra - - ``k`` -- a nonnegative integer + - ``k`` -- nonnegative integer - ``conjugate`` -- (default: ``False``) set ``True`` to obtain the complex conjugate ring - ``cyclotomic_order`` -- (default: computed depending on ``ct`` and ``k``) @@ -1276,7 +1276,7 @@ def get_braid_generators(self, - ``fusing_anyon`` -- a basis element of ``self`` - ``total_charge_anyon`` -- a basis element of ``self`` - - ``n_strands`` -- a positive integer greater than 2 + - ``n_strands`` -- positive integer greater than 2 - ``checkpoint`` -- boolean (default: ``False``); whether the F-matrix solver should pickle checkpoints - ``save_results`` -- (optional) a string indicating the name of diff --git a/src/sage/algebras/lie_algebras/examples.py b/src/sage/algebras/lie_algebras/examples.py index 2679b72dc97..f2db23d445b 100644 --- a/src/sage/algebras/lie_algebras/examples.py +++ b/src/sage/algebras/lie_algebras/examples.py @@ -323,7 +323,7 @@ def pwitt(R, p): INPUT: - ``R`` -- the base ring - - ``p`` -- a positive integer that is `0` in ``R`` + - ``p`` -- positive integer that is `0` in `R` EXAMPLES:: diff --git a/src/sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py index 7eae7c226b4..50d359092b8 100644 --- a/src/sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py @@ -33,7 +33,7 @@ class AbelianLieConformalAlgebra(GradedLieConformalAlgebra): - ``R`` -- a commutative ring; the base ring of this Lie conformal algebra - - ``ngens`` -- a positive integer (default: `1`); the number + - ``ngens`` -- positive integer (default: `1`); the number of generators of this Lie conformal algebra - ``weights`` -- list of positive rational numbers (default: `1` for each generator); the weights of the generators. The resulting diff --git a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py index 9c731e0b990..24b355bd4cd 100644 --- a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py +++ b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py @@ -79,7 +79,7 @@ class LieConformalAlgebraWithStructureCoefficients( list. - ``parity`` -- tuple of `0` or `1` (default: tuple of `0`); - a tuple specifying the parity of each non-central generator + a tuple specifying the parity of each non-central generator EXAMPLES: diff --git a/src/sage/algebras/nil_coxeter_algebra.py b/src/sage/algebras/nil_coxeter_algebra.py index 6e33f08605c..68ad7b3bdae 100644 --- a/src/sage/algebras/nil_coxeter_algebra.py +++ b/src/sage/algebras/nil_coxeter_algebra.py @@ -84,7 +84,7 @@ def homogeneous_generator_noncommutative_variables(self, r): INPUT: - - ``r`` -- a positive integer at most the rank of the Weyl group + - ``r`` -- positive integer at most the rank of the Weyl group EXAMPLES:: diff --git a/src/sage/algebras/schur_algebra.py b/src/sage/algebras/schur_algebra.py index accd69853cb..c141cc04167 100644 --- a/src/sage/algebras/schur_algebra.py +++ b/src/sage/algebras/schur_algebra.py @@ -541,13 +541,11 @@ def GL_irreducible_character(n, mu, KK): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer - ``mu`` -- a partition of at most ``n`` parts - ``KK`` -- a field - OUTPUT: - - a symmetric function which should be interpreted in ``n`` + OUTPUT: a symmetric function which should be interpreted in ``n`` variables to be meaningful as a character EXAMPLES: diff --git a/src/sage/arith/misc.py b/src/sage/arith/misc.py index 6f671eb57a1..ec34d553b41 100644 --- a/src/sage/arith/misc.py +++ b/src/sage/arith/misc.py @@ -967,7 +967,7 @@ def eratosthenes(n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: list of primes less than or equal to `n` @@ -2459,9 +2459,9 @@ def trial_division(n, bound=None): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer - - ``bound`` -- (optional) a positive integer + - ``bound`` -- (optional) positive integer OUTPUT: a prime ``p=bound`` that divides `n`, or `n` if there is no such prime @@ -2523,12 +2523,12 @@ def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds): INPUT: - - ``n`` -- a nonzero integer + - ``n`` -- nonzero integer - ``proof`` -- boolean or ``None`` (default: ``None``) - ``int_`` -- boolean (default: ``False``); whether to return - answers as Python integers + answers as Python integers - ``algorithm`` -- string @@ -2540,8 +2540,8 @@ def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds): - ``'magma'`` -- use Magma (requires magma be installed) - ``verbose`` -- integer (default: 0); PARI's debug - variable is set to this; e.g., set to 4 or 8 to see lots of output - during factorization. + variable is set to this. E.g., set to 4 or 8 to see lots of output + during factorization. OUTPUT: factorization of `n` @@ -3116,8 +3116,7 @@ def plot(self, xmin=1, xmax=50, pointsize=30, rgbcolor=(0, 0, 1), - ``rgbcolor`` -- default: (0,0,1) - - ``join`` -- boolean (default: ``True``); whether to join the - points + - ``join`` -- boolean (default: ``True``); whether to join the points - ``**kwds`` -- passed on @@ -3150,7 +3149,7 @@ def carmichael_lambda(n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: the Carmichael function of ``n`` @@ -3538,7 +3537,7 @@ def CRT_basis(moduli): INPUT: - ``moduli`` -- list of pairwise coprime moduli `m` which admit an - extended Euclidean algorithm + extended Euclidean algorithm OUTPUT: @@ -3588,7 +3587,7 @@ def CRT_vectors(X, moduli): INPUT: - ``X`` -- list or tuple, consisting of lists/tuples/vectors/etc of - integers of the same length + integers of the same length - ``moduli`` -- list of len(X) moduli OUTPUT: ``list`` -- application of CRT componentwise @@ -3633,7 +3632,7 @@ def binomial(x, m, **kwds): INPUT: - ``x``, ``m`` -- numbers or symbolic expressions; either ``m`` - or ``x-m`` must be an integer + or ``x-m`` must be an integer OUTPUT: number or symbolic expression (if input is symbolic) @@ -4268,7 +4267,7 @@ def primitive_root(n, check=True): INPUT: - - ``n`` -- a nonzero integer + - ``n`` -- nonzero integer - ``check`` -- boolean (default: ``True``); if ``False``, then `n` is assumed to be a positive integer possessing a primitive root, and behavior is undefined otherwise. @@ -4384,7 +4383,7 @@ def nth_prime(n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: the `n`-th prime number @@ -4727,7 +4726,7 @@ def number_of_divisors(n): INPUT: - - ``n`` -- a nonzero integer + - ``n`` -- nonzero integer OUTPUT: integer; the number of divisors of `n` @@ -4765,7 +4764,7 @@ def hilbert_symbol(a, b, p, algorithm='pari'): - ``a``, ``b`` -- integers - ``p`` -- integer; either prime or -1 (which - represents the archimedean place) + represents the archimedean place) - ``algorithm`` -- string @@ -5243,7 +5242,7 @@ def integer_floor(x): INPUT: - ``x`` -- an object that has a floor method or is - coercible to integer + coercible to integer OUTPUT: integer @@ -5650,7 +5649,7 @@ def sum_of_k_squares(k, n): INPUT: - - ``k`` -- a nonnegative integer + - ``k`` -- nonnegative integer - ``n`` -- integer @@ -6289,7 +6288,7 @@ def dedekind_psi(N): INPUT: - - ``N`` -- a positive integer + - ``N`` -- positive integer OUTPUT: integer diff --git a/src/sage/calculus/functional.py b/src/sage/calculus/functional.py index 4468348ce7b..fc8e7a1954c 100644 --- a/src/sage/calculus/functional.py +++ b/src/sage/calculus/functional.py @@ -336,13 +336,13 @@ def limit(f, dir=None, taylor=False, **argv): INPUT: - ``dir`` -- (default: ``None``); dir may have the value - 'plus' (or 'above') for a limit from above, 'minus' (or 'below') - for a limit from below, or may be omitted (implying a two-sided - limit is to be computed). + 'plus' (or 'above') for a limit from above, 'minus' (or 'below') + for a limit from below, or may be omitted (implying a two-sided + limit is to be computed). - ``taylor`` -- (default: ``False``); if ``True``, use Taylor - series, which allows more limits to be computed (but may also - crash in some obscure cases due to bugs in Maxima). + series, which allows more limits to be computed (but may also + crash in some obscure cases due to bugs in Maxima). - ``\*\*argv`` -- 1 named parameter diff --git a/src/sage/categories/bialgebras_with_basis.py b/src/sage/categories/bialgebras_with_basis.py index 725bf5cf3a6..10e829fd7fb 100644 --- a/src/sage/categories/bialgebras_with_basis.py +++ b/src/sage/categories/bialgebras_with_basis.py @@ -156,7 +156,7 @@ def convolution_power_of_id(self, n): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer OUTPUT: the image of ``self`` under the convolution power `\mathrm{Id}^{*n}` diff --git a/src/sage/categories/commutative_rings.py b/src/sage/categories/commutative_rings.py index 88101c12213..6c47efacfe0 100644 --- a/src/sage/categories/commutative_rings.py +++ b/src/sage/categories/commutative_rings.py @@ -274,7 +274,7 @@ def frobenius_endomorphism(self, n=1): INPUT: - - ``n`` -- a nonnegative integer (default: 1) + - ``n`` -- nonnegative integer (default: 1) OUTPUT: diff --git a/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py b/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py index 8bf69ae39cc..ae91a374489 100644 --- a/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py +++ b/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py @@ -133,7 +133,7 @@ def coproduct_on_basis(self, i): INPUT: - - ``i`` -- a nonnegative integer + - ``i`` -- nonnegative integer OUTPUT: an element of the tensor square of ``self`` diff --git a/src/sage/categories/finite_coxeter_groups.py b/src/sage/categories/finite_coxeter_groups.py index c86b4a97de8..406a807e50d 100644 --- a/src/sage/categories/finite_coxeter_groups.py +++ b/src/sage/categories/finite_coxeter_groups.py @@ -554,7 +554,7 @@ def m_cambrian_lattice(self, c, m=1, on_roots=False): - ``c`` -- a Coxeter element of ``self`` (as a tuple, or as an element of ``self``) - - ``m`` -- a positive integer (default: 1) + - ``m`` -- positive integer (default: 1) - ``on_roots`` -- boolean (default: ``False``); if ``on_roots`` is ``True``, the lattice is realized on diff --git a/src/sage/categories/finite_permutation_groups.py b/src/sage/categories/finite_permutation_groups.py index 002e1a09180..d4f56c5c62e 100644 --- a/src/sage/categories/finite_permutation_groups.py +++ b/src/sage/categories/finite_permutation_groups.py @@ -294,7 +294,7 @@ def profile(self, n, using_polya=True): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``using_polya`` -- boolean (default: ``True``); if ``True``, the computation uses PĆ³lya enumeration (and all values of the profile diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index cbd71af6581..df9f2efb158 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -263,7 +263,7 @@ def module_morphism(self, on_basis=None, matrix=None, function=None, can be used (with care) to define affine maps. Only meaningful with ``on_basis``. - - ``position`` -- a nonnegative integer specifying which + - ``position`` -- nonnegative integer specifying which positional argument is used as the input of the function `f` (default: 0); this is currently only used with ``on_basis``. diff --git a/src/sage/categories/monoids.py b/src/sage/categories/monoids.py index 612a53833e0..25ad02ecc18 100644 --- a/src/sage/categories/monoids.py +++ b/src/sage/categories/monoids.py @@ -296,7 +296,7 @@ def _pow_int(self, n): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer EXAMPLES:: @@ -312,7 +312,7 @@ def _pow_naive(self, n): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer This naive implementation does not use binary exponentiation; there are cases where this is actually diff --git a/src/sage/categories/semigroups.py b/src/sage/categories/semigroups.py index 50f5854be18..92ae29211ad 100644 --- a/src/sage/categories/semigroups.py +++ b/src/sage/categories/semigroups.py @@ -533,7 +533,7 @@ def _pow_int(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer EXAMPLES:: diff --git a/src/sage/categories/weyl_groups.py b/src/sage/categories/weyl_groups.py index 9f21056ed96..f3f1ee86927 100644 --- a/src/sage/categories/weyl_groups.py +++ b/src/sage/categories/weyl_groups.py @@ -440,7 +440,7 @@ def stanley_symmetric_function_as_polynomial(self, max_length=None): INPUT: - ``self`` -- an element `w` of a Weyl group `W` - - ``max_length`` -- a nonnegative integer or infinity (default: infinity) + - ``max_length`` -- nonnegative integer or infinity (default: infinity) Returns the generating series for the Pieri factorizations `w = u_1 \cdots u_k`, where `u_i` is a Pieri factor for diff --git a/src/sage/coding/binary_code.pyx b/src/sage/coding/binary_code.pyx index ab60922b9bc..3afb36de478 100644 --- a/src/sage/coding/binary_code.pyx +++ b/src/sage/coding/binary_code.pyx @@ -3145,7 +3145,7 @@ cdef class BinaryCodeClassifier: INPUT: - ``CC`` -- a BinaryCode object - - ``verbosity`` -- a nonnegative integer + - ``verbosity`` -- nonnegative integer OUTPUT: a tuple, (gens, labeling, size, base) diff --git a/src/sage/coding/code_constructions.py b/src/sage/coding/code_constructions.py index a4bdd93d27d..8a182218a1d 100644 --- a/src/sage/coding/code_constructions.py +++ b/src/sage/coding/code_constructions.py @@ -441,7 +441,7 @@ def ExtendedQuadraticResidueCode(n,F): - ``n`` -- an odd prime - ``F`` -- a finite prime field whose order must be a - quadratic residue modulo `n` + quadratic residue modulo `n` OUTPUT: an extended quadratic residue code @@ -508,7 +508,7 @@ def QuadraticResidueCode(n,F): - ``n`` -- an odd prime - ``F`` -- a finite prime field whose order must be a - quadratic residue modulo `n` + quadratic residue modulo `n` OUTPUT: a quadratic residue code @@ -711,7 +711,7 @@ def ToricCode(P,F): INPUT: - ``P`` -- all the integer lattice points in a polytope - defining the toric variety + defining the toric variety - ``F`` -- a finite field diff --git a/src/sage/coding/databases.py b/src/sage/coding/databases.py index 730c891bec7..283cdcd4eb9 100644 --- a/src/sage/coding/databases.py +++ b/src/sage/coding/databases.py @@ -194,9 +194,9 @@ def self_orthogonal_binary_codes(n, k, b=2, parent=None, BC=None, equal=False, - ``k`` -- integer; maximal dimension - ``b`` -- integer; requires that the generators all have weight divisible - by ``b`` (if ``b=2``, all self-orthogonal codes are generated, and if - ``b=4``, all doubly even codes are generated). Must be an even positive - integer. + by ``b`` (if ``b=2``, all self-orthogonal codes are generated, and if + ``b=4``, all doubly even codes are generated). Must be an even positive + integer. - ``parent`` -- used in recursion (default: ``None``) diff --git a/src/sage/coding/delsarte_bounds.py b/src/sage/coding/delsarte_bounds.py index 87032754b62..82a5e15083c 100644 --- a/src/sage/coding/delsarte_bounds.py +++ b/src/sage/coding/delsarte_bounds.py @@ -50,7 +50,7 @@ def krawtchouk(n, q, l, x, check=True): - ``n``, ``q``, ``x`` -- arbitrary numbers - - ``l`` -- a nonnegative integer + - ``l`` -- nonnegative integer - ``check`` -- check the input for correctness. ``True`` by default. Otherwise, pass it as it is. Use ``check=False`` at @@ -135,7 +135,7 @@ def eberlein(n, w, k, u, check=True): - ``w``, ``k``, ``x`` -- arbitrary numbers - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``check`` -- check the input for correctness. ``True`` by default. Otherwise, pass it as it is. Use ``check=False`` at diff --git a/src/sage/combinat/binary_tree.py b/src/sage/combinat/binary_tree.py index 1e39858cd03..0d018c18b00 100644 --- a/src/sage/combinat/binary_tree.py +++ b/src/sage/combinat/binary_tree.py @@ -1243,7 +1243,8 @@ def to_dyck_word(self, usemap='1L0R'): INPUT: - - ``usemap`` -- a string, either ``1L0R``, ``1R0L``, ``L1R0``, ``R1L0`` + - ``usemap`` -- string; either ``'1L0R'``, ``'1R0L'``, ``'L1R0'``, + ``'R1L0'`` The bijection is defined recursively as follows: @@ -2524,8 +2525,8 @@ def comb(self, side='left'): INPUT: - - ``side`` -- (default: ``'left'``) set to 'left' to obtain a left - comb, and to 'right' to obtain a right comb. + - ``side`` -- (default: ``'left'``) set to ``'left'`` to obtain a left + comb, and to ``'right'`` to obtain a right comb OUTPUT: list of binary trees @@ -4037,7 +4038,7 @@ def from_tamari_sorting_tuple(key): INPUT: - - ``key`` -- a tuple of integers + - ``key`` -- tuple of integers EXAMPLES:: diff --git a/src/sage/combinat/chas/fsym.py b/src/sage/combinat/chas/fsym.py index 3704720564f..b28307e1ed9 100644 --- a/src/sage/combinat/chas/fsym.py +++ b/src/sage/combinat/chas/fsym.py @@ -351,7 +351,7 @@ def duality_pairing_matrix(self, basis, degree): INPUT: - ``basis`` -- a basis of the dual Hopf algebra - - ``degree`` -- a nonnegative integer + - ``degree`` -- nonnegative integer OUTPUT: diff --git a/src/sage/combinat/cluster_algebra_quiver/mutation_class.py b/src/sage/combinat/cluster_algebra_quiver/mutation_class.py index c4234efae93..9a85542100f 100644 --- a/src/sage/combinat/cluster_algebra_quiver/mutation_class.py +++ b/src/sage/combinat/cluster_algebra_quiver/mutation_class.py @@ -280,7 +280,7 @@ def _mutation_class_iter( dg, n, m, depth=infinity, return_dig6=False, show_dept INPUT: - ``dg`` -- a digraph with `n+m` vertices - - ``depth`` -- a positive integer or infinity specifying (roughly) how many + - ``depth`` -- positive integer or infinity specifying (roughly) how many steps away from the initial seed to mutate - ``return_dig6`` -- indicates whether to convert digraph data to dig6 string data diff --git a/src/sage/combinat/core.py b/src/sage/combinat/core.py index c928a508589..370b9abc772 100644 --- a/src/sage/combinat/core.py +++ b/src/sage/combinat/core.py @@ -346,11 +346,13 @@ def affine_symmetric_group_action(self, w, transposition=False): INPUT: - - ``w`` -- a tuple of integers `[w_1,\ldots,w_m]` with `0\le w_j bool: INPUT: - - ``type`` -- a string; can be one of the following: + - ``type`` -- string; can be one of the following: * ``'interval'`` -- allow only doublings of an interval * ``'lower'`` -- allow doublings of lower pseudo-interval; that is, a @@ -4878,7 +4878,7 @@ def congruences_lattice(self, labels='congruence'): INPUT: - - ``labels`` -- a string; the type of elements in the resulting lattice + - ``labels`` -- string; the type of elements in the resulting lattice OUTPUT: a distributive lattice diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index e1db7434330..2304c2d2b44 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -320,7 +320,7 @@ def tau(self, i): INPUT: - - ``i`` -- an integer between `1` and `n-1`, where `n` is the + - ``i`` -- integer between `1` and `n-1`, where `n` is the cardinality of the poset The operator `\tau_i` on a linear extension `\pi` of a poset diff --git a/src/sage/combinat/posets/poset_examples.py b/src/sage/combinat/posets/poset_examples.py index 6e980a87e51..95d06fb8f5b 100644 --- a/src/sage/combinat/posets/poset_examples.py +++ b/src/sage/combinat/posets/poset_examples.py @@ -613,7 +613,7 @@ def IntegerPartitionsDominanceOrder(n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer EXAMPLES:: @@ -937,7 +937,7 @@ def SetPartitions(n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer EXAMPLES:: @@ -1454,7 +1454,7 @@ def YoungsLattice(n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer EXAMPLES:: @@ -1578,7 +1578,7 @@ def DoubleTailedDiamond(n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer EXAMPLES:: @@ -1603,7 +1603,7 @@ def PermutationPattern(n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer A permutation `u = u_1 \cdots u_n` contains the pattern `v = v_1 \cdots v_m` if there is a (not necessarily consecutive) @@ -1801,7 +1801,7 @@ def MobilePoset(ribbon, hangers, anchor=None): INPUT: - ``ribbon`` -- a finite poset that is a ribbon - - ``hangers`` -- a dictionary mapping an element on the ribbon + - ``hangers`` -- dictionary mapping an element on the ribbon to a list of d-complete posets that it covers - ``anchor`` -- (optional) a ``tuple`` (``ribbon_elmt``, ``anchor_elmt``, ``anchor_poset``), where ``anchor_elmt`` covers diff --git a/src/sage/combinat/posets/posets.py b/src/sage/combinat/posets/posets.py index c1c4f6c0f6b..c845131eb36 100644 --- a/src/sage/combinat/posets/posets.py +++ b/src/sage/combinat/posets/posets.py @@ -364,7 +364,7 @@ def Poset(data=None, element_labels=None, cover_relations=False, linear_extensio 6. A previously constructed poset (the poset itself is returned). - ``element_labels`` -- (default: ``None``); an optional list or - dictionary of objects that label the poset elements. + dictionary of objects that label the poset elements - ``cover_relations`` -- boolean (default: ``False``); whether the data can be assumed to describe a directed acyclic graph whose @@ -817,7 +817,7 @@ class FinitePoset(UniqueRepresentation, Parent): :class:`~sage.combinat.posets.posets.FinitePoset`, itself built with ``facade = False``) - - ``key`` -- any hashable value (default: ``None``). + - ``key`` -- any hashable value (default: ``None``) EXAMPLES:: @@ -1739,7 +1739,7 @@ def atkinson(self, a): Given an element `a` in a poset `P`, the `a`-spectrum is the list of integers whose `i`-th term contains the number of linear extensions of - `P` with element `a` located in the i-th position. + `P` with element `a` located in the `i`-th position. INPUT: @@ -1747,9 +1747,7 @@ def atkinson(self, a): - ``a`` -- an element of the poset - OUTPUT: - - The `a`-spectrum of this poset, returned as a list. + OUTPUT: the `a`-spectrum of this poset, returned as a list EXAMPLES:: @@ -1907,7 +1905,7 @@ def plot(self, label_elements=True, element_labels=None, - Options to change element look: - * ``element_colors`` -- a dictionary where keys are colors and values + * ``element_colors`` -- dictionary where keys are colors and values are lists of elements * ``element_color`` -- a color for elements not set in ``element_colors`` @@ -1921,13 +1919,13 @@ def plot(self, label_elements=True, element_labels=None, - Options to change cover relation look: - * ``cover_colors`` -- a dictionary where keys are colors and values + * ``cover_colors`` -- dictionary where keys are colors and values are lists of cover relations given as pairs of elements * ``cover_color`` -- a color for elements not set in ``cover_colors`` * ``cover_style`` -- style for cover relations: ``'solid'``, ``'dashed'``, ``'dotted'`` or ``'dashdot'`` - * ``cover_labels`` -- a dictionary, list or function representing + * ``cover_labels`` -- dictionary, list or function representing labels of the covers of the poset. When set to ``None`` (default) no label is displayed on the edges of the Hasse Diagram. * ``cover_labels_background`` -- a background color for cover @@ -2113,10 +2111,9 @@ def show(self, label_elements=True, element_labels=None, - ``label_elements`` -- boolean (default: ``True``); whether to display element labels - - ``element_labels`` -- (default: ``None``) a dictionary of - element labels + - ``element_labels`` -- dictionary (default: ``None``) of element labels - - ``cover_labels`` -- a dictionary, list or function representing labels + - ``cover_labels`` -- dictionary, list or function representing labels of the covers of ``self``; when set to ``None`` (default) no label is displayed on the edges of the Hasse Diagram @@ -3529,7 +3526,7 @@ def dimension(self, certificate=False, *, solver=None, integrality_tolerance=1e- integer (the dimension) or a certificate, i.e. a smallest set of linear extensions - - ``solver`` -- (default: ``None``) Specify a Mixed Integer Linear Programming + - ``solver`` -- (default: ``None``) specify a Mixed Integer Linear Programming (MILP) solver to be used. If set to ``None``, the default one is used. For more information on MILP solvers and which default solver is used, see the method @@ -4718,8 +4715,8 @@ def antichains(self, element_constructor=None): INPUT: - - ``element_constructor`` -- a function taking an iterable as - argument (default: ``list``) + - ``element_constructor`` -- a function taking an iterable as + argument (default: ``list``) OUTPUT: diff --git a/src/sage/combinat/ranker.py b/src/sage/combinat/ranker.py index e0a92da416a..e22d587c0cd 100644 --- a/src/sage/combinat/ranker.py +++ b/src/sage/combinat/ranker.py @@ -26,7 +26,7 @@ def from_list(l): INPUT: - - ``l`` -- list + - ``l`` -- list OUTPUT: ``[rank, unrank]`` -- functions diff --git a/src/sage/combinat/ribbon_tableau.py b/src/sage/combinat/ribbon_tableau.py index 939c7551511..6a1643a46c7 100644 --- a/src/sage/combinat/ribbon_tableau.py +++ b/src/sage/combinat/ribbon_tableau.py @@ -413,13 +413,13 @@ def insertion_tableau(skp, perm, evaluation, tableau, length): """ INPUT: - - ``skp`` -- skew partitions + - ``skp`` -- skew partitions - - ``perm, evaluation`` -- nonnegative integers + - ``perm, evaluation`` -- nonnegative integers - - ``tableau`` -- skew tableau + - ``tableau`` -- skew tableau - - ``length`` -- integer + - ``length`` -- integer TESTS:: @@ -480,11 +480,11 @@ def count_rec(nexts, current, part, weight, length): """ INPUT: - - ``nexts, current, part`` -- skew partitions + - ``nexts, current, part`` -- skew partitions - - ``weight`` -- nonnegative integer list + - ``weight`` -- nonnegative integer list - - ``length`` -- integer + - ``length`` -- integer TESTS:: @@ -516,11 +516,11 @@ def list_rec(nexts, current, part, weight, length): """ INPUT: - - ``nexts, current, part`` -- skew partitions + - ``nexts, current, part`` -- skew partitions - - ``weight`` -- nonnegative integer list + - ``weight`` -- nonnegative integer list - - ``length`` -- integer + - ``length`` -- integer TESTS:: @@ -575,11 +575,11 @@ def spin_rec(t, nexts, current, part, weight, length): INPUT: - - ``weight`` -- list of nonnegative integers + - ``weight`` -- list of nonnegative integers - - ``length`` -- the length of the ribbons we're tiling with + - ``length`` -- the length of the ribbons we're tiling with - - ``t`` -- the variable + - ``t`` -- the variable EXAMPLES:: diff --git a/src/sage/combinat/rigged_configurations/kr_tableaux.py b/src/sage/combinat/rigged_configurations/kr_tableaux.py index 6f72d02be3e..fb6f223e62c 100644 --- a/src/sage/combinat/rigged_configurations/kr_tableaux.py +++ b/src/sage/combinat/rigged_configurations/kr_tableaux.py @@ -1213,8 +1213,8 @@ def to_array(self, rows=True): INPUT: - - ``rows`` -- (default: ``True``) set to ``True`` if the resulting - array is by row, otherwise it is by column. + - ``rows`` -- boolean (default: ``True``); set to ``True`` if the + resulting array is by row, otherwise it is by column EXAMPLES:: @@ -1583,8 +1583,8 @@ def to_array(self, rows=True): INPUT: - - ``rows`` -- (default: ``True``) set to ``True`` if the resulting - array is by row, otherwise it is by column. + - ``rows`` -- boolean (default: ``True``); set to ``True`` if the + resulting array is by row, otherwise it is by column EXAMPLES:: diff --git a/src/sage/combinat/root_system/branching_rules.py b/src/sage/combinat/root_system/branching_rules.py index 1c2dec4f53c..363e932a415 100644 --- a/src/sage/combinat/root_system/branching_rules.py +++ b/src/sage/combinat/root_system/branching_rules.py @@ -1016,7 +1016,7 @@ def __init__(self, R, S, f, name='default', intermediate_types=[], INPUT: - ``R``, ``S`` -- CartanTypes - - ``f`` -- a function from the weight lattice of R to the weight lattice of S + - ``f`` -- a function from the weight lattice of R to the weight lattice of S """ self._R = CartanType(R) self._S = CartanType(S) @@ -1198,8 +1198,8 @@ def describe(self, verbose=False, debug=False, no_r=False): For more detailed information use verbose=True In this example, `0` is the affine root, that is, the negative - of the highest root, for `"G2"`. If `i => j` is printed, this - means that the i-th simple (or affine) root of the ambient + of the highest root, for `"G2"`. If `i \geq j` is printed, this + means that the `i`-th simple (or affine) root of the ambient group restricts to the j-th simple root of the subgroup. For reference the Dynkin diagrams are also printed. The extended Dynkin diagram of the ambient group is printed if @@ -1303,7 +1303,7 @@ def branching_rule(Rtype, Stype, rule='default'): - ``S`` -- the Weyl Character Ring of `H` - - ``rule`` -- a string describing the branching rule as a map from + - ``rule`` -- string describing the branching rule as a map from the weight space of `S` to the weight space of `R` If the rule parameter is omitted, in some cases, a default rule is supplied. See @@ -1962,7 +1962,7 @@ def branching_rule_from_plethysm(chi, cartan_type, return_matrix=False): - ``chi`` -- the character of an irreducible representation `\pi` of a group `G` - - ``cartan_type`` -- a classical Cartan type (`A`,`B`,`C` or `D`). + - ``cartan_type`` -- a classical Cartan type (`A`,`B`,`C` or `D`) It is assumed that the image of the irreducible representation pi naturally has its image in the group `G`. diff --git a/src/sage/combinat/root_system/cartan_type.py b/src/sage/combinat/root_system/cartan_type.py index 3b3d4ddc546..be8d7777a52 100644 --- a/src/sage/combinat/root_system/cartan_type.py +++ b/src/sage/combinat/root_system/cartan_type.py @@ -511,9 +511,9 @@ def __call__(self, *args): and rank is an integer or a pair of integers - ``[letter, rank, twist]`` -- letter is one of 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'BC' - and rank and twist are integers + and rank and twist are integers - - ``str`` -- a string + - ``str`` -- string - ``object`` -- a Cartan type, or an object with a Cartan type method diff --git a/src/sage/combinat/root_system/extended_affine_weyl_group.py b/src/sage/combinat/root_system/extended_affine_weyl_group.py index 6cf17a0661d..ae5278e5679 100644 --- a/src/sage/combinat/root_system/extended_affine_weyl_group.py +++ b/src/sage/combinat/root_system/extended_affine_weyl_group.py @@ -1421,8 +1421,8 @@ def apply_simple_projection(self, i, side='right', length_increasing=True): - ``side`` -- ``'right'`` or ``'left'`` (default: ``'right'``) according to which side of ``self`` the reflection `s_i` should be multiplied - - ``length_increasing`` -- boolean (default: ``True``). - If ``False``, do the above with the word "greater" replaced by "less". + - ``length_increasing`` -- boolean (default: ``True``); + if ``False``, do the above with the word "greater" replaced by "less" EXAMPLES:: diff --git a/src/sage/combinat/root_system/hecke_algebra_representation.py b/src/sage/combinat/root_system/hecke_algebra_representation.py index e8e35e47824..14038e48ac5 100644 --- a/src/sage/combinat/root_system/hecke_algebra_representation.py +++ b/src/sage/combinat/root_system/hecke_algebra_representation.py @@ -821,7 +821,7 @@ def __init__(self, T, T_Y=None, normalized=True): INPUT: - ``T`` -- a family `(T_i)_{i\in I}` implementing the action of - the generators of an affine Hecke algebra on ``self``. + the generators of an affine Hecke algebra on ``self`` - ``T_Y`` -- a family `(T^Y_i)_{i\in I}` implementing the action of the generators of an affine Hecke algebra on ``self``. By diff --git a/src/sage/combinat/root_system/integrable_representations.py b/src/sage/combinat/root_system/integrable_representations.py index 867e4761df8..b7d4b163242 100644 --- a/src/sage/combinat/root_system/integrable_representations.py +++ b/src/sage/combinat/root_system/integrable_representations.py @@ -466,7 +466,7 @@ def to_weight(self, n): INPUT: - - ``n`` -- a tuple representing a weight + - ``n`` -- tuple representing a weight EXAMPLES:: @@ -821,7 +821,7 @@ def m(self, n): INPUT: - - ``n`` -- a tuple representing a weight `\mu` + - ``n`` -- tuple representing a weight `\mu` EXAMPLES:: @@ -1032,7 +1032,7 @@ def modular_characteristic(self, mu=None): OPTIONAL: - ``mu`` -- a weight, or alternatively, - - ``n`` -- a tuple representing a weight `\mu` + - ``n`` -- tuple representing a weight `\mu` If no optional parameter is specified, this returns `m_\Lambda`. If ``mu`` is specified, it returns `m_{\Lambda,\mu}`. You may @@ -1082,7 +1082,7 @@ def branch(self, i=None, weyl_character_ring=None, sequence=None, depth=5): - ``i`` -- (default: 0) an element of the index set - ``weyl_character_ring`` -- a WeylCharacterRing - - ``sequence`` -- a dictionary + - ``sequence`` -- dictionary - ``depth`` -- (default: 5) an upper bound for `k` determining how many terms to give diff --git a/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py b/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py index d386a535532..90482002c92 100644 --- a/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +++ b/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py @@ -1320,8 +1320,8 @@ def __init__(self, KL, q, q1, q2, normalized): - ``KL`` -- algebra over weight space - ``q``, ``q1``, ``q2`` -- parameters - - ``normalized`` -- boolean (default: ``True``) - whether to normalize the result to have leading coefficient 1 + - ``normalized`` -- boolean (default: ``True``); whether to normalize + the result to have leading coefficient 1 EXAMPLES:: diff --git a/src/sage/combinat/root_system/pieri_factors.py b/src/sage/combinat/root_system/pieri_factors.py index f6265236d8f..f5fc63c9dce 100644 --- a/src/sage/combinat/root_system/pieri_factors.py +++ b/src/sage/combinat/root_system/pieri_factors.py @@ -604,7 +604,7 @@ def subset(self, length): INPUT: - - ``length`` -- a nonnegative integer + - ``length`` -- nonnegative integer EXAMPLES:: diff --git a/src/sage/combinat/root_system/plot.py b/src/sage/combinat/root_system/plot.py index caf3b9c9160..1ffa81daf78 100644 --- a/src/sage/combinat/root_system/plot.py +++ b/src/sage/combinat/root_system/plot.py @@ -977,8 +977,7 @@ def text(self, label, position, rgbcolor=(0,0,0)): INPUT: - - ``label`` -- a string, or a Sage object upon which latex will - be called + - ``label`` -- string or Sage object upon which latex will be called - ``position`` -- a position diff --git a/src/sage/combinat/root_system/reflection_group_complex.py b/src/sage/combinat/root_system/reflection_group_complex.py index 51a7f05f2d6..e89a01bff40 100644 --- a/src/sage/combinat/root_system/reflection_group_complex.py +++ b/src/sage/combinat/root_system/reflection_group_complex.py @@ -1788,7 +1788,7 @@ def set_reflection_representation(self,refl_repr=None): INPUT: - - ``refl_repr`` -- a dictionary representing the matrices of the + - ``refl_repr`` -- dictionary representing the matrices of the generators of ``self`` with keys given by the index set, or ``None`` to reset to the default reflection representation diff --git a/src/sage/combinat/root_system/root_lattice_realizations.py b/src/sage/combinat/root_system/root_lattice_realizations.py index 6e1839a9767..2aad29d8318 100644 --- a/src/sage/combinat/root_system/root_lattice_realizations.py +++ b/src/sage/combinat/root_system/root_lattice_realizations.py @@ -1052,7 +1052,7 @@ def root_poset(self, restricted=False, facade=False): - ``restricted`` -- boolean (default: ``False``); if ``True``, only non-simple roots are considered. - ``facade`` -- boolean (default: ``False``); passes facade option - to the poset generator. + to the poset generator EXAMPLES:: diff --git a/src/sage/combinat/root_system/root_system.py b/src/sage/combinat/root_system/root_system.py index 945b6854c90..ac70314eae1 100644 --- a/src/sage/combinat/root_system/root_system.py +++ b/src/sage/combinat/root_system/root_system.py @@ -794,9 +794,9 @@ def WeylDim(ct, coeffs): INPUT: - - ``ct`` -- a Cartan type + - ``ct`` -- a Cartan type - - ``coeffs`` -- list of nonnegative integers + - ``coeffs`` -- list of nonnegative integers The length of the list must equal the rank type[1]. A dominant weight hwv is constructed by summing the fundamental weights with diff --git a/src/sage/combinat/root_system/weyl_characters.py b/src/sage/combinat/root_system/weyl_characters.py index 58d2ae86dae..ee0684071d9 100644 --- a/src/sage/combinat/root_system/weyl_characters.py +++ b/src/sage/combinat/root_system/weyl_characters.py @@ -519,7 +519,7 @@ def _product_helper(self, d1, b): INPUT: - - ``d1`` -- a dictionary of weight multiplicities + - ``d1`` -- dictionary of weight multiplicities - ``b`` -- a dominant weight If ``d1`` is the dictionary of weight multiplicities of a character, @@ -701,7 +701,7 @@ def _demazure_helper(self, dd, word='long', debug=False): INPUT: - - ``dd`` -- a dictionary of weights + - ``dd`` -- dictionary of weights - ``word`` -- (optional) a Weyl group reduced word @@ -1033,7 +1033,7 @@ def char_from_weights(self, mdict): INPUT: - - ``mdict`` -- a dictionary mapping weights to coefficients, + - ``mdict`` -- dictionary mapping weights to coefficients, and representing a linear combination of weights which shall be invariant under the action of the Weyl group @@ -1062,7 +1062,7 @@ def _char_from_weights(self, mdict): INPUT: - - ``mdict`` -- a dictionary of weight multiplicities + - ``mdict`` -- dictionary of weight multiplicities The output of this method is a dictionary whose keys are dominant weights that is the same as the :meth:`monomial_coefficients` method @@ -1241,7 +1241,7 @@ def branch(self, S, rule='default'): - ``S`` -- a Weyl character ring for a Lie subgroup or subalgebra - - ``rule`` -- a branching rule + - ``rule`` -- a branching rule See :func:`~sage.combinat.root_system.branching_rules.branch_weyl_character` for more information about branching rules. @@ -1351,7 +1351,7 @@ def symmetric_power(self, k): INPUT: - - ``k`` -- a nonnegative integer + - ``k`` -- nonnegative integer The algorithm is based on the identity `k h_k = \sum_{r=1}^k p_k h_{k-r}` relating the power-sum @@ -1389,7 +1389,7 @@ def exterior_power(self, k): INPUT: - - ``k`` -- a nonnegative integer + - ``k`` -- nonnegative integer The algorithm is based on the identity `k e_k = \sum_{r=1}^k (-1)^{k-1} p_k e_{k-r}` relating the @@ -1430,7 +1430,7 @@ def adams_operator(self, r): INPUT: - - ``r`` -- a positive integer + - ``r`` -- positive integer This is a virtual character, whose weights are the weights of ``self``, each multiplied by `r`. @@ -1451,7 +1451,7 @@ def _adams_operator_helper(self, r): INPUT: - - ``r`` -- a positive integer + - ``r`` -- positive integer Return the dictionary of weight multiplicities for the Adams operation, needed for internal use by symmetric and exterior powers. @@ -1852,7 +1852,7 @@ def _element_constructor_(self, weight): INPUT: - - ``weight`` -- an element of the weight space, or a tuple + - ``weight`` -- an element of the weight space, or a tuple This method is responsible for constructing an appropriate weight from the data in ``weight``, and then return the @@ -2088,7 +2088,7 @@ def scale(self, k): INPUT: - - ``k`` -- a nonzero integer + - ``k`` -- nonzero integer EXAMPLES:: diff --git a/src/sage/combinat/sf/character.py b/src/sage/combinat/sf/character.py index 85a68951eef..36755b58f05 100644 --- a/src/sage/combinat/sf/character.py +++ b/src/sage/combinat/sf/character.py @@ -126,7 +126,7 @@ def _b_power_k(self, k): INPUT: - - ``k`` -- a positive integer + - ``k`` -- positive integer OUTPUT: an expression in the powersum basis of the symmetric functions diff --git a/src/sage/combinat/sf/dual.py b/src/sage/combinat/sf/dual.py index 7caaeb7737f..96b7dc2f4b9 100644 --- a/src/sage/combinat/sf/dual.py +++ b/src/sage/combinat/sf/dual.py @@ -881,7 +881,7 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``alphabet`` -- (default: ``'x'``) a variable for the expansion diff --git a/src/sage/combinat/sf/elementary.py b/src/sage/combinat/sf/elementary.py index 98636918340..de88550517a 100644 --- a/src/sage/combinat/sf/elementary.py +++ b/src/sage/combinat/sf/elementary.py @@ -80,11 +80,9 @@ def coproduct_on_generators(self, i): INPUT: - ``self`` -- an elementary basis of the symmetric functions - - ``i`` -- a nonnegative integer + - ``i`` -- nonnegative integer - OUTPUT: - - - returns the coproduct on the elementary generator `e(i)` + OUTPUT: the coproduct on the elementary generator `e(i)` EXAMPLES:: @@ -222,7 +220,7 @@ def verschiebung(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: @@ -277,7 +275,7 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``alphabet`` -- (default: ``'x'``) a variable for the expansion @@ -454,8 +452,8 @@ def exponential_specialization(self, t=None, q=1): INPUT: - - ``t`` -- (default: ``None``); the value to use for `t`; - the default is to create a ring of polynomials in ``t``. + - ``t`` -- (default: ``None``); the value to use for `t`. + The default is to create a ring of polynomials in `t`. - ``q`` -- (default: `1`) the value to use for `q`. If ``q`` is ``None``, then a ring (or fraction field) of diff --git a/src/sage/combinat/sf/hall_littlewood.py b/src/sage/combinat/sf/hall_littlewood.py index 5fa31c6f1ba..c725d478749 100644 --- a/src/sage/combinat/sf/hall_littlewood.py +++ b/src/sage/combinat/sf/hall_littlewood.py @@ -470,7 +470,7 @@ def transition_matrix(self, basis, n): - ``self`` -- a Hall-Littlewood symmetric function basis - ``basis`` -- another symmetric function basis - - ``n`` -- a nonnegative integer representing the degree + - ``n`` -- nonnegative integer representing the degree OUTPUT: @@ -572,8 +572,8 @@ def expand(self, n, alphabet='x'): INPUT: - ``self`` -- an element of a Hall-Littlewood basis - - ``n`` -- a positive integer - - ``alphabet`` -- a string representing a variable name (default: ``'x'``) + - ``n`` -- positive integer + - ``alphabet`` -- string representing a variable name (default: ``'x'``) OUTPUT: a symmetric polynomial of ``self`` in ``n`` variables @@ -997,7 +997,7 @@ def _s_cache(self, n): INPUT: - ``self`` -- an instance of the Hall-Littlewood `P` basis - - ``n`` -- a positive integer + - ``n`` -- positive integer EXAMPLES:: diff --git a/src/sage/combinat/sf/hecke.py b/src/sage/combinat/sf/hecke.py index d44f3392d65..aec6860cdc5 100644 --- a/src/sage/combinat/sf/hecke.py +++ b/src/sage/combinat/sf/hecke.py @@ -210,7 +210,7 @@ def _p_to_qbar_on_generator(self, n): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer EXAMPLES:: @@ -260,7 +260,7 @@ def _qbar_to_p_on_generator(self, n): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer EXAMPLES:: diff --git a/src/sage/combinat/sf/homogeneous.py b/src/sage/combinat/sf/homogeneous.py index ff731e474f1..a24e6b045cc 100644 --- a/src/sage/combinat/sf/homogeneous.py +++ b/src/sage/combinat/sf/homogeneous.py @@ -107,7 +107,7 @@ def coproduct_on_generators(self, i): INPUT: - ``self`` -- a homogeneous basis of symmetric functions - - ``i`` -- a nonnegative integer + - ``i`` -- nonnegative integer OUTPUT: the sum `\sum_{r=0}^i h_r \otimes h_{i-r}` @@ -187,7 +187,7 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``alphabet`` -- (default: ``'x'``) a variable for the expansion diff --git a/src/sage/combinat/sf/jack.py b/src/sage/combinat/sf/jack.py index 30db1b032e5..7eac2dc953e 100644 --- a/src/sage/combinat/sf/jack.py +++ b/src/sage/combinat/sf/jack.py @@ -886,7 +886,7 @@ def _m_cache(self, n): INPUT: - ``self`` -- an instance of the Jack `P` basis of the symmetric functions - - ``n`` -- a positive integer indicating the degree + - ``n`` -- positive integer indicating the degree EXAMPLES:: @@ -1193,7 +1193,7 @@ def _h_cache(self, n): INPUT: - ``self`` -- an instance of the Jack `Qp` basis of the symmetric functions - - ``n`` -- a positive integer indicating the degree + - ``n`` -- positive integer indicating the degree EXAMPLES:: diff --git a/src/sage/combinat/sf/k_dual.py b/src/sage/combinat/sf/k_dual.py index 2384338a83a..eb045fb9397 100644 --- a/src/sage/combinat/sf/k_dual.py +++ b/src/sage/combinat/sf/k_dual.py @@ -56,7 +56,7 @@ def __init__(self, Sym, k, t='t'): - ``Sym`` -- an element of class :class:`sage.combinat.sf.sf.SymmetricFunctions` - - ``k`` -- a positive integer + - ``k`` -- positive integer - ``R`` -- a ring @@ -877,7 +877,7 @@ def __init__(self, kBoundedRing, prefix): INPUT: - ``kBoundedRing`` -- an element which is of class :class:`KBoundedQuotient` - - ``prefix`` -- a string used to distinguish this basis, and used in printing + - ``prefix`` -- string used to distinguish this basis, and used in printing EXAMPLES:: diff --git a/src/sage/combinat/sf/kfpoly.py b/src/sage/combinat/sf/kfpoly.py index 4599030115c..de0431545e5 100644 --- a/src/sage/combinat/sf/kfpoly.py +++ b/src/sage/combinat/sf/kfpoly.py @@ -250,7 +250,7 @@ def compat(n, mu, nu): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer - ``mu``, ``nu`` -- partitions OUTPUT: list of partitions diff --git a/src/sage/combinat/sf/llt.py b/src/sage/combinat/sf/llt.py index 7a6d787d5bc..8fc9eeed125 100644 --- a/src/sage/combinat/sf/llt.py +++ b/src/sage/combinat/sf/llt.py @@ -116,7 +116,7 @@ def __init__(self, Sym, k, t): INPUT: - ``self`` -- a family of LLT symmetric function bases - - ``k`` -- a positive integer (the level) + - ``k`` -- positive integer (the level) - ``t`` -- a parameter (default: `t`) EXAMPLES:: @@ -595,7 +595,7 @@ def _m_cache(self, n): INPUT: - ``self`` -- an instance of the LLT hspin or hcospin basis - - ``n`` -- a positive integer representing the degree + - ``n`` -- positive integer representing the degree EXAMPLES:: diff --git a/src/sage/combinat/sf/macdonald.py b/src/sage/combinat/sf/macdonald.py index 911e8e1baa5..380e5889d29 100644 --- a/src/sage/combinat/sf/macdonald.py +++ b/src/sage/combinat/sf/macdonald.py @@ -1129,7 +1129,7 @@ def _s_cache(self, n): INPUT: - ``self`` -- a Macdonald `J` basis - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer EXAMPLES:: @@ -1785,7 +1785,7 @@ def _s_cache(self, n): INPUT: - ``self`` -- a Macdonald `S` basis - - ``n`` -- a positive integer + - ``n`` -- positive integer EXAMPLES:: @@ -1814,8 +1814,7 @@ def _creation_by_determinant_helper(self, k, part): INPUT: - ``self`` -- an element of the Macdonald `S` basis - - ``k`` -- a positive integer at least as big as the - length of ``part`` + - ``k`` -- positive integer at least as big as the length of ``part`` - ``part`` -- a partition OUTPUT: @@ -1868,7 +1867,7 @@ def _creation_by_determinant(self, k): INPUT: - ``self`` -- an element of the Macdonald `S` basis - - ``k`` -- a positive integer + - ``k`` -- positive integer OUTPUT: the column adding operator on the `J` basis on ``self`` @@ -1896,7 +1895,7 @@ def creation(self, k): INPUT: - ``self`` -- an element of the Macdonald `S` basis - - ``k`` -- a positive integer + - ``k`` -- positive integer OUTPUT: the column adding operator on the `J` basis on ``self`` diff --git a/src/sage/combinat/sf/monomial.py b/src/sage/combinat/sf/monomial.py index ad43d3bd24a..4da28069024 100644 --- a/src/sage/combinat/sf/monomial.py +++ b/src/sage/combinat/sf/monomial.py @@ -279,7 +279,7 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``alphabet`` -- (default: ``'x'``) a variable for the expansion diff --git a/src/sage/combinat/sf/new_kschur.py b/src/sage/combinat/sf/new_kschur.py index a23731ec264..388577f3ce5 100644 --- a/src/sage/combinat/sf/new_kschur.py +++ b/src/sage/combinat/sf/new_kschur.py @@ -446,7 +446,7 @@ def transition_matrix(self, other, n): INPUT: - ``other`` -- a basis in the ring of symmetric functions - - ``n`` -- a positive integer + - ``n`` -- positive integer The entry in the `i^{th}` row and `j^{th}` column is the coefficient obtained by writing the `i^{th}` element of the @@ -671,7 +671,7 @@ def hl_creation_operator(self, nu, t=None): INPUT: - - ``nu`` -- a partition or a list of integers + - ``nu`` -- a partition or a list of integers - ``t`` -- (default: ``None``, in which case ``t`` is used) an element of the base ring @@ -1485,7 +1485,7 @@ def _homogeneous_generators_noncommutative_variables_zero_Hecke(self, r): INPUT: - - ``r`` -- a positive integer + - ``r`` -- positive integer OUTPUT: an element of the affine zero Hecke algebra diff --git a/src/sage/combinat/sf/orthotriang.py b/src/sage/combinat/sf/orthotriang.py index cda794920be..d709fcc6577 100644 --- a/src/sage/combinat/sf/orthotriang.py +++ b/src/sage/combinat/sf/orthotriang.py @@ -191,7 +191,7 @@ def _base_cache(self, n): INPUT: - ``self`` -- a basis determined by an orthotriangular definition - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer EXAMPLES:: diff --git a/src/sage/combinat/sf/powersum.py b/src/sage/combinat/sf/powersum.py index 21083d33f64..961e7553450 100644 --- a/src/sage/combinat/sf/powersum.py +++ b/src/sage/combinat/sf/powersum.py @@ -57,11 +57,9 @@ def coproduct_on_generators(self, i): INPUT: - ``self`` -- the power sum basis of the symmetric functions - - ``i`` -- a positive integer + - ``i`` -- positive integer - OUTPUT: - - - the result of the coproduct on the generator `p(i)` + OUTPUT: the result of the coproduct on the generator `p(i)` EXAMPLES:: @@ -197,7 +195,7 @@ def eval_at_permutation_roots_on_generators(self, k, rho): INPUT: - - ``k`` -- a nonnegative integer + - ``k`` -- nonnegative integer - ``rho`` -- a partition or a list of nonnegative integers OUTPUT: an element of the base ring @@ -434,7 +432,7 @@ def adams_operator(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: @@ -547,7 +545,7 @@ def verschiebung(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: @@ -613,7 +611,7 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``alphabet`` -- (default: ``'x'``) a variable for the expansion @@ -865,7 +863,7 @@ def exponential_specialization(self, t=None, q=1): INPUT: - ``t`` -- (default: ``None``) the value to use for `t`; - the default is to create a ring of polynomials in ``t``. + the default is to create a ring of polynomials in ``t`` - ``q`` -- (default: `1`) the value to use for `q`. If ``q`` is ``None``, then a ring (or fraction field) of diff --git a/src/sage/combinat/sf/schur.py b/src/sage/combinat/sf/schur.py index d8b4a644d17..412d5877cc3 100644 --- a/src/sage/combinat/sf/schur.py +++ b/src/sage/combinat/sf/schur.py @@ -232,7 +232,7 @@ def __pow__(self, n): INPUT: - ``self`` -- an element of the Schur symmetric function basis - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer OUTPUT: the ``n`-th power of an instance of ``self`` in the Schur basis @@ -457,7 +457,7 @@ def verschiebung(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: @@ -554,7 +554,7 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``alphabet`` -- (default: ``'x'``) a variable for the expansion @@ -760,7 +760,7 @@ def exponential_specialization(self, t=None, q=1): INPUT: - ``t`` -- (default: ``None``) the value to use for `t`; - the default is to create a ring of polynomials in ``t``. + the default is to create a ring of polynomials in ``t`` - ``q`` -- (default: `1`) the value to use for `q`. If ``q`` is ``None``, then a ring (or fraction field) of diff --git a/src/sage/combinat/sf/sf.py b/src/sage/combinat/sf/sf.py index 2c81666fac7..faafe661da9 100644 --- a/src/sage/combinat/sf/sf.py +++ b/src/sage/combinat/sf/sf.py @@ -1339,7 +1339,7 @@ def llt(self, k, t='t'): INPUT: - - ``k`` -- a positive integer indicating the level + - ``k`` -- positive integer indicating the level - ``t`` -- a parameter (default: `t`) LLT polynomials in `hspin` and `hcospin` bases. @@ -1470,7 +1470,7 @@ def kBoundedSubspace(self, k, t='t'): INPUT: - - ``k`` -- a positive integer + - ``k`` -- positive integer - ``t`` -- a formal parameter; `t=1` yields a subring The subspace of the ring of symmetric functions spanned by @@ -1560,7 +1560,7 @@ def kBoundedQuotient(self, k, t='t'): INPUT: - - ``k`` -- a positive integer + - ``k`` -- positive integer The quotient of the ring of symmetric functions ... @@ -1591,7 +1591,7 @@ def __init__(self, t, domain, codomain): INPUT: - ``t`` -- a function taking a monomial in CombinatorialFreeModule(QQ, Partitions()), - and returning a (partition, coefficient) list. + and returning a (partition, coefficient) list - ``domain``, ``codomain`` -- parents diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index dafbc48917a..130d27b97f3 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -1313,11 +1313,11 @@ def carlitz_shareshian_wachs(self, n, d, s, comparison=None): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - - ``d`` -- a nonnegative integer + - ``d`` -- nonnegative integer - - ``s`` -- a nonnegative integer + - ``s`` -- nonnegative integer - ``comparison`` -- (default: ``None``) a variable which can take the forms ``None``, ``-1``, ``0`` @@ -1979,7 +1979,7 @@ def _apply_multi_module_morphism(self, x, y, f, orthogonal=False): - ``f`` -- a function that takes in two partitions (basis elements) and returns an element of the target domain - ``orthogonal`` -- if orthogonal is set to ``True``, then - ``f(part1, part2)`` is assumed to be 0 if ``part1 != part2``. + ``f(part1, part2)`` is assumed to be 0 if ``part1 != part2`` EXAMPLES:: @@ -2051,31 +2051,31 @@ def _from_cache(self, element, cache_function, cache_dict, **subs_dict): INPUT: - - ``element`` -- an element of a realization `M` of the ring of - symmetric functions. Note that `M` can be a different realization - than the one in which ``self`` is written, and does not have to - be specified. It is assumed that the basis of ``self`` is indexed - by partitions, and the degree of a basis element is the size of - the partition indexing it. - - - ``cache_function`` -- a function which accepts an - integer `n` as its input and creates the cache for that homogeneous - component (saving it in ``cache_dict``). - - - ``cache_dict`` -- a dictionary storing a cache. - It should be indexed by the positive integers `n`. Its values - are dictionaries indexed by the partitions of size `n`. The values - of those latter dictionaries are, again, dictionaries indexed by - partitions of size `n`. Altogether, ``cache_dict`` should be - understood to encode a graded linear map from `M` to the - realization ``self`` of the ring of symmetric functions; the - encoding is done in such a way that, for any `n` and any partitions - ``lam`` and ``mu`` of `n`, the ``self[mu]``-coordinate of the image - of ``M[lam]`` under this linear map (in the basis ``self``) is - ``cache_dict[lam][mu]``. - - - ``subs_dict`` -- (optional) a dictionary for any substitutions - to make after the value is extracted from ``cache_dict``. + - ``element`` -- an element of a realization `M` of the ring of + symmetric functions. Note that `M` can be a different realization + than the one in which ``self`` is written, and does not have to + be specified. It is assumed that the basis of ``self`` is indexed + by partitions, and the degree of a basis element is the size of + the partition indexing it. + + - ``cache_function`` -- a function which accepts an + integer `n` as its input and creates the cache for that homogeneous + component (saving it in ``cache_dict``). + + - ``cache_dict`` -- dictionary storing a cache. + It should be indexed by the positive integers `n`. Its values + are dictionaries indexed by the partitions of size `n`. The values + of those latter dictionaries are, again, dictionaries indexed by + partitions of size `n`. Altogether, ``cache_dict`` should be + understood to encode a graded linear map from `M` to the + realization ``self`` of the ring of symmetric functions; the + encoding is done in such a way that, for any `n` and any partitions + ``lam`` and ``mu`` of `n`, the ``self[mu]``-coordinate of the image + of ``M[lam]`` under this linear map (in the basis ``self``) is + ``cache_dict[lam][mu]``. + + - ``subs_dict`` -- (optional) a dictionary for any substitutions + to make after the value is extracted from ``cache_dict`` EXAMPLES:: @@ -2132,35 +2132,35 @@ def _invert_morphism(self, n, base_ring, INPUT: - - ``n`` -- an integer, the homogeneous component of - symmetric functions for which we want to a morphism's inverse + - ``n`` -- integer, the homogeneous component of + symmetric functions for which we want to a morphism's inverse - - ``base_ring`` -- the base ring being worked over + - ``base_ring`` -- the base ring being worked over - - ``self_to_other_cache`` -- a dictionary which - stores the transition from ``self`` to ``other`` + - ``self_to_other_cache`` -- dictionary which + stores the transition from ``self`` to ``other`` - - ``other_to_self_cache`` -- a dictionary which - stores the transition from ``other`` to ``self`` + - ``other_to_self_cache`` -- dictionary which + stores the transition from ``other`` to ``self`` - - ``to_other_function`` -- a function which takes in - a partition and returns a function which gives the coefficients of - ``self(part)`` in the ``other`` basis + - ``to_other_function`` -- a function which takes in + a partition and returns a function which gives the coefficients of + ``self(part)`` in the ``other`` basis - - ``to_self_function`` -- a function which takes in a - partition and returns a function which gives the coefficients of - ``other(part)`` in ``self`` + - ``to_self_function`` -- a function which takes in a + partition and returns a function which gives the coefficients of + ``other(part)`` in ``self`` - - ``upper_triangular`` -- boolean; if ``True``, the - inverse will be computed by back substitution + - ``upper_triangular`` -- boolean; if ``True``, the + inverse will be computed by back substitution - - ``lower_triangular`` -- boolean; if ``True``, the - inverse will be computed by forward substitution + - ``lower_triangular`` -- boolean; if ``True``, the + inverse will be computed by forward substitution - - ``ones_on_diagonal`` -- boolean; if ``True``, the - entries on the diagonal of the morphism (and inverse) matrix are - assumed to be ones. This is used to remove divisions from the - forward and back substitute algorithms. + - ``ones_on_diagonal`` -- boolean; if ``True``, the + entries on the diagonal of the morphism (and inverse) matrix are + assumed to be ones. This is used to remove divisions from the + forward and back substitute algorithms. OUTPUT: @@ -2418,13 +2418,12 @@ def transition_matrix(self, basis, n): INPUT: - ``basis`` -- a basis of the ring of symmetric functions - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer OUTPUT: - - a matrix of coefficients giving the expansion of the - homogeneous degree-`n` elements of ``self`` in the - degree-`n` elements of ``basis`` + A matrix of coefficients giving the expansion of the homogeneous + degree-`n` elements of ``self`` in the degree-`n` elements of ``basis``. EXAMPLES:: @@ -2633,12 +2632,12 @@ def _inner_plethysm_pk_g(self, k, g, cache): INPUT: - - ``k`` -- a positive integer + - ``k`` -- positive integer - - ``g`` -- a symmetric function in the power sum basis + - ``g`` -- a symmetric function in the power sum basis - - ``cache`` -- a dictionary whose keys are (k, g) pairs - and values are the cached output of this function + - ``cache`` -- dictionary whose keys are (k, g) pairs + and values are the cached output of this function EXAMPLES:: @@ -2881,7 +2880,7 @@ def set_print_style(self, ps): INPUT: - - ``ps`` -- a string specifying the printing style + - ``ps`` -- string specifying the printing style EXAMPLES:: @@ -3245,12 +3244,12 @@ def plethysm(self, x, include=None, exclude=None): INPUT: - - ``x`` -- a symmetric function over the same base ring as - ``self`` - - ``include`` -- list of variables to be treated as - degree one elements instead of the default degree one elements - - ``exclude`` -- list of variables to be excluded - from the default degree one elements + - ``x`` -- a symmetric function over the same base ring as + ``self`` + - ``include`` -- list of variables to be treated as + degree one elements instead of the default degree one elements + - ``exclude`` -- list of variables to be excluded + from the default degree one elements OUTPUT: @@ -5150,7 +5149,7 @@ def adams_operator(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: @@ -5315,7 +5314,7 @@ def verschiebung(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: @@ -5514,7 +5513,7 @@ def _expand(self, condition, n, alphabet='x'): selecting only certain terms (namely, only the items failing the condition are being expanded) - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``alphabet`` -- (default: ``'x'``) a variable for the expansion @@ -5747,7 +5746,7 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer - ``alphabet`` -- (default: ``'x'``) a variable for the expansion @@ -5993,7 +5992,7 @@ def character_to_frobenius_image(self, n): INPUT: - - ``n`` -- a nonnegative integer to interpret ``self`` as + - ``n`` -- nonnegative integer to interpret ``self`` as a character of `GL_n` OUTPUT: a symmetric function of degree ``n`` diff --git a/src/sage/combinat/sf/witt.py b/src/sage/combinat/sf/witt.py index 5d620fe2525..5e8b115c95c 100644 --- a/src/sage/combinat/sf/witt.py +++ b/src/sage/combinat/sf/witt.py @@ -555,7 +555,7 @@ def verschiebung(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer OUTPUT: diff --git a/src/sage/combinat/species/composition_species.py b/src/sage/combinat/species/composition_species.py index b0870575c1f..17a240b72dc 100644 --- a/src/sage/combinat/species/composition_species.py +++ b/src/sage/combinat/species/composition_species.py @@ -72,7 +72,7 @@ def change_labels(self, labels): INPUT: - - ``labels`` -- a list of labels + - ``labels`` -- list of labels OUTPUT: diff --git a/src/sage/combinat/species/partition_species.py b/src/sage/combinat/species/partition_species.py index cd6dbd43f52..d166a99109a 100644 --- a/src/sage/combinat/species/partition_species.py +++ b/src/sage/combinat/species/partition_species.py @@ -113,7 +113,7 @@ def change_labels(self, labels): INPUT: - - ``labels`` -- a list of labels + - ``labels`` -- list of labels OUTPUT: diff --git a/src/sage/combinat/species/product_species.py b/src/sage/combinat/species/product_species.py index 2802756e7eb..4a17d3c8ed2 100644 --- a/src/sage/combinat/species/product_species.py +++ b/src/sage/combinat/species/product_species.py @@ -123,7 +123,7 @@ def change_labels(self, labels): INPUT: - - ``labels`` -- a list of labels + - ``labels`` -- list of labels OUTPUT: diff --git a/src/sage/combinat/species/species.py b/src/sage/combinat/species/species.py index df50014b812..424c4459e8d 100644 --- a/src/sage/combinat/species/species.py +++ b/src/sage/combinat/species/species.py @@ -501,17 +501,16 @@ def _series_helper(self, series_ring_class, prefix, base_ring=None): INPUT: - - ``series_ring_class`` -- a class for the series - ring such as ExponentialGeneratingSeriesRing, etc. + - ``series_ring_class`` -- a class for the series ring such as + ``ExponentialGeneratingSeriesRing``, etc - - ``prefix`` -- the string prefix associated with the - generating series such as "cis" for the cycle index series. This - prefix appears in the methods that are implemented in the - subclass. + - ``prefix`` -- the string prefix associated with the generating series + such as "cis" for the cycle index series. This prefix appears in the + methods that are implemented in the subclass. - - ``base_ring`` -- the ring in which the coefficients - of the generating series live. If it is not specified, then it is - determined by the weight of the species. + - ``base_ring`` -- the ring in which the coefficients of the generating + series live. If it is not specified, then it is determined by the + weight of the species. EXAMPLES:: diff --git a/src/sage/combinat/species/structure.py b/src/sage/combinat/species/structure.py index 4a09e74bb3b..e6e979e39f6 100644 --- a/src/sage/combinat/species/structure.py +++ b/src/sage/combinat/species/structure.py @@ -149,7 +149,7 @@ def change_labels(self, labels): INPUT: - - ``labels`` -- a list of labels + - ``labels`` -- list of labels OUTPUT: @@ -304,7 +304,7 @@ def change_labels(self, labels): INPUT: - - ``labels`` -- a list of labels + - ``labels`` -- list of labels OUTPUT: diff --git a/src/sage/combinat/symmetric_group_algebra.py b/src/sage/combinat/symmetric_group_algebra.py index e33992ffafd..90abebd735e 100644 --- a/src/sage/combinat/symmetric_group_algebra.py +++ b/src/sage/combinat/symmetric_group_algebra.py @@ -2132,9 +2132,9 @@ def epsilon_ik(self, itab, ktab, star=0, mult='l2r'): INPUT: - - ``itab``, ``ktab`` -- two standard tableaux of size `n`. + - ``itab``, ``ktab`` -- two standard tableaux of size `n` - - ``star`` -- integer (default: `0`). + - ``star`` -- integer (default: `0`) - ``mult`` -- string (default: `l2r`); if set to `r2l`, this causes the method to return the antipode @@ -2440,9 +2440,9 @@ def epsilon_ik(itab, ktab, star=0): INPUT: - - ``itab``, ``ktab`` -- two standard tableaux of same size. + - ``itab``, ``ktab`` -- two standard tableaux of same size - - ``star`` -- integer (default: `0`). + - ``star`` -- integer (default: `0`) OUTPUT: @@ -2571,7 +2571,7 @@ def kappa(alpha): INPUT: - - ``alpha`` -- integer partition (can be encoded as a list). + - ``alpha`` -- integer partition (can be encoded as a list) OUTPUT: @@ -2676,7 +2676,7 @@ def b(tableau, star=0, base_ring=QQ): INPUT: - ``tableau`` -- Young tableau which contains every integer - from `1` to its size precisely once. + from `1` to its size precisely once - ``star`` -- nonnegative integer (default: `0`). When this optional variable is set, the method computes not the column diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index 17159b3aeee..cafa8d2365e 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -1329,8 +1329,8 @@ def schuetzenberger_involution(self, n=None, check=True): - ``n`` -- integer specifying the maximal letter in the alphabet (optional) - - ``check`` -- (default: ``True``) Check to make sure ``self`` is - semistandard. Set to ``False`` to avoid this check. (optional) + - ``check`` -- boolean (default: ``True``); check to make sure ``self`` + is semistandard OUTPUT: a tableau, the Schuetzenberger involution of ``self`` @@ -1394,8 +1394,8 @@ def evacuation(self, n=None, check=True): - ``n`` -- integer specifying the maximal letter in the alphabet (optional) - - ``check`` -- (default: ``True``) Check to make sure ``self`` is - semistandard. Set to ``False`` to avoid this check. (optional) + - ``check`` -- boolean (default: ``True``); check to make sure ``self`` + is semistandard OUTPUT: a tableau, the evacuation of ``self`` @@ -5059,8 +5059,8 @@ def from_shape_and_word(shape, w, convention='French'): - ``w`` -- a word whose length equals that of the partition - - ``convention`` -- a string which can take values ``'French'`` or - ``'English'``; the default is ``'French'`` + - ``convention`` -- string (default: ``'French'``); can take values + ``'French'`` or ``'English'`` OUTPUT: diff --git a/src/sage/combinat/tiling.py b/src/sage/combinat/tiling.py index c9e19a1dd96..7e88892e0d3 100644 --- a/src/sage/combinat/tiling.py +++ b/src/sage/combinat/tiling.py @@ -1142,7 +1142,7 @@ def isometric_copies(self, box, orientation_preserving=True, - ``box`` -- polyomino or tuple of integers (size of a box) - ``orientation_preserving`` -- boolean (default: ``True``); - If ``True``, the group of isometries of the `n`-cube is restricted + if ``True``, the group of isometries of the `n`-cube is restricted to those that preserve the orientation, i.e. of determinant 1. - ``mod_box_isometries`` -- boolean (default: ``False``); whether to @@ -1697,7 +1697,7 @@ def coord_to_int_dict(self): r""" Return a dictionary mapping coordinates to integers. - OUTPUT: dict + OUTPUT: dictionary EXAMPLES:: @@ -2369,7 +2369,7 @@ def animate(self, partial=None, stop=None, size=0.75, axes=False): to the center of each polyomino. - ``axes`` -- boolean (default: ``False``); whether the x and - y axes are shown. + y axes are shown EXAMPLES:: diff --git a/src/sage/combinat/words/abstract_word.py b/src/sage/combinat/words/abstract_word.py index 2e43e62d198..262ace7b7f1 100644 --- a/src/sage/combinat/words/abstract_word.py +++ b/src/sage/combinat/words/abstract_word.py @@ -376,7 +376,7 @@ def _longest_common_prefix_iterator(self, other): INPUT: - - ``other`` -- word + - ``other`` -- word OUTPUT: iterator @@ -404,15 +404,15 @@ def longest_common_prefix(self, other, length='unknown'): INPUT: - - ``other`` -- word + - ``other`` -- word - - ``length`` -- string (default: ``'unknown'``) - the length type of the resulting word if known. It may be one of - the following: + - ``length`` -- string (default: ``'unknown'``) + the length type of the resulting word if known. It may be one of + the following: - - ``'unknown'`` - - ``'finite'`` - - ``'infinite'`` + - ``'unknown'`` + - ``'finite'`` + - ``'infinite'`` EXAMPLES:: @@ -728,8 +728,8 @@ def apply_morphism(self, morphism): INPUT: - - ``morphism`` -- can be an instance of WordMorphism, or - anything that can be used to construct one + - ``morphism`` -- can be an instance of WordMorphism, or + anything that can be used to construct one EXAMPLES:: @@ -893,8 +893,8 @@ def _iterated_right_palindromic_closure_recursive_iterator(self, f=None): INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. It must - be callable on letters as well as words (e.g. WordMorphism). + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. WordMorphism) OUTPUT: iterator -- the iterated (`f`-)palindromic closure of self @@ -981,22 +981,20 @@ def iterated_right_palindromic_closure(self, f=None, algorithm='recursive'): INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. It must - be callable on letters as well as words (e.g. WordMorphism). - - - ``algorithm`` -- string (default: ``'recursive'``); specifying which - algorithm to be used when computing the iterated palindromic closure. - It must be one of the two following values: + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. WordMorphism) - - ``'definition'`` -- computed using the definition - - ``'recursive'`` -- computation based on an efficient formula - that recursively computes the iterated right palindromic closure - without having to recompute the longest `f`-palindromic suffix - at each iteration [2]. + - ``algorithm`` -- string (default: ``'recursive'``); specifying which + algorithm to be used when computing the iterated palindromic closure. + It must be one of the two following values: - OUTPUT: + - ``'definition'`` -- computed using the definition + - ``'recursive'`` -- computation based on an efficient formula + that recursively computes the iterated right palindromic closure + without having to recompute the longest `f`-palindromic suffix + at each iteration [2]. - word -- the iterated (`f`-)palindromic closure of self + OUTPUT: word -- the iterated (`f`-)palindromic closure of self EXAMPLES:: @@ -1191,7 +1189,7 @@ def _partial_sums_iterator(self, start, mod=None): - ``self`` -- a word over the integers - ``start`` -- integer; the first letter of the resulting word - - ``mod`` -- (default: ``None``) It can be one of the following: + - ``mod`` -- (default: ``None``) it can be one of the following: - None or 0 : result is over the integers - integer : result is over the integers modulo ``mod``. @@ -1236,7 +1234,7 @@ def partial_sums(self, start, mod=None): - ``self`` -- a word over the integers - ``start`` -- integer; the first letter of the resulting word - - ``mod`` -- (default: ``None``) It can be one of the following: + - ``mod`` -- (default: ``None``) it can be one of the following: - None or 0 : result is over the integers - integer : result is over the integers modulo ``mod``. @@ -1296,7 +1294,7 @@ def _finite_differences_iterator(self, mod=None): INPUT: - ``self`` -- a word over the integers - - ``mod`` -- (default: ``None``) It can be one of the following: + - ``mod`` -- (default: ``None``) it can be one of the following: - None or 0 : result is over the integers - integer : result is over the integers modulo ``mod``. @@ -1372,7 +1370,7 @@ def finite_differences(self, mod=None): INPUT: - ``self`` -- a word over the integers - - ``mod`` -- (default: ``None``) It can be one of the following: + - ``mod`` -- (default: ``None``) it can be one of the following: - None or 0 : result is over the integers - integer : result is over the integers modulo ``mod``. @@ -1433,16 +1431,14 @@ def sum_digits(self, base=2, mod=None): INPUT: - - ``self`` -- word over natural numbers - - - ``base`` -- integer (default: 2), greater or equal to 2 - - - ``mod`` -- modulo (default: ``None``); can take the following - values: + - ``self`` -- word over natural numbers - - ``integer`` -- the modulo + - ``base`` -- integer (default: 2), greater or equal to 2 - - ``None`` -- the value ``base`` is considered for the modulo + - ``mod`` -- modulo (default: ``None``); can take the following + values: + - ``integer`` -- the modulo + - ``None`` -- the value ``base`` is considered for the modulo EXAMPLES: diff --git a/src/sage/combinat/words/finite_word.py b/src/sage/combinat/words/finite_word.py index d46af70f4c0..302bde2e614 100644 --- a/src/sage/combinat/words/finite_word.py +++ b/src/sage/combinat/words/finite_word.py @@ -1187,7 +1187,7 @@ def number_of_factors(self, n=None, algorithm='suffix tree'): INPUT: - - ``n`` -- an integer, or ``None``. + - ``n`` -- integer or ``None`` - ``algorithm`` -- string (default: ``'suffix tree'``), takes the following values: @@ -1349,7 +1349,7 @@ def factor_set(self, n=None, algorithm='suffix tree'): INPUT: - - ``n`` -- integer or ``None`` (default: ``None``). + - ``n`` -- integer or ``None`` (default: ``None``) - ``algorithm`` -- string (default: ``'suffix tree'``), takes the following values: @@ -1440,7 +1440,7 @@ def topological_entropy(self, n): INPUT: - ``self`` -- a word defined over a finite alphabet - - ``n`` -- positive integer + - ``n`` -- positive integer OUTPUT: real number (a symbolic expression) @@ -1577,7 +1577,7 @@ def reduced_rauzy_graph(self, n): INPUT: - - ``n`` -- a nonnegative integer; every vertex of a reduced + - ``n`` -- nonnegative integer; every vertex of a reduced Rauzy graph of order ``n`` is a factor of length ``n`` of ``self`` OUTPUT: a looped multi-digraph @@ -2940,8 +2940,8 @@ def palindromes(self, f=None): INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. It must - be callable on letters as well as words (e.g. ``WordMorphism``). + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. ``WordMorphism``). OUTPUT: a set -- If ``f`` is ``None``, the set of all palindromic factors of ``self``; otherwise, the set of all ``f``-palindromic @@ -3132,8 +3132,8 @@ def is_full(self, f=None): INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. It must - be callable on letters as well as words (e.g. ``WordMorphism``). + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. ``WordMorphism``) OUTPUT: @@ -3199,8 +3199,8 @@ def palindromic_closure(self, side='right', f=None): - ``side`` -- ``'right'`` or ``'left'`` (default: ``'right'``) the direction of the closure - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. - It must be callable on letters as well as words (e.g. ``WordMorphism``). + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. ``WordMorphism``) OUTPUT: @@ -3275,8 +3275,8 @@ def is_symmetric(self, f=None): INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. It must - be callable on letters as well as words (e.g. ``WordMorphism``). + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. ``WordMorphism``) EXAMPLES:: @@ -3991,8 +3991,8 @@ def degree(self, weights=None): INPUT: - - ``weights`` -- list or a tuple, or a dictionary keyed by the - letters occurring in ``self`` + - ``weights`` -- list or tuple, or dictionary keyed by the + letters occurring in ``self`` EXAMPLES:: @@ -4314,7 +4314,7 @@ def rfind(self, sub, start=0, end=None): - ``sub`` -- string, list, tuple or word to search for - ``start`` -- nonnegative integer (default: ``0``); specifying - the position at which the search must stop. + the position at which the search must stop - ``end`` -- nonnegative integer (default: ``None``); specifying the position from which to start the search. If ``None``, then @@ -4966,14 +4966,14 @@ def overlap_partition(self, other, delay=0, p=None, involution=None): INPUT: - - ``other`` -- word on the same alphabet as ``self`` - - ``delay`` -- integer (default: ``0``) - - ``p`` -- disjoint sets data structure (default: ``None``), - a partition of the alphabet into disjoint sets to start with. - If ``None``, each letter start in distinct equivalence classes. - - ``involution`` -- callable (default: ``None``); an - involution on the alphabet. If ``involution`` is not ``None``, the relation - `R_{u,v,d} \cup R_{involution(u),involution(v),d}` is considered. + - ``other`` -- word on the same alphabet as ``self`` + - ``delay`` -- integer (default: ``0``) + - ``p`` -- disjoint sets data structure (default: ``None``), + a partition of the alphabet into disjoint sets to start with. + If ``None``, each letter start in distinct equivalence classes. + - ``involution`` -- callable (default: ``None``); an + involution on the alphabet. If ``involution`` is not ``None``, the relation + `R_{u,v,d} \cup R_{involution(u),involution(v),d}` is considered. OUTPUT: a disjoint set data structure @@ -5443,8 +5443,8 @@ def iterated_left_palindromic_closure(self, f=None): INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. - It must be callable on letters as well as words (e.g. ``WordMorphism``). + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. ``WordMorphism``) OUTPUT: word -- the left iterated ``f``-palindromic closure of ``self`` @@ -6165,8 +6165,8 @@ def shuffle(self, other, overlap=0): INPUT: - - ``other`` -- finite word - - ``overlap`` -- (default: ``0``) integer or ``True`` + - ``other`` -- finite word + - ``overlap`` -- (default: ``0``) integer or ``True`` OUTPUT: combinatorial class of shuffle product of ``self`` and ``other`` diff --git a/src/sage/combinat/words/morphic.py b/src/sage/combinat/words/morphic.py index 8644420d3d4..f961575556a 100644 --- a/src/sage/combinat/words/morphic.py +++ b/src/sage/combinat/words/morphic.py @@ -284,7 +284,7 @@ def __iter__(self): INPUT: - ``self`` -- an endomorphism, must be prolongable on - letter + letter - ``letter`` -- a letter in the domain of ``self`` diff --git a/src/sage/combinat/words/morphism.py b/src/sage/combinat/words/morphism.py index 858f123adea..3eba91a956a 100644 --- a/src/sage/combinat/words/morphism.py +++ b/src/sage/combinat/words/morphism.py @@ -953,7 +953,7 @@ def __pow__(self, exp): INPUT: - - ``exp`` -- a positive integer + - ``exp`` -- positive integer EXAMPLES:: @@ -1015,7 +1015,7 @@ def extend_by(self, other): INPUT: - - ``other`` -- a WordMorphism. + - ``other`` -- a WordMorphism OUTPUT: WordMorphism @@ -1691,7 +1691,7 @@ def is_uniform(self, k=None): INPUT: - - ``k`` -- a positive integer or ``None``. If set to a positive integer, + - ``k`` -- positive integer or ``None``. If set to a positive integer, then the function return ``True`` if ``self`` is `k`-uniform. If set to ``None``, then the function return ``True`` if ``self`` is uniform. @@ -1734,10 +1734,10 @@ def fixed_point(self, letter): INPUT: - ``self`` -- an endomorphism (or more generally a self-composable - morphism), must be prolongable on ``letter`` + morphism), must be prolongable on ``letter`` - ``letter`` -- in the domain of ``self``, the first letter - of the fixed point. + of the fixed point OUTPUT: ``word`` -- the fixed point of ``self`` beginning with ``letter`` @@ -2323,8 +2323,8 @@ def is_in_classP(self, f=None): INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. - It must be callable on letters as well as words (e.g. WordMorphism). + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. WordMorphism) REFERENCES: @@ -2401,8 +2401,8 @@ def has_conjugate_in_classP(self, f=None): INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of ``self``. - It must be callable on letters as well as words (e.g. WordMorphism). + - ``f`` -- involution (default: ``None``) on the alphabet of ``self``; + it must be callable on letters as well as words (e.g. WordMorphism) REFERENCES: @@ -2724,11 +2724,11 @@ def rauzy_fractal_plot(self, n=None, exchange=False, eig=None, Default values: ``1000`` for a 1D fractal, ``50000`` for a 2D fractal, ``10000`` for a 3D fractal. - - ``exchange`` -- boolean (default: ``False``). - Plot the Rauzy fractal with domain exchange. + - ``exchange`` -- boolean (default: ``False``); plot the Rauzy fractal + with domain exchange - - ``eig`` -- a real element of ``QQbar`` of degree >= 2 (default: ``None``). - The eigenvalue used to plot the fractal. + - ``eig`` -- a real element of ``QQbar`` of degree >= 2 (default: ``None``); + the eigenvalue used to plot the fractal. It must be an eigenvalue of ``self.incidence_matrix()``. The one used by default the maximal eigenvalue of ``self.incidence_matrix()`` (usually a Pisot number), @@ -2758,19 +2758,20 @@ def rauzy_fractal_plot(self, n=None, exchange=False, eig=None, - ``string`` -- a coloring map. For available coloring map names type: ``sorted(colormaps)`` - - ``dict`` -- a dictionary of the alphabet mapped to colors + - ``dict`` -- dictionary of the alphabet mapped to colors - - ``opacity`` -- a dictionary from the alphabet to the real interval [0,1] (default: ``None``). - If none is specified, all letters are plotted with opacity ``1``. + - ``opacity`` -- dictionary from the alphabet to the real interval + [0,1] (default: ``None``); if none is specified, all letters are + plotted with opacity ``1`` - - ``plot_origin`` -- a couple ``(k,c)`` (default: ``None``). - If specified, mark the origin by a point of size ``k`` and color ``c``. + - ``plot_origin`` -- a couple ``(k,c)`` (default: ``None``); + if specified, mark the origin by a point of size ``k`` and color ``c`` - - ``plot_basis`` -- boolean (default: ``False``). - Plot the projection of the canonical basis with the fractal. + - ``plot_basis`` -- boolean (default: ``False``); plot the projection + of the canonical basis with the fractal - - ``point_size`` -- float (default: ``None``). - The size of the points used to plot the fractal. + - ``point_size`` -- float (default: ``None``); the size of the points + used to plot the fractal EXAMPLES: @@ -3423,8 +3424,8 @@ def is_pushy(self, w=None): INPUT: - - ``w`` -- finite iterable (default: ``self.domain().alphabet()``). - Represents a word used to start the language. + - ``w`` -- finite iterable (default: ``self.domain().alphabet()``); + represents a word used to start the language EXAMPLES:: @@ -3450,8 +3451,8 @@ def is_unboundedly_repetitive(self, w=None): INPUT: - - ``w`` -- finite iterable (default: ``self.domain().alphabet()``). - Represents a word used to start the language. + - ``w`` -- finite iterable (default: ``self.domain().alphabet()``); + represents a word used to start the language EXAMPLES:: @@ -3480,8 +3481,8 @@ def is_repetitive(self, w=None): INPUT: - - ``w`` -- finite iterable (default: ``self.domain().alphabet()``). - Represents a word used to start the language. + - ``w`` -- finite iterable (default: ``self.domain().alphabet()``); + represents a word used to start the language EXAMPLES: @@ -3527,8 +3528,8 @@ def infinite_repetitions_primitive_roots(self, w=None, allow_growing=None): INPUT: - - ``w`` -- finite iterable (default: ``self.domain().alphabet()``). - Represents a word used to start the language. + - ``w`` -- finite iterable (default: ``self.domain().alphabet()``); + represents a word used to start the language - ``allow_growing`` -- boolean or ``None`` (default: ``None``). If ``False``, return only the primitive roots that contain no growing @@ -3692,8 +3693,8 @@ def simplify_alphabet_size(self, Z=None): INPUT: - - ``Z`` -- iterable (default: ``self.domain().alphabet()``); whose - elements are used as an alphabet for the simplification. + - ``Z`` -- iterable (default: ``self.domain().alphabet()``) whose + elements are used as an alphabet for the simplification EXAMPLES: diff --git a/src/sage/combinat/words/paths.py b/src/sage/combinat/words/paths.py index a1027da57ed..eb1ad5833b2 100644 --- a/src/sage/combinat/words/paths.py +++ b/src/sage/combinat/words/paths.py @@ -1994,7 +1994,7 @@ def plot(self, pathoptions={"rgbcolor": 'red', "arrow_head": True, "thickness": - ``startpoint`` -- (boolean, default: ``True``), draw the start point? - ``startoptions`` -- (dict, default:dict(rgbcolor='red',size=10)) - options for the start point drawing + options for the start point drawing EXAMPLES:: diff --git a/src/sage/combinat/words/suffix_trees.py b/src/sage/combinat/words/suffix_trees.py index 46ae849f0a8..53f41519e3c 100644 --- a/src/sage/combinat/words/suffix_trees.py +++ b/src/sage/combinat/words/suffix_trees.py @@ -833,9 +833,8 @@ def to_digraph(self, word_labels=False): INPUT: - - ``word_labels`` -- boolean (default: ``False``); if ``False``, labels - the edges by pairs `(i, j)`. If ``True``, labels the edges by - ``word[i:j]``. + - ``word_labels`` -- boolean (default: ``False``); if ``False``, labels + the edges by pairs `(i, j)`. If ``True``, labels the edges by ``word[i:j]`` EXAMPLES:: @@ -866,14 +865,13 @@ def plot(self, word_labels=False, layout='tree', tree_root=0, INPUT: - - ``word_labels`` -- boolean (default: ``False``); if ``False``, labels - the edges by pairs `(i, j)`; if ``True``, labels the edges by - ``word[i:j]``. - - ``layout`` -- (default: ``'tree'``) - - ``tree_root`` -- (default: 0) - - ``tree_orientation`` -- (default: ``'up'``) - - ``vertex_colors`` -- (default: ``None``) - - ``edge_labels`` -- (default: ``True``) + - ``word_labels`` -- boolean (default: ``False``); if ``False``, labels + the edges by pairs `(i, j)`; if ``True``, labels the edges by ``word[i:j]`` + - ``layout`` -- (default: ``'tree'``) + - ``tree_root`` -- (default: 0) + - ``tree_orientation`` -- (default: ``'up'``) + - ``vertex_colors`` -- (default: ``None``) + - ``edge_labels`` -- (default: ``True``) EXAMPLES:: @@ -908,9 +906,8 @@ def show(self, word_labels=None, *args, **kwds): INPUT: - - ``word_labels`` -- (default: ``None``) if ``False``, labels the - edges by pairs `(i, j)`; if ``True``, labels the edges by - ``word[i:j]``. + - ``word_labels`` -- (default: ``None``) if ``False``, labels the edges + by pairs `(i, j)`; if ``True``, labels the edges by ``word[i:j]`` EXAMPLES:: @@ -1150,7 +1147,7 @@ def number_of_factors(self, n=None): INPUT: - - ``n`` -- an integer, or ``None``. + - ``n`` -- integer, or ``None`` OUTPUT: @@ -1236,7 +1233,7 @@ def factor_iterator(self, n=None): INPUT: - - ``n`` -- an integer, or ``None``. + - ``n`` -- integer, or ``None`` OUTPUT: @@ -1686,7 +1683,7 @@ def node_processing(node, parent, head): - ``node`` -- a node of ``self`` - ``parent`` -- the parent of a node in ``self`` - - ``head`` -- a tuple indicating the head of the list ``P(node)`` + - ``head`` -- tuple indicating the head of the list ``P(node)`` OUTPUT: ``(i, pos)``, the new head of ``P(node)`` """ diff --git a/src/sage/combinat/words/word.py b/src/sage/combinat/words/word.py index d31d881cceb..2470ee0c00f 100644 --- a/src/sage/combinat/words/word.py +++ b/src/sage/combinat/words/word.py @@ -47,31 +47,31 @@ def Word(data=None, alphabet=None, length=None, datatype=None, caching=True, RSK INPUT: - - ``data`` -- (default: ``None``) list, string, tuple, iterator, free - monoid element, ``None`` (shorthand for ``[]``), or a callable defined - on ``[0,1,...,length]`` - - - ``alphabet`` -- any argument accepted by Words - - - ``length`` -- (default: ``None``) This is dependent on the type of data. - It is ignored for words defined by lists, strings, tuples, - etc., because they have a naturally defined length. - For callables, this defines the domain of definition, - which is assumed to be ``[0, 1, 2, ..., length-1]``. - For iterators: Infinity if you know the iterator will not - terminate (default); ``'unknown'`` if you do not know whether the - iterator terminates; ``'finite'`` if you know that the iterator - terminates, but do not know the length. - - - ``datatype`` -- (default: ``None``) ``None``, ``'list'``, ``'str'``, - ``'tuple'``, ``'iter'``, ``'callable'``; if ``None``, then the function - tries to guess this from the data - - - ``caching`` -- boolean (default: ``True``); whether to - keep a cache of the letters computed by an iterator or callable - - - ``RSK_data`` -- (default: ``None``) semistandard and a - standard Young tableau to run the inverse RSK bijection on + - ``data`` -- (default: ``None``) list, string, tuple, iterator, free + monoid element, ``None`` (shorthand for ``[]``), or a callable defined + on ``[0,1,...,length]`` + + - ``alphabet`` -- any argument accepted by Words + + - ``length`` -- (default: ``None``) this is dependent on the type of data. + It is ignored for words defined by lists, strings, tuples, + etc., because they have a naturally defined length. + For callables, this defines the domain of definition, + which is assumed to be ``[0, 1, 2, ..., length-1]``. + For iterators: Infinity if you know the iterator will not + terminate (default); ``'unknown'`` if you do not know whether the + iterator terminates; ``'finite'`` if you know that the iterator + terminates, but do not know the length. + + - ``datatype`` -- (default: ``None``) ``None``, ``'list'``, ``'str'``, + ``'tuple'``, ``'iter'``, ``'callable'``; if ``None``, then the function + tries to guess this from the data + + - ``caching`` -- boolean (default: ``True``); whether to + keep a cache of the letters computed by an iterator or callable + + - ``RSK_data`` -- (default: ``None``) semistandard and a + standard Young tableau to run the inverse RSK bijection on .. NOTE:: diff --git a/src/sage/combinat/words/word_char.pyx b/src/sage/combinat/words/word_char.pyx index 7059f8a5575..3a1fcc9812b 100644 --- a/src/sage/combinat/words/word_char.pyx +++ b/src/sage/combinat/words/word_char.pyx @@ -505,7 +505,7 @@ cdef class WordDatatype_char(WordDatatype): INPUT: - - ``exp`` -- an integer, a rational, a float number or plus infinity + - ``exp`` -- integer, rational, float, or plus infinity TESTS:: diff --git a/src/sage/combinat/words/word_datatypes.pyx b/src/sage/combinat/words/word_datatypes.pyx index 09fc21da72e..d25dee491af 100644 --- a/src/sage/combinat/words/word_datatypes.pyx +++ b/src/sage/combinat/words/word_datatypes.pyx @@ -267,7 +267,7 @@ cdef class WordDatatype_list(WordDatatype): INPUT: - - ``a`` -- a letter + - ``a`` -- a letter OUTPUT: integer @@ -435,12 +435,12 @@ cdef class WordDatatype_str(WordDatatype): INPUT: - - ``sub`` -- string or word to search for. - - ``start`` -- nonnegative integer (default: 0) specifying - the position from which to start the search. - - ``end`` -- nonnegative integer (default: ``None``); specifying - the position at which the search must stop. If ``None``, then - the search is performed up to the end of the string. + - ``sub`` -- string or word to search for + - ``start`` -- nonnegative integer (default: 0) specifying + the position from which to start the search. + - ``end`` -- nonnegative integer (default: ``None``); specifying + the position at which the search must stop. If ``None``, then + the search is performed up to the end of the string. OUTPUT: nonnegative integer or `-1` @@ -471,12 +471,12 @@ cdef class WordDatatype_str(WordDatatype): INPUT: - - ``sub`` -- string or word to search for. - - ``start`` -- nonnegative integer (default: 0) specifying - the position at which the search must stop. - - ``end`` -- nonnegative integer (default: ``None``); specifying - the position from which to start the search. If ``None``, then - the search is performed up to the end of the string. + - ``sub`` -- string or word to search for + - ``start`` -- nonnegative integer (default: 0) specifying + the position at which the search must stop. + - ``end`` -- nonnegative integer (default: ``None``); specifying + the position from which to start the search. If ``None``, then + the search is performed up to the end of the string. OUTPUT: nonnegative integer or `-1` @@ -733,7 +733,7 @@ cdef class WordDatatype_str(WordDatatype): INPUT: - ``other`` -- a word (an instance of :class:`Word_class`) or a - :class:`str`. + :class:`str` OUTPUT: boolean @@ -771,7 +771,7 @@ cdef class WordDatatype_str(WordDatatype): INPUT: - ``other`` -- a word (an instance of :class:`Word_class`) or a - :class:`str`. + :class:`str` OUTPUT: boolean @@ -800,7 +800,7 @@ cdef class WordDatatype_str(WordDatatype): INPUT: - ``other`` -- a word (an instance of :class:`Word_class`) or a - :class:`str`. + :class:`str` OUTPUT: boolean @@ -837,7 +837,7 @@ cdef class WordDatatype_str(WordDatatype): INPUT: - ``other`` -- a word (an instance of :class:`Word_class`) or a - :class:`str`. + :class:`str` OUTPUT: boolean diff --git a/src/sage/combinat/words/word_generators.py b/src/sage/combinat/words/word_generators.py index f8306b5fba2..591122c99a3 100644 --- a/src/sage/combinat/words/word_generators.py +++ b/src/sage/combinat/words/word_generators.py @@ -377,10 +377,10 @@ def ThueMorseWord(self, alphabet=(0, 1), base=2): INPUT: - - ``alphabet`` -- (default: (0, 1) ) any container that is suitable to - build an instance of OrderedAlphabet (list, tuple, str, ...) + - ``alphabet`` -- (default: ``(0, 1)``) any container that is suitable + to build an instance of OrderedAlphabet (list, tuple, str, ...) - - ``base`` -- an integer (default: 2); greater than or equal to 2 + - ``base`` -- integer (default: 2); greater than or equal to 2 EXAMPLES: @@ -495,11 +495,11 @@ def FibonacciWord(self, alphabet=(0, 1), construction_method='recursive'): INPUT: - - ``alphabet`` -- any container of length two that is suitable to - build an instance of OrderedAlphabet (list, tuple, str, ...) + - ``alphabet`` -- any container of length two that is suitable to + build an instance of OrderedAlphabet (list, tuple, str, ...) - - ``construction_method`` -- can be any of the following: - "recursive", "fixed point", "function" (see below for definitions). + - ``construction_method`` -- can be any of the following: + "recursive", "fixed point", "function" (see below for definitions) Recursive construction: the Fibonacci word is the limit of the following sequence of words: `S_0 = 0`, `S_1 = 01`, @@ -625,11 +625,11 @@ def FixedPointOfMorphism(self, morphism, first_letter): INPUT: - - ``morphism`` -- endomorphism prolongable on ``first_letter``. It - must be something that WordMorphism's constructor understands - (dict, str, ...). + - ``morphism`` -- endomorphism prolongable on ``first_letter``. It + must be something that WordMorphism's constructor understands + (dict, str, ...). - - ``first_letter`` -- the first letter of the fixed point + - ``first_letter`` -- the first letter of the fixed point OUTPUT: the fixed point of the morphism beginning with ``first_letter`` @@ -744,19 +744,19 @@ def CharacteristicSturmianWord(self, slope, alphabet=(0, 1), bits=None): INPUT: - - ``slope`` -- the slope of the word. It can be one of the following: + - ``slope`` -- the slope of the word. It can be one of the following: - - real number in `]0, 1[` + - real number in `]0, 1[` - - iterable over the continued fraction expansion of a real - number in `]0, 1[` + - iterable over the continued fraction expansion of a real + number in `]0, 1[` - - ``alphabet`` -- any container of length two that is suitable to - build an instance of OrderedAlphabet (list, tuple, str, ...) + - ``alphabet`` -- any container of length two that is suitable to + build an instance of OrderedAlphabet (list, tuple, str, ...) - - ``bits`` -- integer (optional and considered only if ``slope`` is - a real number) the number of bits to consider when computing the - continued fraction. + - ``bits`` -- integer (optional and considered only if ``slope`` is + a real number); the number of bits to consider when computing the + continued fraction OUTPUT: word @@ -987,8 +987,8 @@ def KolakoskiWord(self, alphabet=(1,2)): INPUT: - - ``alphabet`` -- (default: (1,2)) an iterable of two positive - integers + - ``alphabet`` -- (default: (1,2)) an iterable of two positive + integers OUTPUT: infinite word @@ -1063,10 +1063,10 @@ def _KolakoskiWord_iterator(self, a=1, b=2): INPUT: - - ``a`` -- positive integer (default: 1), the first letter occurring - in the returned Kolakoski word. - - ``b`` -- positive integer (default: 2), the second and last letter - occurring in the returned Kolakoski word. + - ``a`` -- positive integer (default: 1); the first letter occurring + in the returned Kolakoski word + - ``b`` -- positive integer (default: 2); the second and last letter + occurring in the returned Kolakoski word OUTPUT: iterator @@ -1237,8 +1237,8 @@ def StandardEpisturmianWord(self, directive_word): INPUT: - - ``directive_word`` -- an infinite word or a period of a periodic - infinite word + - ``directive_word`` -- an infinite word or a period of a periodic + infinite word EXAMPLES:: @@ -1283,9 +1283,9 @@ def _StandardEpisturmianWord_LetterIterator(self, directive_word): INPUT: - - ``directive_word`` -- an infinite word or a finite word. If - directive_word is finite, then it is repeated to give - an infinite word. + - ``directive_word`` -- an infinite word or a finite word; if + directive_word is finite, then it is repeated to give + an infinite word TESTS:: @@ -1355,9 +1355,9 @@ def RandomWord(self, n, m=2, alphabet=None): - ``n`` -- integer; the length of the word - ``m`` -- integer (default: 2), the size of the output alphabet - - ``alphabet`` -- (default: `\{0,1,...,m-1\}`) any container of - length m that is suitable to build an instance of - OrderedAlphabet (list, tuple, str, ...) + - ``alphabet`` -- (default: `\{0,1,...,m-1\}`) any container of + length m that is suitable to build an instance of + OrderedAlphabet (list, tuple, str, ...) EXAMPLES:: @@ -1406,9 +1406,8 @@ def UpperChristoffelWord(self, p, q, alphabet=(0,1)): INPUT: - - ``alphabet`` -- any container of length two that is - suitable to build an instance of OrderedAlphabet (list, tuple, str, - ...) + - ``alphabet`` -- any container of length two that is suitable to build + an instance of OrderedAlphabet (list, tuple, str, ...) EXAMPLES:: diff --git a/src/sage/combinat/words/word_infinite_datatypes.py b/src/sage/combinat/words/word_infinite_datatypes.py index f6e7e652764..d36b3f80976 100644 --- a/src/sage/combinat/words/word_infinite_datatypes.py +++ b/src/sage/combinat/words/word_infinite_datatypes.py @@ -27,8 +27,8 @@ def __init__(self, parent, callable, length=None): INPUT: - ``parent`` -- a parent - - ``callable`` -- a callable defined on ``range(stop=length)`` - - ``length`` -- (default: ``None``) nonnegative integer or ``None`` + - ``callable`` -- a callable defined on ``range(stop=length)`` + - ``length`` -- (default: ``None``) nonnegative integer or ``None`` EXAMPLES:: @@ -323,8 +323,8 @@ def __init__(self, parent, callable, length=None): INPUT: - ``parent`` -- a parent - - ``callable`` -- a callable defined on ``range(stop=length)`` - - ``length`` -- (default: ``None``) nonnegative integer or ``None`` + - ``callable`` -- a callable defined on ``range(stop=length)`` + - ``length`` -- (default: ``None``) nonnegative integer or ``None`` EXAMPLES:: @@ -589,8 +589,8 @@ def __init__(self, parent, iter, length=None): INPUT: - ``parent`` -- a parent - - ``iter`` -- an iterator - - ``length`` -- (default: ``None``) the length of the word + - ``iter`` -- an iterator + - ``length`` -- (default: ``None``) the length of the word EXAMPLES:: @@ -922,8 +922,8 @@ def __init__(self, parent, iter, length=None): INPUT: - ``parent`` -- a parent - - ``iter`` -- an iterator - - ``length`` -- (default: ``None``) the length of the word + - ``iter`` -- an iterator + - ``length`` -- (default: ``None``) the length of the word EXAMPLES:: diff --git a/src/sage/combinat/words/word_options.py b/src/sage/combinat/words/word_options.py index dd2c4b0d610..c740526a4ba 100644 --- a/src/sage/combinat/words/word_options.py +++ b/src/sage/combinat/words/word_options.py @@ -29,16 +29,16 @@ def WordOptions(**kwargs): INPUT: - - ``display`` -- 'string' (default), or 'list', words are displayed in - string or list notation. - - ``truncate`` -- boolean (default: ``True``); whether to truncate the string - output of long words (see truncate_length below). - - ``truncate_length`` -- integer (default: 40); if the length of the word - is greater than this integer, then the word is truncated. - - ``letter_separator`` -- (string, default: ",") if the string - representation of letters have length greater than 1, then - the letters are separated by this string in the string - representation of the word. + - ``display`` -- 'string' (default), or 'list', words are displayed in + string or list notation + - ``truncate`` -- boolean (default: ``True``); whether to truncate the string + output of long words (see truncate_length below) + - ``truncate_length`` -- integer (default: 40); if the length of the word + is greater than this integer, then the word is truncated + - ``letter_separator`` -- string (default: ``','``); if the string + representation of letters have length greater than 1, then + the letters are separated by this string in the string + representation of the word If no parameters are set, then the function returns a copy of the options dictionary. diff --git a/src/sage/combinat/words/words.py b/src/sage/combinat/words/words.py index 0d37cc77b20..894c4f564db 100644 --- a/src/sage/combinat/words/words.py +++ b/src/sage/combinat/words/words.py @@ -445,7 +445,7 @@ def _word_from_word(self, data): INPUT: - - ``data`` -- word + - ``data`` -- word EXAMPLES:: @@ -508,10 +508,10 @@ def _word_from_callable(self, data, length, caching=True): INPUT: - - ``data`` -- callable - - ``length`` -- integer or ``None`` or "infinite" or ``Infinity`` - - ``caching`` -- boolean (default: ``True``); whether to keep a cache - of the letters computed by the callable + - ``data`` -- callable + - ``length`` -- integer or ``None`` or "infinite" or ``Infinity`` + - ``caching`` -- boolean (default: ``True``); whether to keep a cache + of the letters computed by the callable EXAMPLES:: @@ -533,12 +533,12 @@ def _word_from_iter(self, data, length=None, caching=True): INPUT: - - ``data`` -- iterable + - ``data`` -- iterable - - ``length`` -- (optional) integer + - ``length`` -- (optional) integer - - ``caching`` -- boolean (default: ``True``); whether to keep a cache - of the letters computed by the iterator + - ``caching`` -- boolean (default: ``True``); whether to keep a cache + of the letters computed by the iterator EXAMPLES:: @@ -561,24 +561,24 @@ def __call__(self, data=None, length=None, datatype=None, caching=True, check=Tr INPUT: - - ``data`` -- (default: ``None``) list, string, tuple, iterator, ``None`` - (shorthand for []), or a callable defined on [0,1,...,length] + - ``data`` -- (default: ``None``) list, string, tuple, iterator, ``None`` + (shorthand for []), or a callable defined on [0,1,...,length] - - ``length`` -- integer (default: ``None``); only used if the data is an iterator or - a callable. It determines the length of the word. + - ``length`` -- integer (default: ``None``); only used if the data is + an iterator or a callable. It determines the length of the word - - ``datatype`` -- (default: ``None``) ``None``, "char", "list", "str", - "tuple", "iter", "callable" or "pickled_function"; if ``None``, then - the function tries to guess this from the data + - ``datatype`` -- (default: ``None``) ``None``, "char", "list", "str", + "tuple", "iter", "callable" or "pickled_function"; if ``None``, then + the function tries to guess this from the data - - ``caching`` -- boolean (default: ``True``); whether to keep a cache - of the letters computed by an iterator or callable + - ``caching`` -- boolean (default: ``True``); whether to keep a cache + of the letters computed by an iterator or callable - - ``check`` -- boolean (default: ``True``); whether to check if - the 40 first letters are in the parent alphabet. This is a - check done to test for small programming errors. Since we also - support infinite words, we cannot really implement a more - accurate check. + - ``check`` -- boolean (default: ``True``); whether to check if + the 40 first letters are in the parent alphabet. This is a + check done to test for small programming errors. Since we also + support infinite words, we cannot really implement a more + accurate check. .. NOTE:: @@ -996,8 +996,8 @@ def random_element(self, length=None, *args, **kwds): INPUT: - - ``length`` -- (optional) the length of the word. If not set, will use - a uniformly random number between 0 and 10. + - ``length`` -- (optional) the length of the word; if not set, will use + a uniformly random number between 0 and 10 - all other argument are transmitted to the random generator of the alphabet @@ -1030,23 +1030,23 @@ def iter_morphisms(self, arg=None, codomain=None, min_length=1): INPUT: - - ``arg`` -- (default: ``None``) It can be one of the following: + - ``arg`` -- (default: ``None``) it can be one of the following: - ``None`` -- then the method iterates through all morphisms - - tuple `(a, b)` of two integers -- It specifies the range + - tuple `(a, b)` of two integers -- it specifies the range ``range(a, b)`` of values to consider for the sum of the length - of the image of each letter in the alphabet. + of the image of each letter in the alphabet - - list of nonnegative integers -- The length of the list must be - equal to the size of the alphabet, and the i-th integer of - ``arg`` determines the length of the word mapped to by the i-th - letter of the (ordered) alphabet. + - list of nonnegative integers -- the length of the list must be + equal to the size of the alphabet, and the `i`-th integer of + ``arg`` determines the length of the word mapped to by the `i`-th + letter of the (ordered) alphabet - - ``codomain`` -- (default: ``None``) a combinatorial class of words. - By default, ``codomain`` is ``self``. + - ``codomain`` -- (default: ``None``) a combinatorial class of words; + by default, ``codomain`` is ``self`` - - ``min_length`` -- (default: 1) nonnegative integer. If ``arg`` is + - ``min_length`` -- nonnegative integer (default: 1); if ``arg`` is not specified, then iterate through all the morphisms where the length of the images of each letter in the alphabet is at least ``min_length``. This is ignored if ``arg`` is a list. @@ -1381,7 +1381,7 @@ def _word_from_word(self, data): INPUT: - - ``data`` -- word + - ``data`` -- word EXAMPLES:: @@ -1427,10 +1427,10 @@ def _word_from_callable(self, data, caching=True): INPUT: - - ``data`` -- callable + - ``data`` -- callable - - ``caching`` -- boolean (default: ``True``); whether to keep a cache - of the letters computed by the callable + - ``caching`` -- boolean (default: ``True``); whether to keep a cache + of the letters computed by the callable EXAMPLES:: @@ -1450,10 +1450,10 @@ def _word_from_iter(self, data, caching=True): INPUT: - - ``data`` -- iterable + - ``data`` -- iterable - - ``caching`` -- boolean (default: ``True``); whether to keep a cache - of the letters computed by the iterator + - ``caching`` -- boolean (default: ``True``); whether to keep a cache + of the letters computed by the iterator EXAMPLES:: @@ -1471,20 +1471,20 @@ def __call__(self, data=None, datatype=None, caching=True, check=True): INPUT: - - ``data`` -- iterator or a callable + - ``data`` -- iterator or a callable - - ``datatype`` -- (default: ``None``) ``None``, "iter", "callable" or - "pickled_function". If ``None``, then the function tries to guess - this from the data. + - ``datatype`` -- (default: ``None``) ``None``, "iter", "callable" or + "pickled_function"; if ``None``, then the function tries to guess + this from the data - - ``caching`` -- boolean (default: ``True``); whether to keep a - cache of the letters computed by an iterator or callable + - ``caching`` -- boolean (default: ``True``); whether to keep a + cache of the letters computed by an iterator or callable - - ``check`` -- boolean (default: ``True``); whether to check if - the 40 first letters are in the parent alphabet. This is a - check done to test for small programming errors. Since we also - support infinite words, we cannot really implement a more - accurate check. + - ``check`` -- boolean (default: ``True``); whether to check if + the 40 first letters are in the parent alphabet. This is a + check done to test for small programming errors. Since we also + support infinite words, we cannot really implement a more + accurate check. .. NOTE:: @@ -1772,31 +1772,31 @@ def __call__(self, data=None, length=None, datatype=None, caching=True, check=Tr INPUT: - - ``data`` -- (default: ``None``) list, string, tuple, iterator, ``None`` - (shorthand for []), or a callable defined on [0,1,...,length]. + - ``data`` -- (default: ``None``) list, string, tuple, iterator, ``None`` + (shorthand for []), or a callable defined on [0,1,...,length] - - ``length`` -- (default: ``None``) this is dependent on the type of data. - It is ignored for words defined by lists, strings, tuples, - etc., because they have a naturally defined length. - For callables, this defines the domain of definition, - which is assumed to be [0, 1, 2, ..., length-1]. - For iterators: Infinity if you know the iterator will not - terminate (default); "unknown" if you do not know whether the - iterator terminates; "finite" if you know that the iterator - terminates, but do not know the length. + - ``length`` -- (default: ``None``) this is dependent on the type of data. + It is ignored for words defined by lists, strings, tuples, + etc., because they have a naturally defined length. + For callables, this defines the domain of definition, + which is assumed to be [0, 1, 2, ..., length-1]. + For iterators: Infinity if you know the iterator will not + terminate (default); "unknown" if you do not know whether the + iterator terminates; "finite" if you know that the iterator + terminates, but do not know the length. - - ``datatype`` -- (default: ``None``) ``None``, "char", "list", "str", - "tuple", "iter", "callable" or "pickled_function". If ``None``, then - the function tries to guess this from the data. + - ``datatype`` -- (default: ``None``) ``None``, "char", "list", "str", + "tuple", "iter", "callable" or "pickled_function"; if ``None``, then + the function tries to guess this from the data. - - ``caching`` -- boolean (default: ``True``); whether to keep a cache - of the letters computed by an iterator or callable + - ``caching`` -- boolean (default: ``True``); whether to keep a cache + of the letters computed by an iterator or callable - - ``check`` -- boolean (default: ``True``); whether to check if - the 40 first letters are in the parent alphabet. This is a - check done to test for small programming errors. Since we also - support infinite words, we cannot really implement a more - accurate check. + - ``check`` -- boolean (default: ``True``); whether to check if + the 40 first letters are in the parent alphabet. This is a + check done to test for small programming errors. Since we also + support infinite words, we cannot really implement a more + accurate check. .. NOTE:: @@ -2073,9 +2073,9 @@ def __init__(self, words, n): r""" INPUT: - - ``words`` -- a set of finite words + - ``words`` -- set of finite words - - ``n`` -- a nonnegative integer + - ``n`` -- nonnegative integer TESTS:: diff --git a/src/sage/combinat/yang_baxter_graph.py b/src/sage/combinat/yang_baxter_graph.py index 6d90493b3fd..c064ecfedcd 100644 --- a/src/sage/combinat/yang_baxter_graph.py +++ b/src/sage/combinat/yang_baxter_graph.py @@ -125,7 +125,7 @@ def __init__(self, root, operators): - ``root`` -- the root vertex of the graph - ``operators`` -- list of callables that map vertices to (new) - vertices. + vertices .. NOTE:: @@ -519,7 +519,7 @@ def relabel_edges(self, edge_dict, inplace=True): INPUT: - - ``edge_dict`` -- a dictionary keyed by the (unlabelled) edges. + - ``edge_dict`` -- dictionary keyed by the (unlabelled) edges EXAMPLES::