diff --git a/src/sage/algebras/commutative_dga.py b/src/sage/algebras/commutative_dga.py index abd4775a084..7e1a158fd7c 100644 --- a/src/sage/algebras/commutative_dga.py +++ b/src/sage/algebras/commutative_dga.py @@ -2874,12 +2874,12 @@ def extendy(phi, degree): def cohomology_algebra(self, max_degree=3): """ Compute a CDGA with trivial differential, that is isomorphic to the cohomology of - self up to``max_degree`` + ``self`` up to``max_degree`` INPUT: - ``max_degree`` -- integer (default: `3`); degree to which the result is required to - be isomorphic to self's cohomology. + be isomorphic to ``self``'s cohomology EXAMPLES:: diff --git a/src/sage/algebras/free_algebra_element.py b/src/sage/algebras/free_algebra_element.py index 3d6889cf96c..0d11259f08d 100644 --- a/src/sage/algebras/free_algebra_element.py +++ b/src/sage/algebras/free_algebra_element.py @@ -84,7 +84,7 @@ def __init__(self, A, x): def _repr_(self): """ - Return string representation of self. + Return string representation of ``self``. EXAMPLES:: @@ -109,7 +109,7 @@ def _repr_(self): def _latex_(self): r""" - Return latex representation of self. + Return latex representation of ``self``. EXAMPLES:: diff --git a/src/sage/algebras/free_algebra_quotient_element.py b/src/sage/algebras/free_algebra_quotient_element.py index c4ade5274b2..942ed63557e 100644 --- a/src/sage/algebras/free_algebra_quotient_element.py +++ b/src/sage/algebras/free_algebra_quotient_element.py @@ -181,7 +181,7 @@ def _richcmp_(self, right, op): def __neg__(self): """ - Return negative of self. + Return negative of ``self``. EXAMPLES:: diff --git a/src/sage/algebras/free_zinbiel_algebra.py b/src/sage/algebras/free_zinbiel_algebra.py index 720ee803d9b..b1dc4a6d95d 100644 --- a/src/sage/algebras/free_zinbiel_algebra.py +++ b/src/sage/algebras/free_zinbiel_algebra.py @@ -535,7 +535,7 @@ def _coerce_map_from_(self, R): The things that coerce into ``self`` are - free Zinbiel algebras whose set `E` of labels is - a subset of the corresponding self of ``set`, and whose base + a subset of the corresponding ``self`` of ``set`, and whose base ring has a coercion map into ``self.base_ring()`` EXAMPLES:: diff --git a/src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py b/src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py index 347d526d11a..df6cb4cacda 100644 --- a/src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py +++ b/src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py @@ -590,7 +590,7 @@ def mirror_involution(self): def create_specialization(self, im_cubic_equation_roots, im_writhe_parameter=None, var='T', third_unity_root_name='E3'): r""" Return an appropriate ring containing the elements from the list - ``im_cubic_equation_roots`` defining a conversion map from self mapping + ``im_cubic_equation_roots`` defining a conversion map from ``self`` mapping the cubic equation roots of ``self`` to ``im_cubic_equation_roots``. INPUT: diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx index 57e51552d4d..d434e464f2a 100644 --- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx @@ -399,7 +399,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement): def lm_divides(self, FreeAlgebraElement_letterplace p): """ - Tell whether or not the leading monomial of self divides the + Tell whether or not the leading monomial of ``self`` divides the leading monomial of another element. .. NOTE:: diff --git a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx index dc9a23a0682..13dc0586794 100644 --- a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx @@ -697,14 +697,14 @@ cdef class FreeAlgebra_letterplace(Parent): # Coercion cpdef _coerce_map_from_(self, S): """ - A ring ``R`` coerces into self, if + A ring ``R`` coerces into ``self``, if - it coerces into the current polynomial ring, or - it is a free graded algebra in letterplace implementation, the generator names of ``R`` are a proper subset of the - generator names of self, the degrees of equally named + generator names of ``self``, the degrees of equally named generators are equal, and the base ring of ``R`` coerces - into the base ring of self. + into the base ring of ``self``. TESTS: diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 67cde70ca2f..0752434df35 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -1069,7 +1069,7 @@ def is_definite(self): def __eq__(self, other): """ - Compare self and other. + Compare ``self`` and ``other``. EXAMPLES:: @@ -1085,7 +1085,7 @@ def __eq__(self, other): def __ne__(self, other): """ - Compare self and other. + Compare ``self`` and ``other``. EXAMPLES:: @@ -2922,12 +2922,12 @@ def __hash__(self): @cached_method def basis_matrix(self): r""" - Return basis matrix `M` in Hermite normal form for self as a + Return basis matrix `M` in Hermite normal form for ``self`` as a matrix with rational entries. If `Q` is the ambient quaternion algebra, then the `\ZZ`-span of the rows of `M` viewed as linear combinations of Q.basis() = - `[1,i,j,k]` is the fractional ideal self. Also, + `[1,i,j,k]` is the fractional ideal ``self``. Also, ``M * M.denominator()`` is an integer matrix in Hermite normal form. OUTPUT: matrix over `\QQ` @@ -3328,7 +3328,7 @@ def free_module(self): def intersection(self, J): """ - Return the intersection of the ideals self and `J`. + Return the intersection of the ideals ``self`` and `J`. EXAMPLES:: @@ -3344,7 +3344,7 @@ def intersection(self, J): def multiply_by_conjugate(self, J): """ - Return product of self and the conjugate Jbar of `J`. + Return product of ``self`` and the conjugate Jbar of `J`. INPUT: @@ -3778,7 +3778,7 @@ def cyclic_right_subideals(self, p, alpha=None): :class:`NotImplementedError` is raised. In particular, `p` must be odd and unramified in the quaternion algebra, must be coprime to the index of the right order in the maximal - order, and also coprime to the normal of self. (The Brandt + order, and also coprime to the normal of ``self``. (The Brandt modules code has a more general algorithm in some cases.) EXAMPLES:: diff --git a/src/sage/algebras/quatalg/quaternion_algebra_element.pyx b/src/sage/algebras/quatalg/quaternion_algebra_element.pyx index ef870a6984c..46f4ba8c7f0 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra_element.pyx +++ b/src/sage/algebras/quatalg/quaternion_algebra_element.pyx @@ -540,7 +540,7 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement): cpdef _div_(self, right): """ - Return quotient of self by right. + Return quotient of ``self`` by ``right``. EXAMPLES:: @@ -585,15 +585,15 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement): def matrix(self, action='right'): """ - Return the matrix of right or left multiplication of self on + Return the matrix of right or left multiplication of ``self`` on the basis for the ambient quaternion algebra. - In particular, if action is 'right' (the default), returns the - matrix of the mapping sending x to x*self. + In particular, if action is ``'right'`` (the default), returns the + matrix of the mapping sending ``x`` to ``x*self``. INPUT: - - ``action`` -- (default: ``'right'``) 'right' or 'left'. + - ``action`` -- (default: ``'right'``) ``'right'`` or ``'left'`` OUTPUT: a matrix @@ -659,9 +659,9 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement): def pair(self, right): """ - Return the result of pairing self and right, which should both + Return the result of pairing ``self`` and ``right``, which should both be elements of a quaternion algebra. The pairing is - (x,y) = (x.conjugate()*y).reduced_trace(). + ``(x,y) = (x.conjugate()*y).reduced_trace()``. INPUT: @@ -794,7 +794,7 @@ cdef class QuaternionAlgebraElement_generic(QuaternionAlgebraElement_abstract): cpdef _add_(self, _right): """ - Return the sum of self and _right. + Return the sum of ``self`` and ``_right``. EXAMPLES:: @@ -810,7 +810,7 @@ cdef class QuaternionAlgebraElement_generic(QuaternionAlgebraElement_abstract): cpdef _sub_(self, _right): """ - Return the difference of self and _right. + Return the difference of ``self`` and ``_right``. EXAMPLES:: @@ -825,7 +825,7 @@ cdef class QuaternionAlgebraElement_generic(QuaternionAlgebraElement_abstract): cpdef _mul_(self, _right): """ - Return the product of self and _right. + Return the product of ``self`` and ``_right``. EXAMPLES:: @@ -1432,7 +1432,7 @@ cdef class QuaternionAlgebraElement_rational_field(QuaternionAlgebraElement_abst """ Return the reduced trace of ``self``. - This is `2x` if self is `x+iy+zj+wk`. + This is `2x` if ``self`` is `x+iy+zj+wk`. EXAMPLES:: @@ -1598,7 +1598,7 @@ cdef class QuaternionAlgebraElement_rational_field(QuaternionAlgebraElement_abst def _multiply_by_integer(self, Integer n): """ - Return the product of self times the integer n. + Return the product of ``self`` times the integer `n`. EXAMPLES:: @@ -1635,7 +1635,7 @@ cdef class QuaternionAlgebraElement_rational_field(QuaternionAlgebraElement_abst def _divide_by_integer(self, Integer n): """ - Return the quotient of self by the integer n. + Return the quotient of ``self`` by the integer `n`. EXAMPLES:: @@ -1806,7 +1806,7 @@ cdef class QuaternionAlgebraElement_number_field(QuaternionAlgebraElement_abstra cpdef _add_(self, _right): """ - Add self and _right: + Add ``self`` and ``_right``: EXAMPLES:: @@ -1931,7 +1931,7 @@ cdef class QuaternionAlgebraElement_number_field(QuaternionAlgebraElement_abstra cpdef _mul_(self, _right): """ - Multiply self and _right. + Multiply ``self`` and ``_right``. EXAMPLES:: diff --git a/src/sage/algebras/steenrod/steenrod_algebra.py b/src/sage/algebras/steenrod/steenrod_algebra.py index ccfbed0fd86..6c982c824b9 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra.py +++ b/src/sage/algebras/steenrod/steenrod_algebra.py @@ -2135,7 +2135,7 @@ def _element_constructor_(self, x): def __contains__(self, x): r""" - Return ``True`` if self contains `x`. + Return ``True`` if ``self`` contains `x`. EXAMPLES:: @@ -3193,7 +3193,7 @@ def is_homogeneous(self): def degree(self): r""" - The degree of self. + The degree of ``self``. The degree of `\text{Sq}(i_1,i_2,i_3,...)` is @@ -3287,9 +3287,9 @@ def change_basis(self, basis='milnor'): INPUT: - - ``basis`` -- string, basis in which to work + - ``basis`` -- string; basis in which to work - OUTPUT: representation of self in given basis + OUTPUT: representation of ``self`` in given basis The choices for ``basis`` are: @@ -3331,7 +3331,7 @@ def change_basis(self, basis='milnor'): def _basis_dictionary(self, basis): r""" - Convert self to ``basis``, returning a dictionary of terms of + Convert ``self`` to ``basis``, returning a dictionary of terms of the form (mono: coeff), where mono is a monomial in the given basis. diff --git a/src/sage/calculus/functional.py b/src/sage/calculus/functional.py index 83dd51732c1..4468348ce7b 100644 --- a/src/sage/calculus/functional.py +++ b/src/sage/calculus/functional.py @@ -380,7 +380,7 @@ def limit(f, dir=None, taylor=False, **argv): def taylor(f, *args): """ - Expands self in a truncated Taylor or Laurent series in the + Expand ``self`` in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. Functions in more variables are also supported. diff --git a/src/sage/categories/additive_magmas.py b/src/sage/categories/additive_magmas.py index 366aaeb3e16..b5cb3ceff62 100644 --- a/src/sage/categories/additive_magmas.py +++ b/src/sage/categories/additive_magmas.py @@ -651,7 +651,7 @@ class ParentMethods: def _test_zero(self, **options): r""" - Test that ``self.zero()`` is an element of self and + Test that ``self.zero()`` is an element of ``self`` and is neutral for the addition. INPUT: diff --git a/src/sage/categories/category.py b/src/sage/categories/category.py index c7cafb21230..ff69d95377c 100644 --- a/src/sage/categories/category.py +++ b/src/sage/categories/category.py @@ -1757,7 +1757,7 @@ def required_methods(self): # Operations on the lattice of categories def is_subcategory(self, c): """ - Return ``True`` if self is naturally embedded as a subcategory of `c`. + Return ``True`` if ``self`` is naturally embedded as a subcategory of `c`. EXAMPLES:: @@ -1876,7 +1876,7 @@ def _is_subclass(self, c): @cached_method def _meet_(self, other): """ - Return the largest common subcategory of self and other. + Return the largest common subcategory of ``self`` and ``other``. EXAMPLES:: @@ -1909,7 +1909,7 @@ def _meet_(self, other): distributivity. For the meet computation, there may be several lowest common - sub categories of self and other, in which case, we need to + sub categories of ``self`` and ``other``, in which case, we need to take the join of them all. FIXME: diff --git a/src/sage/categories/category_types.py b/src/sage/categories/category_types.py index f26776a216a..3493f7b1ea9 100644 --- a/src/sage/categories/category_types.py +++ b/src/sage/categories/category_types.py @@ -386,7 +386,7 @@ def _subcategory_hook_(self, C): OUTPUT: A boolean if it is certain that ``C`` is (or is not) a - subcategory of self. :obj:`~sage.misc.unknown.Unknown` + subcategory of ``self``. :obj:`~sage.misc.unknown.Unknown` otherwise. EXAMPLES: diff --git a/src/sage/categories/coxeter_groups.py b/src/sage/categories/coxeter_groups.py index e1639f0d734..af3e7dc41be 100644 --- a/src/sage/categories/coxeter_groups.py +++ b/src/sage/categories/coxeter_groups.py @@ -592,7 +592,7 @@ def standard_coxeter_elements(self): r""" Return all standard Coxeter elements in ``self``. - This is the set of all elements in self obtained from any + This is the set of all elements in ``self`` obtained from any product of the simple reflections in ``self``. .. NOTE:: @@ -1312,7 +1312,7 @@ def _test_has_descent(self, **options): """ Run sanity checks on the method :meth:`CoxeterGroups.ElementMethods.has_descent` of the - elements of self. + elements of ``self``. EXAMPLES:: @@ -1424,7 +1424,7 @@ def _test_coxeter_relations(self, **options): class ElementMethods: def has_descent(self, i, side='right', positive=False): """ - Return whether i is a (left/right) descent of self. + Return whether `i` is a (left/right) descent of ``self``. See :meth:`.descents` for a description of the options. @@ -1456,7 +1456,7 @@ def has_descent(self, i, side='right', positive=False): # @abstract_method(optional = True) def has_right_descent(self, i): """ - Return whether ``i`` is a right descent of self. + Return whether `i` is a right descent of ``self``. EXAMPLES:: @@ -1475,7 +1475,7 @@ def has_right_descent(self, i): def has_left_descent(self, i): """ - Return whether `i` is a left descent of self. + Return whether `i` is a left descent of ``self``. This default implementation uses that a left descent of `w` is a right descent of `w^{-1}`. diff --git a/src/sage/categories/discrete_valuation.py b/src/sage/categories/discrete_valuation.py index 346b4dcabc8..40a04cae0b9 100644 --- a/src/sage/categories/discrete_valuation.py +++ b/src/sage/categories/discrete_valuation.py @@ -198,7 +198,7 @@ def is_unit(self): def gcd(self,other): """ - Return the greatest common divisor of self and other, + Return the greatest common divisor of ``self`` and ``other``, normalized so that it is a power of the distinguished uniformizer. """ @@ -211,7 +211,7 @@ def gcd(self,other): def lcm(self,other): """ - Return the least common multiple of self and other, + Return the least common multiple of ``self`` and ``other``, normalized so that it is a power of the distinguished uniformizer. """ diff --git a/src/sage/categories/examples/sets_cat.py b/src/sage/categories/examples/sets_cat.py index 203ccd62999..cd375f757b6 100644 --- a/src/sage/categories/examples/sets_cat.py +++ b/src/sage/categories/examples/sets_cat.py @@ -200,7 +200,7 @@ def an_element(self): def _element_constructor_(self, i): """ - Construct an element of self from an integer, testing that + Construct an element of ``self`` from an integer, testing that this integer is indeed prime. EXAMPLES:: @@ -221,7 +221,7 @@ def _element_constructor_(self, i): @abstract_method def _from_integer_(self, i): """ - Fast construction of an element of self from an integer. + Fast construction of an element of ``self`` from an integer. No prime checking is performed. To be defined. diff --git a/src/sage/categories/functor.pyx b/src/sage/categories/functor.pyx index 393f099208d..5e852335a20 100644 --- a/src/sage/categories/functor.pyx +++ b/src/sage/categories/functor.pyx @@ -390,7 +390,7 @@ cdef class Functor(SageObject): def domain(self): """ - The domain of self. + The domain of ``self``. EXAMPLES:: @@ -402,7 +402,7 @@ cdef class Functor(SageObject): def codomain(self): """ - The codomain of self. + The codomain of ``self``. EXAMPLES:: @@ -493,7 +493,7 @@ class ForgetfulFunctor_generic(Functor): It is tested whether the second argument belongs to the class of forgetful functors and has the same domain and codomain as - self. If the second argument is a functor of a different class + ``self``. If the second argument is a functor of a different class but happens to be a forgetful functor, both arguments will still be considered as being *different*. diff --git a/src/sage/categories/groups.py b/src/sage/categories/groups.py index aee9e8f8748..25129ddf8ef 100644 --- a/src/sage/categories/groups.py +++ b/src/sage/categories/groups.py @@ -630,7 +630,7 @@ def lift(i, gen): def order(self): r""" - Return the cardinality of self. + Return the cardinality of ``self``. EXAMPLES:: diff --git a/src/sage/categories/hopf_algebras.py b/src/sage/categories/hopf_algebras.py index de5f2f9e71c..d6dd6024ecb 100644 --- a/src/sage/categories/hopf_algebras.py +++ b/src/sage/categories/hopf_algebras.py @@ -64,7 +64,7 @@ class ElementMethods: def antipode(self): """ - Return the antipode of self. + Return the antipode of ``self``. EXAMPLES:: diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index 9e8301bc9f1..c9972e4d7e4 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -634,7 +634,7 @@ cdef class Map(Element): def category_for(self): """ - Return the category self is a morphism for. + Return the category ``self`` is a morphism for. .. NOTE:: @@ -1183,7 +1183,7 @@ cdef class Map(Element): OUTPUT: - An element of Hom(X, Z) obtained by composing self with `\phi`. If + An element of Hom(X, Z) obtained by composing ``self`` with `\phi`. If no canonical `\phi` exists, a :class:`TypeError` is raised. EXAMPLES:: diff --git a/src/sage/categories/sets_cat.py b/src/sage/categories/sets_cat.py index 57de46dec86..41319fd3f7b 100644 --- a/src/sage/categories/sets_cat.py +++ b/src/sage/categories/sets_cat.py @@ -2405,7 +2405,7 @@ def is_finite(self): def cardinality(self): r""" - Return the cardinality of self. + Return the cardinality of ``self``. EXAMPLES:: diff --git a/src/sage/coding/binary_code.pyx b/src/sage/coding/binary_code.pyx index de5c6d89b45..ab60922b9bc 100644 --- a/src/sage/coding/binary_code.pyx +++ b/src/sage/coding/binary_code.pyx @@ -1502,7 +1502,7 @@ cdef class OrbitPartition: def _merge_perm(self, col_gamma, wd_gamma): """ - Merges the cells of self under the given permutation. If gamma[a] = b, + Merges the cells of ``self`` under the given permutation. If gamma[a] = b, then after merge_perm, a and b will be in the same cell. Returns 0 if nothing was done, otherwise returns 1. @@ -1810,7 +1810,7 @@ cdef class PartitionStack: def __repr__(self): """ - Return a string representation of self. + Return a string representation of ``self``. EXAMPLES:: diff --git a/src/sage/coding/codecan/codecan.pyx b/src/sage/coding/codecan/codecan.pyx index 2ba1eb6fb52..212d85084e1 100644 --- a/src/sage/coding/codecan/codecan.pyx +++ b/src/sage/coding/codecan/codecan.pyx @@ -517,10 +517,10 @@ cdef class PartitionRefinementLinearCode(PartitionRefinement_generic): - ``n`` -- integer - ``generator_matrix`` -- a `k \times n` matrix over `\GF{q}` of full row rank, i.e. `k int: def __add__(self, other): r""" - Addition of self with a Face, a Patch or a finite iterable of faces. + Addition of ``self`` with a Face, a Patch or a finite iterable of faces. INPUT: @@ -806,7 +806,7 @@ def __repr__(self) -> str: def union(self, other) -> Patch: r""" - Return a Patch consisting of the union of self and other. + Return a Patch consisting of the union of ``self`` and ``other``. INPUT: @@ -828,7 +828,7 @@ def union(self, other) -> Patch: def difference(self, other) -> Patch: r""" - Return the difference of self and other. + Return the difference of ``self`` and ``other``. INPUT: @@ -850,9 +850,9 @@ def difference(self, other) -> Patch: def dimension(self) -> None | int: r""" - Return the dimension of the vectors of the faces of self + Return the dimension of the vectors of the faces of ``self``. - It returns ``None`` if self is the empty patch. + It returns ``None`` if ``self`` is the empty patch. The dimension of a patch is the length of the vectors of the faces in the patch, which is assumed to be the same for every face in the patch. @@ -934,7 +934,7 @@ def faces_of_color(self, color) -> list[Face]: def translate(self, v) -> Patch: r""" - Return a translated copy of self by vector ``v``. + Return a translated copy of ``self`` by vector `v`. INPUT: @@ -995,9 +995,9 @@ def occurrences_of(self, other) -> list: def repaint(self, cmap='Set1') -> None: r""" - Repaint all the faces of self from the given color map. + Repaint all the faces of ``self`` from the given color map. - This only changes the colors of the faces of self. + This only changes the colors of the faces of ``self``. INPUT: diff --git a/src/sage/combinat/finite_state_machine.py b/src/sage/combinat/finite_state_machine.py index 4fe30a06109..9149b2329a1 100644 --- a/src/sage/combinat/finite_state_machine.py +++ b/src/sage/combinat/finite_state_machine.py @@ -6507,10 +6507,10 @@ def add_from_transition_function(self, function, initial_states=None, list of such tuples - ``initial_states`` -- if no initial states are given, the - already existing initial states of self are taken + already existing initial states of ``self`` are taken - ``explore_existing_states`` -- boolean (default: ``True``); if - ``True`` (default), then already existing states in self (e.g. + ``True`` (default), then already existing states in ``self`` (e.g. already given final states) will also be processed if they are reachable from the initial statess @@ -6857,7 +6857,7 @@ def epsilon_successors(self, state): def accessible_components(self): """ Return a new finite state machine with the accessible states - of self and all transitions between those states. + of ``self`` and all transitions between those states. INPUT: @@ -6865,12 +6865,12 @@ def accessible_components(self): OUTPUT: - A finite state machine with the accessible states of self and + A finite state machine with the accessible states of ``self`` and all transitions between those states. A state is accessible if there is a directed path from an - initial state to the state. If self has no initial states then - a copy of the finite state machine self is returned. + initial state to the state. If ``self`` has no initial states then + a copy of the finite state machine ``self`` is returned. EXAMPLES:: @@ -7719,7 +7719,7 @@ def composition(self, other, algorithm=None, - ``explorative`` -- an explorative algorithm is used - The input alphabet of self has to be specified. + The input alphabet of ``self`` has to be specified. .. WARNING:: @@ -8153,7 +8153,7 @@ def composition_transition(states, input): def input_projection(self): """ Return an automaton where the output of each transition of - self is deleted. + ``self`` is deleted. OUTPUT: an automaton @@ -8370,7 +8370,7 @@ def transposition(self, reverse_output_labels=True): def split_transitions(self): """ - Return a new transducer, where all transitions in self with input + Return a new transducer, where all transitions in ``self`` with input labels consisting of more than one letter are replaced by a path of the corresponding length. diff --git a/src/sage/combinat/free_prelie_algebra.py b/src/sage/combinat/free_prelie_algebra.py index 7e8a02f0925..febbd0333f8 100644 --- a/src/sage/combinat/free_prelie_algebra.py +++ b/src/sage/combinat/free_prelie_algebra.py @@ -716,7 +716,7 @@ def _coerce_map_from_(self, R): The things that coerce into ``self`` are - free pre-Lie algebras whose set `E` of labels is - a subset of the corresponding self of ``set`, and whose base + a subset of the corresponding ``self`` of ``set`, and whose base ring has a coercion map into ``self.base_ring()`` EXAMPLES:: diff --git a/src/sage/combinat/matrices/latin.py b/src/sage/combinat/matrices/latin.py index b9d958aa341..86d637b79d3 100644 --- a/src/sage/combinat/matrices/latin.py +++ b/src/sage/combinat/matrices/latin.py @@ -331,7 +331,7 @@ def __copy__(self): def clear_cells(self): """ - Mark every cell in self as being empty. + Mark every cell in ``self`` as being empty. EXAMPLES:: @@ -459,7 +459,7 @@ def actual_row_col_sym_sizes(self): def is_empty_column(self, c): """ - Check if column c of the partial latin square self is empty. + Check if column c of the partial latin square ``self`` is empty. EXAMPLES:: @@ -475,7 +475,7 @@ def is_empty_column(self, c): def is_empty_row(self, r): """ - Check if row r of the partial latin square self is empty. + Check if row r of the partial latin square ``self`` is empty. EXAMPLES:: @@ -513,7 +513,7 @@ def nr_distinct_symbols(self): def apply_isotopism(self, row_perm, col_perm, sym_perm): """ An isotopism is a permutation of the rows, columns, and symbols of - a partial latin square self. Use isotopism() to convert a tuple + a partial latin square ``self``. Use isotopism() to convert a tuple (indexed from 0) to a Permutation object. EXAMPLES:: @@ -554,11 +554,11 @@ def apply_isotopism(self, row_perm, col_perm, sym_perm): def filled_cells_map(self): """ - Number the filled cells of self with integers from {1, 2, 3, ...}. + Number the filled cells of ``self`` with integers from {1, 2, 3, ...}. INPUT: - - ``self`` -- partial latin square self (empty cells + - ``self`` -- partial latin square ``self`` (empty cells have negative values) OUTPUT: @@ -643,7 +643,7 @@ def top_left_empty_cell(self): def is_partial_latin_square(self): """ - self is a partial latin square if it is an n by n matrix, and each + ``self`` is a partial latin square if it is an n by n matrix, and each symbol in [0, 1, ..., n-1] appears at most once in each row, and at most once in each column. @@ -704,7 +704,7 @@ def is_partial_latin_square(self): def is_latin_square(self): """ - self is a latin square if it is an n by n matrix, and each symbol + ``self`` is a latin square if it is an n by n matrix, and each symbol in [0, 1, ..., n-1] appears exactly once in each row, and exactly once in each column. @@ -736,7 +736,7 @@ def is_latin_square(self): def permissable_values(self, r, c): """ Find all values that do not appear in row r and column c of the - latin square self. If self[r, c] is filled then we return the empty + latin square ``self``. If self[r, c] is filled then we return the empty list. INPUT: @@ -822,7 +822,7 @@ def random_empty_cell(self): def is_uniquely_completable(self): """ - Return ``True`` if the partial latin square self has exactly one + Return ``True`` if the partial latin square ``self`` has exactly one completion to a latin square. This is just a wrapper for the current best-known algorithm, Dancing Links by Knuth. See dancing_links.spyx @@ -888,7 +888,7 @@ def is_completable(self): def gcs(self): """ - A greedy critical set of a latin square self is found by + A greedy critical set of a latin square ``self`` is found by successively removing elements in a row-wise (bottom-up) manner, checking for unique completion at each step. @@ -934,7 +934,7 @@ def gcs(self): def dlxcpp_has_unique_completion(self): """ - Check if the partial latin square self of order n can be embedded + Check if the partial latin square ``self`` of order n can be embedded in precisely one latin square of order n. EXAMPLES:: @@ -953,7 +953,7 @@ def dlxcpp_has_unique_completion(self): def vals_in_row(self, r): """ - Return a dictionary with key e if and only if row r of self has + Return a dictionary with key e if and only if row r of ``self`` has the symbol e. EXAMPLES:: @@ -977,7 +977,7 @@ def vals_in_row(self, r): def vals_in_col(self, c): """ - Return a dictionary with key e if and only if column c of self has + Return a dictionary with key e if and only if column c of ``self`` has the symbol e. EXAMPLES:: @@ -1278,7 +1278,7 @@ def find_disjoint_mates(self, nr_to_find=None, allow_subtrade=False): def contained_in(self, Q): r""" - Return ``True`` if self is a subset of `Q`. + Return ``True`` if ``self`` is a subset of `Q`. EXAMPLES:: diff --git a/src/sage/combinat/nu_dyck_word.py b/src/sage/combinat/nu_dyck_word.py index 53cf94e0b44..8364687fd89 100644 --- a/src/sage/combinat/nu_dyck_word.py +++ b/src/sage/combinat/nu_dyck_word.py @@ -1445,7 +1445,7 @@ def path_weakly_above_other(path, other) -> bool: - ``other`` -- the other path to verify is weakly below the path - OUTPUT: bool + OUTPUT: boolean EXAMPLES:: diff --git a/src/sage/combinat/partition.py b/src/sage/combinat/partition.py index 5e2eea0f2e7..c7fe188f8fe 100644 --- a/src/sage/combinat/partition.py +++ b/src/sage/combinat/partition.py @@ -2774,7 +2774,7 @@ def initial_column_tableau(self): r""" Return the initial column tableau of shape ``self``. - The initial column tableau of shape self is the standard tableau + The initial column tableau of shape ``self`` is the standard tableau that has the numbers `1` to `n`, where `n` is the :meth:`size` of ``self``, entered in order from top to bottom and then left to right down the columns of ``self``. diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index aeb33f9d48c..13a1fa76e30 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -95,7 +95,7 @@ :meth:`~sage.combinat.permutation.Permutation.number_of_peaks` | Returns the number of peaks of the permutation ``self``. :meth:`~sage.combinat.permutation.Permutation.saliances` | Returns a list of the saliances of the permutation ``self``. :meth:`~sage.combinat.permutation.Permutation.number_of_saliances` | Returns the number of saliances of the permutation ``self``. - :meth:`~sage.combinat.permutation.Permutation.bruhat_lequal` | Returns ``True`` if self is less or equal to ``p2`` in the Bruhat order. + :meth:`~sage.combinat.permutation.Permutation.bruhat_lequal` | Returns ``True`` if ``self`` is less or equal to ``p2`` in the Bruhat order. :meth:`~sage.combinat.permutation.Permutation.weak_excedences` | Returns all the numbers ``self[i]`` such that ``self[i] >= i+1``. :meth:`~sage.combinat.permutation.Permutation.bruhat_inversions` | Returns the list of inversions of ``self`` such that the application of this inversion to ``self`` decrements its number of inversions. :meth:`~sage.combinat.permutation.Permutation.bruhat_inversions_iterator` | Returns an iterator over Bruhat inversions of ``self``. diff --git a/src/sage/combinat/rigged_configurations/kleber_tree.py b/src/sage/combinat/rigged_configurations/kleber_tree.py index 13b5f6ab9f7..e82b6c28035 100644 --- a/src/sage/combinat/rigged_configurations/kleber_tree.py +++ b/src/sage/combinat/rigged_configurations/kleber_tree.py @@ -1038,7 +1038,7 @@ def digraph(self): def plot(self, **options): """ - Return the plot of self as a directed graph. + Return the plot of ``self`` as a directed graph. EXAMPLES:: diff --git a/src/sage/combinat/root_system/ambient_space.py b/src/sage/combinat/root_system/ambient_space.py index 02e3511cdc3..5fe5e161575 100644 --- a/src/sage/combinat/root_system/ambient_space.py +++ b/src/sage/combinat/root_system/ambient_space.py @@ -293,7 +293,7 @@ def from_vector_notation(self, weight, style='lattice'): - ``weight`` -- a vector or tuple representing a weight - Returns an element of self. If the weight lattice is not + Returns an element of ``self``. If the weight lattice is not of full rank, it coerces it into the weight lattice, or its ambient space by orthogonal projection. This arises in two cases: for SL(r+1), the weight lattice is diff --git a/src/sage/combinat/root_system/reflection_group_complex.py b/src/sage/combinat/root_system/reflection_group_complex.py index 7816f0f73f1..51a7f05f2d6 100644 --- a/src/sage/combinat/root_system/reflection_group_complex.py +++ b/src/sage/combinat/root_system/reflection_group_complex.py @@ -855,7 +855,7 @@ def discriminant_in_invariant_ring(self, invariants=None): @cached_method def is_crystallographic(self): r""" - Return ``True`` if self is crystallographic. + Return ``True`` if ``self`` is crystallographic. This is, if the field of definition is the rational field. diff --git a/src/sage/combinat/root_system/type_dual.py b/src/sage/combinat/root_system/type_dual.py index 166eb813cf7..faf69a0601a 100644 --- a/src/sage/combinat/root_system/type_dual.py +++ b/src/sage/combinat/root_system/type_dual.py @@ -528,7 +528,7 @@ class CartanType_finite(CartanType, cartan_type.CartanType_finite): class CartanType_affine(CartanType, cartan_type.CartanType_affine): def classical(self): """ - Return the classical Cartan type associated with self (which should + Return the classical Cartan type associated with ``self`` (which should be affine). EXAMPLES:: diff --git a/src/sage/combinat/root_system/type_reducible.py b/src/sage/combinat/root_system/type_reducible.py index 6b92973ba63..a9fdf127dd8 100644 --- a/src/sage/combinat/root_system/type_reducible.py +++ b/src/sage/combinat/root_system/type_reducible.py @@ -223,7 +223,7 @@ def type(self): def rank(self): """ - Return the rank of self. + Return the rank of ``self``. EXAMPLES:: diff --git a/src/sage/combinat/root_system/weyl_group.py b/src/sage/combinat/root_system/weyl_group.py index d28c8caaec4..28e596ae9b7 100644 --- a/src/sage/combinat/root_system/weyl_group.py +++ b/src/sage/combinat/root_system/weyl_group.py @@ -823,7 +823,7 @@ def _richcmp_(self, other, op): def action(self, v): """ - Return the action of self on the vector v. + Return the action of ``self`` on the vector `v`. EXAMPLES:: diff --git a/src/sage/combinat/sf/hall_littlewood.py b/src/sage/combinat/sf/hall_littlewood.py index c8c11140f9f..5fa31c6f1ba 100644 --- a/src/sage/combinat/sf/hall_littlewood.py +++ b/src/sage/combinat/sf/hall_littlewood.py @@ -567,7 +567,7 @@ class Element(sfa.SymmetricFunctionAlgebra_generic.Element): def expand(self, n, alphabet='x'): r""" - Expands the symmetric function as a symmetric polynomial in ``n`` variables. + Expand the symmetric function as a symmetric polynomial in ``n`` variables. INPUT: diff --git a/src/sage/combinat/sf/jack.py b/src/sage/combinat/sf/jack.py index 1c441d99788..30db1b032e5 100644 --- a/src/sage/combinat/sf/jack.py +++ b/src/sage/combinat/sf/jack.py @@ -584,7 +584,7 @@ def _m_to_self(self, x): def _self_to_m(self, x): r""" - Isomorphism from self to the monomial basis. + Isomorphism from ``self`` to the monomial basis. INPUT: @@ -1235,7 +1235,7 @@ def _h_cache(self, n): def _self_to_h( self, x ): r""" - Isomorphism from self to the homogeneous basis. + Isomorphism from ``self`` to the homogeneous basis. INPUT: diff --git a/src/sage/combinat/sf/llt.py b/src/sage/combinat/sf/llt.py index 98c4661b7d9..7a6d787d5bc 100644 --- a/src/sage/combinat/sf/llt.py +++ b/src/sage/combinat/sf/llt.py @@ -503,7 +503,7 @@ def _m_to_self(self, x): def _self_to_m(self, x): r""" - Isomorphism from self to the monomial basis. + Isomorphism from ``self`` to the monomial basis. INPUT: diff --git a/src/sage/combinat/sf/macdonald.py b/src/sage/combinat/sf/macdonald.py index f49e2797c75..911e8e1baa5 100644 --- a/src/sage/combinat/sf/macdonald.py +++ b/src/sage/combinat/sf/macdonald.py @@ -807,7 +807,7 @@ def _s_to_self(self, x): def _self_to_s(self, x): r""" - Isomorphism from self to the Schur basis. + Isomorphism from ``self`` to the Schur basis. INPUT: @@ -1914,7 +1914,7 @@ def creation(self, k): def _omega_qt_in_schurs(self): r""" - Return the image of self under the omega_qt automorphism in the + Return the image of ``self`` under the omega_qt automorphism in the Schur basis. INPUT: diff --git a/src/sage/combinat/sf/ns_macdonald.py b/src/sage/combinat/sf/ns_macdonald.py index 582e2f99568..12c20f423a4 100644 --- a/src/sage/combinat/sf/ns_macdonald.py +++ b/src/sage/combinat/sf/ns_macdonald.py @@ -440,7 +440,7 @@ def fn(ij): def reading_word(self): """ Return the reading word of ``self``, obtained by reading the boxes - entries of self from right to left, starting in the upper right. + entries of ``self`` from right to left, starting in the upper right. EXAMPLES:: diff --git a/src/sage/combinat/species/composition_species.py b/src/sage/combinat/species/composition_species.py index 227cd77bb12..b0870575c1f 100644 --- a/src/sage/combinat/species/composition_species.py +++ b/src/sage/combinat/species/composition_species.py @@ -72,11 +72,11 @@ def change_labels(self, labels): INPUT: - - ``labels``, a list of labels. + - ``labels`` -- a list of labels OUTPUT: - A structure with the i-th label of self replaced with the i-th + A structure with the `i`-th label of ``self`` replaced with the `i`-th label of the list. EXAMPLES:: diff --git a/src/sage/combinat/species/partition_species.py b/src/sage/combinat/species/partition_species.py index 699ffcd1929..cd6dbd43f52 100644 --- a/src/sage/combinat/species/partition_species.py +++ b/src/sage/combinat/species/partition_species.py @@ -113,11 +113,11 @@ def change_labels(self, labels): INPUT: - - ``labels``, a list of labels. + - ``labels`` -- a list of labels OUTPUT: - A structure with the i-th label of self replaced with the i-th + A structure with the `i`-th label of ``self`` replaced with the `i`-th label of the list. EXAMPLES:: diff --git a/src/sage/combinat/species/permutation_species.py b/src/sage/combinat/species/permutation_species.py index 298bbb929be..7494ee33c08 100644 --- a/src/sage/combinat/species/permutation_species.py +++ b/src/sage/combinat/species/permutation_species.py @@ -44,7 +44,7 @@ def canonical_label(self): def permutation_group_element(self): """ - Return self as a permutation group element. + Return ``self`` as a permutation group element. EXAMPLES:: diff --git a/src/sage/combinat/species/product_species.py b/src/sage/combinat/species/product_species.py index 77956d1b863..2802756e7eb 100644 --- a/src/sage/combinat/species/product_species.py +++ b/src/sage/combinat/species/product_species.py @@ -123,11 +123,11 @@ def change_labels(self, labels): INPUT: - - ``labels``, a list of labels. + - ``labels`` -- a list of labels OUTPUT: - A structure with the i-th label of self replaced with the i-th + A structure with the `i`-th label of ``self`` replaced with the `i`-th label of the list. EXAMPLES:: diff --git a/src/sage/combinat/species/structure.py b/src/sage/combinat/species/structure.py index f117252c090..4a09e74bb3b 100644 --- a/src/sage/combinat/species/structure.py +++ b/src/sage/combinat/species/structure.py @@ -149,11 +149,11 @@ def change_labels(self, labels): INPUT: - - ``labels``, a list of labels. + - ``labels`` -- a list of labels OUTPUT: - A structure with the i-th label of self replaced with the i-th + A structure with the `i`-th label of ``self`` replaced with the `i`-th label of the list. EXAMPLES:: @@ -304,11 +304,11 @@ def change_labels(self, labels): INPUT: - - ``labels``, a list of labels. + - ``labels`` -- a list of labels OUTPUT: - A structure with the i-th label of self replaced with the i-th + A structure with the `i`-th label of ``self`` replaced with the `i`-th label of the list. EXAMPLES:: diff --git a/src/sage/combinat/words/abstract_word.py b/src/sage/combinat/words/abstract_word.py index f26fd8baa93..3007eac7c03 100644 --- a/src/sage/combinat/words/abstract_word.py +++ b/src/sage/combinat/words/abstract_word.py @@ -44,7 +44,7 @@ class Word_class(SageObject): def parent(self): r""" - Return the parent of self. + Return the parent of ``self``. TESTS:: @@ -61,7 +61,7 @@ def parent(self): def _repr_(self): r""" - Return a string representation of self. + Return a string representation of ``self``. TESTS:: @@ -157,7 +157,7 @@ def __iter__(self): def length(self): r""" - Return the length of self. + Return the length of ``self``. TESTS:: @@ -206,7 +206,7 @@ def is_finite(self): def __len__(self): r""" - Return the length of self (as a python integer). + Return the length of ``self`` (as a Python integer). .. NOTE:: @@ -372,7 +372,7 @@ def __richcmp__(self, other, op): def _longest_common_prefix_iterator(self, other): r""" - Return an iterator of the longest common prefix of self and other. + Return an iterator of the longest common prefix of ``self`` and ``other``. INPUT: @@ -400,7 +400,7 @@ def _longest_common_prefix_iterator(self, other): def longest_common_prefix(self, other, length='unknown'): r""" - Return the longest common prefix of self and other. + Return the longest common prefix of ``self`` and ``other``. INPUT: @@ -496,7 +496,7 @@ def longest_common_prefix(self, other, length='unknown'): def _longest_periodic_prefix_iterator(self, period=1): r""" - Return an iterator of the longest prefix of self having the given + Return an iterator of the longest prefix of ``self`` having the given period. INPUT: @@ -530,7 +530,7 @@ def _longest_periodic_prefix_iterator(self, period=1): def longest_periodic_prefix(self, period=1): r""" - Return the longest prefix of self having the given period. + Return the longest prefix of ``self`` having the given period. INPUT: @@ -564,7 +564,7 @@ def longest_periodic_prefix(self, period=1): def is_empty(self): r""" - Return ``True`` if the length of self is zero, and False otherwise. + Return ``True`` if the length of ``self`` is zero, and ``False`` otherwise. EXAMPLES:: @@ -592,9 +592,9 @@ def _to_integer_iterator(self, use_parent_alphabet=False): INPUT: - ``use_parent_alphabet`` -- boolean (default: ``False``); when ``True`` - and if the self parent's alphabet is finite, it uses the index of + and if the ``self`` parent's alphabet is finite, it uses the index of the letters in the alphabet. Otherwise, the first letter occurring in - self is mapped to zero, and every letter that hasn't yet occurred in + ``self`` is mapped to zero, and every letter that hasn't yet occurred in the word is mapped to the next available integer. EXAMPLES:: @@ -664,7 +664,7 @@ def to_integer_word(self): def lex_less(self, other): r""" - Return ``True`` if self is lexicographically less than other. + Return ``True`` if ``self`` is lexicographically less than ``other``. EXAMPLES:: @@ -690,11 +690,11 @@ def lex_less(self, other): sage: t[:10].lex_less(t) True """ - return self < other + return ``self`` < other def lex_greater(self, other): r""" - Return ``True`` if self is lexicographically greater than other. + Return ``True`` if ``self`` is lexicographically greater than ``other``. EXAMPLES:: @@ -763,7 +763,7 @@ def apply_morphism(self, morphism): def _delta_iterator(self): r""" - Return an iterator of the image of self under the delta morphism. + Return an iterator of the image of ``self`` under the delta morphism. This is the word composed of the length of consecutive runs of the same letter in a given word. @@ -792,7 +792,7 @@ def _delta_iterator(self): def delta(self): r""" - Return the image of self under the delta morphism. + Return the image of ``self`` under the delta morphism. This is the word composed of the length of consecutive runs of the same letter in a given word. @@ -825,7 +825,7 @@ def delta(self): def _iterated_right_palindromic_closure_iterator(self, f=None): r""" - Return an iterator over the iterated (`f`-)palindromic closure of self. + Return an iterator over the iterated (`f`-)palindromic closure of ``self``. INPUT: @@ -889,11 +889,11 @@ def _iterated_right_palindromic_closure_iterator(self, f=None): def _iterated_right_palindromic_closure_recursive_iterator(self, f=None): r""" - Return an iterator over the iterated (`f`-)palindromic closure of self. + Return an iterator over the iterated (`f`-)palindromic closure of ``self``. INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of self. It must + - ``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 @@ -977,11 +977,11 @@ def _iterated_right_palindromic_closure_recursive_iterator(self, f=None): def iterated_right_palindromic_closure(self, f=None, algorithm='recursive'): r""" - Return the iterated (`f`-)palindromic closure of self. + Return the iterated (`f`-)palindromic closure of ``self``. INPUT: - - ``f`` -- involution (default: ``None``) on the alphabet of self. It must + - ``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 @@ -1094,7 +1094,7 @@ def iterated_right_palindromic_closure(self, f=None, algorithm='recursive'): def prefixes_iterator(self, max_length=None): r""" - Return an iterator over the prefixes of self. + Return an iterator over the prefixes of ``self``. INPUT: @@ -1146,7 +1146,7 @@ def prefixes_iterator(self, max_length=None): def palindrome_prefixes_iterator(self, max_length=None): r""" - Return an iterator over the palindrome prefixes of self. + Return an iterator over the palindrome prefixes of ``self``. INPUT: @@ -1185,7 +1185,7 @@ def palindrome_prefixes_iterator(self, max_length=None): def _partial_sums_iterator(self, start, mod=None): r""" - Iterator over the partial sums of the prefixes of self. + Iterator over the partial sums of the prefixes of ``self``. INPUT: @@ -1593,7 +1593,7 @@ def first_occurrence(self, other, start=0): def factor_occurrences_iterator(self, fact): r""" Return an iterator over all occurrences (including overlapping ones) - of fact in self in their order of appearance. + of fact in ``self`` in their order of appearance. INPUT: @@ -1678,7 +1678,7 @@ def return_words_iterator(self, fact): def complete_return_words_iterator(self, fact): r""" Return an iterator over all the complete return words of fact in - self (without unicity). + ``self`` (without unicity). A complete return words `u` of a factor `v` is a factor starting by the given factor `v` and ending just after the next occurrence diff --git a/src/sage/combinat/words/finite_word.py b/src/sage/combinat/words/finite_word.py index c97dfe105d1..d46af70f4c0 100644 --- a/src/sage/combinat/words/finite_word.py +++ b/src/sage/combinat/words/finite_word.py @@ -1592,7 +1592,7 @@ def reduced_rauzy_graph(self, n): where `w` is the unique return word to `p`. In other cases, it is the directed graph defined as followed. Let - `G_n` be the Rauzy graph of order `n` of self. The vertices are the + `G_n` be the Rauzy graph of order `n` of ``self``. The vertices are the vertices of `G_n` that are either special or not prolongable to the right or to the left. For each couple (`u`, `v`) of such vertices and each directed path in `G_n` from `u` to `v` that contains no diff --git a/src/sage/combinat/words/infinite_word.py b/src/sage/combinat/words/infinite_word.py index 944b506c671..0fab1f18891 100644 --- a/src/sage/combinat/words/infinite_word.py +++ b/src/sage/combinat/words/infinite_word.py @@ -81,7 +81,7 @@ class InfiniteWord_class(Word_class): def _repr_(self): r""" - Return a string representation of self. + Return a string representation of ``self``. TESTS:: @@ -99,7 +99,7 @@ def _repr_(self): def length(self): r""" - Return the length of self. + Return the length of ``self``. EXAMPLES:: diff --git a/src/sage/combinat/words/morphism.py b/src/sage/combinat/words/morphism.py index fb7a33ec4c5..858f123adea 100644 --- a/src/sage/combinat/words/morphism.py +++ b/src/sage/combinat/words/morphism.py @@ -627,7 +627,7 @@ def __str__(self) -> str: def __call__(self, w, order=1): r""" - Return the image of ``w`` under self to the given order. + Return the image of ``w`` under ``self`` to the given order. INPUT: @@ -635,7 +635,7 @@ def __call__(self, w, order=1): - ``order`` -- integer or plus ``Infinity`` (default: 1) - OUTPUT: ``word`` -- order-th iterated image under self of ``w`` + OUTPUT: ``word`` -- ``order``-th iterated image under ``self`` of ``w`` EXAMPLES: @@ -713,7 +713,7 @@ def __call__(self, w, order=1): sage: tm('aba',oo) word: abbabaabbaababbabaababbaabbabaabbaababba... - The morphism self must be prolongable on the given letter for infinitely + The morphism ``self`` must be prolongable on the given letter for infinitely iterated image:: sage: m = WordMorphism('a->ba,b->ab') @@ -1470,7 +1470,7 @@ def pisot_eigenvector_right(self): to the largest eigenvalue (in absolute value). Unicity of the result is guaranteed when the multiplicity of the - largest eigenvalue is one, for example when self is a Pisot + largest eigenvalue is one, for example when ``self`` is a Pisot irreductible substitution. A substitution is Pisot irreducible if the characteristic @@ -1500,7 +1500,7 @@ def pisot_eigenvector_left(self): to the largest eigenvalue (in absolute value). Unicity of the result is guaranteed when the multiplicity of the - largest eigenvalue is one, for example when self is a Pisot + largest eigenvalue is one, for example when ``self`` is a Pisot irreductible substitution. A substitution is Pisot irreducible if the characteristic @@ -1878,7 +1878,7 @@ def fixed_points(self): def periodic_point(self, letter): r""" - Return the periodic point of self that starts with ``letter``. + Return the periodic point of ``self`` that starts with ``letter``. EXAMPLES:: @@ -2431,7 +2431,7 @@ def has_conjugate_in_classP(self, f=None): def dual_map(self, k=1): r""" - Return the dual map `E_k^*` of self (see [1]). + Return the dual map `E_k^*` of ``self`` (see [1]). .. NOTE:: diff --git a/src/sage/combinat/words/paths.py b/src/sage/combinat/words/paths.py index a8edb21bcaa..a1027da57ed 100644 --- a/src/sage/combinat/words/paths.py +++ b/src/sage/combinat/words/paths.py @@ -1759,7 +1759,7 @@ def height(self): sage: Freeman('aababaabbbAA').height() 5 - The function is well-defined if self is not simple or close:: + The function is well-defined if ``self`` is not simple or close:: sage: Freeman('aabAAB').height() 1 @@ -1824,7 +1824,7 @@ def width(self): sage: Freeman('aababaabbbAA').width() 5 - The function is well-defined if self is not simple or close:: + The function is well-defined if ``self`` is not simple or close:: sage: Freeman('aabAAB').width() 2 diff --git a/src/sage/combinat/words/word_char.pyx b/src/sage/combinat/words/word_char.pyx index 41825f1185a..7059f8a5575 100644 --- a/src/sage/combinat/words/word_char.pyx +++ b/src/sage/combinat/words/word_char.pyx @@ -114,9 +114,9 @@ cdef class WordDatatype_char(WordDatatype): def __dealloc__(self): r""" - Deallocate memory only if self uses it own memory. + Deallocate memory only if ``self`` uses it own memory. - Note that ``sig_free`` will not deallocate memory if self is the + Note that ``sig_free`` will not deallocate memory if ``self`` is the master of another word. """ # it is strictly forbidden here to access _master here! (it will be set @@ -646,7 +646,7 @@ cdef class WordDatatype_char(WordDatatype): def is_square(self): r""" - Return ``True`` if self is a square, and False otherwise. + Return ``True`` if ``self`` is a square, and ``False`` otherwise. EXAMPLES:: diff --git a/src/sage/combinat/words/word_datatypes.pyx b/src/sage/combinat/words/word_datatypes.pyx index c908e0c85e6..09fc21da72e 100644 --- a/src/sage/combinat/words/word_datatypes.pyx +++ b/src/sage/combinat/words/word_datatypes.pyx @@ -125,7 +125,7 @@ cdef class WordDatatype_list(WordDatatype): def __iter__(self): r""" - Return an iterator that iterates through the letters of self. + Return an iterator that iterates through the letters of ``self``. EXAMPLES:: @@ -137,8 +137,8 @@ cdef class WordDatatype_list(WordDatatype): def __richcmp__(self, other, int op): r""" - Equality test for self and other if other is an instance of - WordDatype_list. + Equality test for ``self`` and ``other`` if other is an instance of + ``WordDatype_list``. INPUT: @@ -232,7 +232,7 @@ cdef class WordDatatype_list(WordDatatype): def __mul__(self, other): r""" - Return the concatenation of self and other. + Return the concatenation of ``self`` and ``other``. INPUT: @@ -332,8 +332,8 @@ cdef class WordDatatype_str(WordDatatype): def __richcmp__(self, other, int op): r""" - Equality test for self and other if other is an instance of - WordDatype_str. + Equality test for ``self`` and ``other`` if other is an instance of + ``WordDatype_str``. INPUT: @@ -551,11 +551,11 @@ cdef class WordDatatype_str(WordDatatype): def __mul__(self, other): r""" - Return the concatenation of self and other. + Return the concatenation of ``self`` and ``other``. INPUT: - - ``other`` -- word represented by a str + - ``other`` -- word represented by a string OUTPUT: word @@ -903,7 +903,7 @@ cdef class WordDatatype_tuple(WordDatatype): def __iter__(self): r""" - Return an iterator that iterates through the letters of self. + Return an iterator that iterates through the letters of ``self``. EXAMPLES:: @@ -915,8 +915,8 @@ cdef class WordDatatype_tuple(WordDatatype): def __richcmp__(self, other, int op): r""" - Equality test for self and other if other is an instance of - WordDatype_tuple. + Equality test for ``self`` and ``other`` if other is an instance of + ``WordDatype_tuple``. INPUT: @@ -1034,7 +1034,7 @@ cdef class WordDatatype_tuple(WordDatatype): def __mul__(self, other): r""" - Return the concatenation of self and other. + Return the concatenation of ``self`` and ``other``. INPUT: diff --git a/src/sage/combinat/words/words.py b/src/sage/combinat/words/words.py index a06bbf0d88c..0d37cc77b20 100644 --- a/src/sage/combinat/words/words.py +++ b/src/sage/combinat/words/words.py @@ -192,7 +192,7 @@ def alphabet(self): def identity_morphism(self): r""" - Return the identity morphism from self to itself. + Return the identity morphism from ``self`` to itself. EXAMPLES:: @@ -383,10 +383,10 @@ def factors(self): @lazy_attribute def _element_classes(self): r""" - Return a dictionary that gives the class of the element of self. + Return a dictionary that gives the class of the element of ``self``. The word may be finite, infinite or of unknown length. - Its data may be str, list, tuple, a callable or an iterable. + Its data may be string, list, tuple, a callable or an iterable. For callable and iterable, the data may be cached. EXAMPLES: @@ -860,7 +860,7 @@ def _repr_(self): def _an_element_(self): r""" - Return an element of self. + Return an element of ``self``. EXAMPLES:: @@ -886,7 +886,7 @@ def _an_element_(self): def iterate_by_length(self, l=1): r""" - Return an iterator over all the words of self of length `l`. + Return an iterator over all the words of ``self`` of length `l`. INPUT: @@ -921,7 +921,7 @@ def iterate_by_length(self, l=1): def __iter__(self): r""" - Return an iterator over all the words of self. + Return an iterator over all the words of ``self``. The iterator outputs the words in shortlex order (see :wikipedia:`Shortlex_order`), i.e. first by increasing length and then @@ -1316,10 +1316,10 @@ def shift(self): @lazy_attribute def _element_classes(self): r""" - Return a dictionary that gives the class of the element of self. + Return a dictionary that gives the class of the element of ``self``. The word may be finite, infinite or of unknown length. - Its data may be str, list, tuple, a callable or an iterable. + Its data may be string, list, tuple, a callable or an iterable. For callable and iterable, the data may be cached. EXAMPLES: @@ -1572,7 +1572,7 @@ def __call__(self, data=None, datatype=None, caching=True, check=True): def _repr_(self): r""" - Return a string representation of self. + Return a string representation of ``self``. EXAMPLES:: @@ -1583,7 +1583,7 @@ def _repr_(self): def _an_element_(self): r""" - Return an element of self. + Return an element of ``self``. EXAMPLES:: @@ -2055,7 +2055,7 @@ def __call__(self, data=None, length=None, datatype=None, caching=True, check=Tr def _repr_(self): r""" - Return a string representation of self. + Return a string representation of ``self``. EXAMPLES:: @@ -2168,7 +2168,7 @@ def list(self): def _an_element_(self): r""" - Return an element of self. + Return an element of ``self``. EXAMPLES:: diff --git a/src/sage/cpython/getattr.pyx b/src/sage/cpython/getattr.pyx index 899fbe62ecc..44b4a65650d 100644 --- a/src/sage/cpython/getattr.pyx +++ b/src/sage/cpython/getattr.pyx @@ -241,10 +241,10 @@ cpdef getattr_from_other_class(self, cls, name): - ``name`` -- a string - If self is an instance of cls, raises an :class:`AttributeError`, to + If ``self`` is an instance of cls, raises an :class:`AttributeError`, to avoid a double lookup. This function is intended to be called from __getattr__, and so should not be called if name is an attribute - of self. + of ``self``. EXAMPLES:: @@ -382,7 +382,7 @@ cpdef getattr_from_other_class(self, cls, name): def dir_with_other_class(self, *cls): r""" - Emulates ``dir(self)``, as if self was also an instance ``cls``, + Emulates ``dir(self)``, as if ``self`` was also an instance ``cls``, right after ``caller_class`` in the method resolution order (``self.__class__.mro()``) diff --git a/src/sage/crypto/block_cipher/miniaes.py b/src/sage/crypto/block_cipher/miniaes.py index b29cdc8d90f..2eb067f3757 100644 --- a/src/sage/crypto/block_cipher/miniaes.py +++ b/src/sage/crypto/block_cipher/miniaes.py @@ -406,7 +406,7 @@ def __eq__(self, other): def __repr__(self): r""" - Return the string representation of self. + Return the string representation of ``self``. EXAMPLES:: diff --git a/src/sage/crypto/classical.py b/src/sage/crypto/classical.py index 6f3f192a958..75d29c56d39 100644 --- a/src/sage/crypto/classical.py +++ b/src/sage/crypto/classical.py @@ -1387,7 +1387,7 @@ def __call__(self, A): def _repr_(self): """ - Return a string representation of self. + Return a string representation of ``self``. EXAMPLES:: @@ -3046,7 +3046,7 @@ def __call__(self, K): def _repr_(self): """ - Return a string representation of self. + Return a string representation of ``self``. EXAMPLES:: @@ -3275,7 +3275,7 @@ def __call__(self, K): def _repr_(self): """ - Return a string representation of self. + Return a string representation of ``self``. EXAMPLES:: @@ -3517,7 +3517,7 @@ def __call__(self, K): def _repr_(self): """ - Return a string representation of self. + Return a string representation of ``self``. EXAMPLES:: diff --git a/src/sage/crypto/mq/sr.py b/src/sage/crypto/mq/sr.py index a695d51ec4c..536cc880abc 100644 --- a/src/sage/crypto/mq/sr.py +++ b/src/sage/crypto/mq/sr.py @@ -601,7 +601,7 @@ def _repr_(self): def base_ring(self): r""" - Return the base field of self as determined by + Return the base field of ``self`` as determined by ``self.e``. EXAMPLES:: @@ -1069,7 +1069,7 @@ def random_state_array(self, *args, **kwds): def random_vector(self, *args, **kwds): r""" Return a random vector as it might appear in the algebraic - expression of self. + expression of ``self``. EXAMPLES:: @@ -1084,7 +1084,7 @@ def random_vector(self, *args, **kwds): def random_element(self, elem_type='vector', *args, **kwds): """ - Return a random element for self. Other arguments and keywords are + Return a random element for ``self``. Other arguments and keywords are passed to random_* methods. INPUT: @@ -1666,7 +1666,7 @@ def variable_dict(self): def block_order(self): """ - Return a block order for self where each round is a block. + Return a block order for ``self`` where each round is a block. EXAMPLES:: diff --git a/src/sage/data_structures/bitset.pyx b/src/sage/data_structures/bitset.pyx index a955389af76..8a755024e0e 100644 --- a/src/sage/data_structures/bitset.pyx +++ b/src/sage/data_structures/bitset.pyx @@ -1176,7 +1176,7 @@ cdef class FrozenBitset: cpdef complement(self): """ - Return the complement of self. + Return the complement of ``self``. EXAMPLES:: @@ -1200,7 +1200,7 @@ cdef class FrozenBitset: def __invert__(self): """ - Return the complement of self. + Return the complement of ``self``. EXAMPLES:: diff --git a/src/sage/databases/sql_db.py b/src/sage/databases/sql_db.py index 21b49e2e8b4..fcf74caf024 100644 --- a/src/sage/databases/sql_db.py +++ b/src/sage/databases/sql_db.py @@ -704,7 +704,7 @@ def intersect(self, other, join_table=None, join_dict=None, Return a new ``SQLQuery`` that is the intersection of ``self`` and ``other``. ``join_table`` and ``join_dict`` can be ``None`` iff the two queries only search one table in the database. All display columns - will be concatenated in order: self display cols + other display cols. + will be concatenated in order: ``self`` display cols + other display cols. INPUT: @@ -835,10 +835,10 @@ def _merge_queries(self, other, ret, join_table, join_dict, operator): def union(self, other, join_table=None, join_dict=None, in_place=False): """ - Return a new ``SQLQuery`` that is the union of self and other. + Return a new ``SQLQuery`` that is the union of ``self`` and ``other``. ``join_table`` and ``join_dict`` can be ``None`` iff the two queries only search one table in the database. All display columns will be - concatenated in order: self display cols + other display cols. + concatenated in order: ``self`` display cols + other display cols. INPUT: diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py index 496dbea2b76..57d5b704743 100644 --- a/src/sage/doctest/control.py +++ b/src/sage/doctest/control.py @@ -955,7 +955,7 @@ def all_doc_sources(): def expand_files_into_sources(self): r""" - Expands ``self.files``, which may include directories, into a + Expand ``self.files``, which may include directories, into a list of :class:`sage.doctest.FileDocTestSource` This function also handles the optional command line option. diff --git a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py index f3a17c03272..582abd5a7fd 100644 --- a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py @@ -1749,12 +1749,12 @@ def primes_of_bad_reduction(self, check=True): ALGORITHM: `p` is a prime of bad reduction if and only if the defining - polynomials of self have a common zero. Or stated another way, + polynomials of ``self`` have a common zero. Or stated another way, `p` is a prime of bad reduction if and only if the radical of - the ideal defined by the defining polynomials of self is not + the ideal defined by the defining polynomials of ``self`` is not `(x_0,x_1,\ldots,x_N)`. This happens if and only if some power of each `x_i` is not in the ideal defined by the - defining polynomials of self. This last condition is what is + defining polynomials of ``self``. This last condition is what is checked. The lcm of the coefficients of the monomials `x_i` in a Groebner basis is computed. This may return extra primes. diff --git a/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py b/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py index 16836abd012..c19bce76d6d 100644 --- a/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py +++ b/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py @@ -883,7 +883,7 @@ def degenerate_fibers(self): @cached_method def degenerate_primes(self, check=True): r""" - Determine which primes `p` self has degenerate fibers over `\GF{p}`. + Determine which primes `p` ``self`` has degenerate fibers over `\GF{p}`. If ``check`` is ``False``, then may return primes that do not have degenerate fibers. Raises an error if the surface is degenerate. diff --git a/src/sage/geometry/fan_morphism.py b/src/sage/geometry/fan_morphism.py index e705d079c07..b2f4b9b5e32 100644 --- a/src/sage/geometry/fan_morphism.py +++ b/src/sage/geometry/fan_morphism.py @@ -588,7 +588,7 @@ def _subdivide_domain_fan(self, check, verbose): OUTPUT: - - none, but the domain fan of self is replaced with its minimal + - none, but the domain fan of ``self`` is replaced with its minimal refinement, if possible. Otherwise a :class:`ValueError` exception is raised. diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py b/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py index 4c24873c2a4..f164c8b9f10 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py @@ -240,7 +240,7 @@ def __eq__(self, other): def __ne__(self, other): """ - Test unequality of self and other. + Test unequality of ``self`` and ``other``. EXAMPLES:: diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_point.py b/src/sage/geometry/hyperbolic_space/hyperbolic_point.py index 7e21398cdb1..776bd19d40e 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_point.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_point.py @@ -270,7 +270,7 @@ def _latex_(self): def _richcmp_(self, other, op): r""" - Comparison of self and other. + Comparison of ``self`` and ``other``. EXAMPLES:: diff --git a/src/sage/geometry/lattice_polytope.py b/src/sage/geometry/lattice_polytope.py index 00c21b17351..431fbd5cabf 100644 --- a/src/sage/geometry/lattice_polytope.py +++ b/src/sage/geometry/lattice_polytope.py @@ -945,7 +945,7 @@ def _embed(self, data): def _latex_(self): r""" - Return the latex representation of self. + Return the latex representation of ``self``. OUTPUT: string @@ -3374,7 +3374,7 @@ def nvertices(self): @cached_method def origin(self): r""" - Return the index of the origin in the list of points of self. + Return the index of the origin in the list of points of ``self``. OUTPUT: integer if the origin belongs to this polytope, ``None`` otherwise diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index bde1c3777f0..c69ac00234a 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -543,7 +543,7 @@ cdef class CombinatorialPolyhedron(SageObject): cdef _init_from_ListOfFaces(self, ListOfFaces facets, ListOfFaces Vrep): """ - Initialize self from two ``ListOfFaces``. + Initialize ``self`` from two ``ListOfFaces``. """ self._bitrep_facets = facets self._bitrep_Vrep = Vrep @@ -3310,7 +3310,7 @@ cdef class CombinatorialPolyhedron(SageObject): cpdef CombinatorialPolyhedron dual(self): r""" - Return the dual/polar of self. + Return the dual/polar of ``self``. Only defined for bounded polyhedra. diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx index 8589e33045b..7deea0adf6b 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx @@ -180,7 +180,7 @@ cdef class ListOfFaces: cpdef ListOfFaces __copy__(self): r""" - Return a copy of self. + Return a copy of ``self``. EXAMPLES:: @@ -478,7 +478,7 @@ cdef class ListOfFaces: def matrix(self): r""" - Obtain the matrix of self. + Obtain the matrix of ``self``. Each row represents a face and each column an atom. diff --git a/src/sage/geometry/polyhedron/library.py b/src/sage/geometry/polyhedron/library.py index db5975d9484..9dc0eb8eca1 100644 --- a/src/sage/geometry/polyhedron/library.py +++ b/src/sage/geometry/polyhedron/library.py @@ -3074,8 +3074,8 @@ def one_hundred_twenty_cell(self, exact=True, backend=None, construction='coxete - ``backend`` -- the backend to use to create the polytope - - ``construction`` -- the construction to use (string, default 'coxeter'); - the other possibility is 'as_permutahedron'. + - ``construction`` -- string (default: 'coxeter'); the construction to use. + The other possibility is 'as_permutahedron'. EXAMPLES: diff --git a/src/sage/graphs/base/graph_backends.pyx b/src/sage/graphs/base/graph_backends.pyx index 89cf4cedc86..dc4044407c9 100644 --- a/src/sage/graphs/base/graph_backends.pyx +++ b/src/sage/graphs/base/graph_backends.pyx @@ -515,7 +515,7 @@ cdef class GenericGraphBackend(SageObject): def loops(self, new=None): """ - Get/set whether or not self allows loops. + Get/set whether or not ``self`` allows loops. INPUT: @@ -539,7 +539,7 @@ cdef class GenericGraphBackend(SageObject): def multiple_edges(self, new=None): """ - Get/set whether or not self allows multiple edges. + Get/set whether or not ``self`` allows multiple edges. INPUT: @@ -563,7 +563,7 @@ cdef class GenericGraphBackend(SageObject): def name(self, new=None): """ - Get/set name of self. + Get/set name of ``self``. INPUT: diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index f0a69dc7bbe..ffedbe158b8 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -638,7 +638,7 @@ def _upgrade_from_graph(self): def __repr__(self): r""" - Return a short string representation of self. + Return a short string representation of ``self``. EXAMPLES:: @@ -2228,7 +2228,7 @@ def vertex_cover(self, algorithm='Konig', value_only=False, reduction_rules=True, solver=None, verbose=0, *, integrality_tolerance=1e-3): r""" - Return a minimum vertex cover of self represented by a set of vertices. + Return a minimum vertex cover of ``self`` represented by a set of vertices. A minimum vertex cover of a graph is a set `S` of vertices such that each edge is incident to at least one element of `S`, and such that `S` diff --git a/src/sage/graphs/connectivity.pyx b/src/sage/graphs/connectivity.pyx index 078e7713e03..e40dce70993 100644 --- a/src/sage/graphs/connectivity.pyx +++ b/src/sage/graphs/connectivity.pyx @@ -2769,7 +2769,7 @@ cdef _LinkedList_concatenate(_LinkedList * lst1, _LinkedList * lst2): cdef str _LinkedList_to_string(_LinkedList * ll): """ - Return a string representation of self. + Return a string representation of ``self``. """ cdef _LinkedListNode * temp = ll.head cdef list s = [] diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index 5bbf12d5182..b6b06f4ebbf 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -90,8 +90,8 @@ :meth:`~GenericGraph.complement` | Return the complement of the (di)graph. :meth:`~GenericGraph.line_graph` | Return the line graph of the (di)graph. :meth:`~GenericGraph.to_simple` | Return a simple version of itself (i.e., undirected and loops and multiple edges are removed). - :meth:`~GenericGraph.disjoint_union` | Return the disjoint union of self and other. - :meth:`~GenericGraph.union` | Return the union of self and other. + :meth:`~GenericGraph.disjoint_union` | Return the disjoint union of ``self`` and ``other``. + :meth:`~GenericGraph.union` | Return the union of ``self`` and ``other``. :meth:`~GenericGraph.relabel` | Relabel the vertices of ``self`` :meth:`~GenericGraph.degree_to_cell` | Return the number of edges from vertex to an edge in cell. :meth:`~GenericGraph.subgraph` | Return the subgraph containing the given vertices and edges. @@ -104,11 +104,11 @@ :widths: 30, 70 :delim: | - :meth:`~GenericGraph.cartesian_product` | Return the Cartesian product of self and other. - :meth:`~GenericGraph.tensor_product` | Return the tensor product, also called the categorical product, of self and other. - :meth:`~GenericGraph.lexicographic_product` | Return the lexicographic product of self and other. - :meth:`~GenericGraph.strong_product` | Return the strong product of self and other. - :meth:`~GenericGraph.disjunctive_product` | Return the disjunctive product of self and other. + :meth:`~GenericGraph.cartesian_product` | Return the Cartesian product of ``self`` and ``other``. + :meth:`~GenericGraph.tensor_product` | Return the tensor product, also called the categorical product, of ``self`` and ``other``. + :meth:`~GenericGraph.lexicographic_product` | Return the lexicographic product of ``self`` and ``other``. + :meth:`~GenericGraph.strong_product` | Return the strong product of ``self`` and ``other``. + :meth:`~GenericGraph.disjunctive_product` | Return the disjunctive product of ``self`` and ``other``. **Paths and cycles:** @@ -163,8 +163,8 @@ :meth:`~GenericGraph.coarsest_equitable_refinement` | Return the coarsest partition which is finer than the input partition, and equitable with respect to self. :meth:`~GenericGraph.automorphism_group` | Return the largest subgroup of the automorphism group of the (di)graph whose orbit partition is finer than the partition given. - :meth:`~GenericGraph.is_vertex_transitive` | Return whether the automorphism group of self is transitive within the partition provided - :meth:`~GenericGraph.is_isomorphic` | Test for isomorphism between self and other. + :meth:`~GenericGraph.is_vertex_transitive` | Return whether the automorphism group of ``self`` is transitive within the partition provided + :meth:`~GenericGraph.is_isomorphic` | Test for isomorphism between ``self`` and ``other``. :meth:`~GenericGraph.canonical_label` | Return the canonical graph. :meth:`~GenericGraph.is_cayley` | Check whether the graph is a Cayley graph. @@ -540,7 +540,7 @@ def __add__(self, other): def __eq__(self, other): """ - Compare self and other for equality. + Compare ``self`` and ``other`` for equality. Do not call this method directly. That is, for ``G.__eq__(H)`` write ``G == H``. @@ -7373,7 +7373,7 @@ def edge_cut(self, s, t, value_only=True, use_edge_labels=False, vertices=False, r""" Return a minimum edge cut between vertices `s` and `t`. - A minimum edge cut between two vertices `s` and `t` of self is a set `A` + A minimum edge cut between two vertices `s` and `t` of ``self`` is a set `A` of edges of minimum weight such that the graph obtained by removing `A` from the graph is disconnected. For more information, see the :wikipedia:`Cut_(graph_theory)`. @@ -24007,9 +24007,9 @@ def is_vertex_transitive(self, partition=None, verbosity=0, edge_labels=False, order=False, return_group=True, orbits=False): """ - Return whether the automorphism group of self is transitive within + Return whether the automorphism group of ``self`` is transitive within the partition provided, by default the unit partition of the - vertices of self (thus by default tests for vertex transitivity in + vertices of ``self`` (thus by default tests for vertex transitivity in the usual sense). EXAMPLES:: @@ -24137,7 +24137,7 @@ def is_hamiltonian(self, solver=None, constraint_generation=None, def is_isomorphic(self, other, certificate=False, verbosity=0, edge_labels=False): r""" - Test for isomorphism between self and other. + Test for isomorphism between ``self`` and ``other``. INPUT: diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py index 59b1e89457e..a4f567fea84 100644 --- a/src/sage/graphs/graph.py +++ b/src/sage/graphs/graph.py @@ -2703,7 +2703,7 @@ def is_perfect(self, certificate=False): @doc_index("Graph properties") def is_edge_transitive(self): r""" - Check if self is an edge transitive graph. + Check if ``self`` is an edge transitive graph. A graph is edge-transitive if its automorphism group acts transitively on its edge set. @@ -2748,7 +2748,7 @@ def is_edge_transitive(self): @doc_index("Graph properties") def is_arc_transitive(self): r""" - Check if self is an arc-transitive graph. + Check if ``self`` is an arc-transitive graph. A graph is arc-transitive if its automorphism group acts transitively on its pairs of adjacent vertices. @@ -2788,7 +2788,7 @@ def is_arc_transitive(self): @doc_index("Graph properties") def is_half_transitive(self): """ - Check if self is a half-transitive graph. + Check if ``self`` is a half-transitive graph. A graph is half-transitive if it is both vertex and edge transitive but not arc-transitive. @@ -2825,7 +2825,7 @@ def is_half_transitive(self): @doc_index("Graph properties") def is_semi_symmetric(self): """ - Check if self is semi-symmetric. + Check if ``self`` is semi-symmetric. A graph is semi-symmetric if it is regular, edge-transitive but not vertex-transitive. @@ -6344,7 +6344,7 @@ def twograph(self): .. SEEALSO:: - :meth:`~sage.combinat.designs.twographs.TwoGraph.descendant` -- - computes the descendant graph of the two-graph of self at a vertex + computes the descendant graph of the two-graph of ``self`` at a vertex - :func:`~sage.combinat.designs.twographs.twograph_descendant` -- ditto, but much faster. @@ -7146,7 +7146,7 @@ def vertex_cover(self, algorithm='Cliquer', value_only=False, reduction_rules=True, solver=None, verbose=0, *, integrality_tolerance=1e-3): r""" - Return a minimum vertex cover of self represented by a set of vertices. + Return a minimum vertex cover of ``self`` represented by a set of vertices. A minimum vertex cover of a graph is a set `S` of vertices such that each edge is incident to at least one element of `S`, and such that `S` @@ -7743,10 +7743,10 @@ def cliques_containing_vertex(self, vertices=None, cliques=None): @doc_index("Clique-related methods") def clique_complex(self): """ - Return the clique complex of self. + Return the clique complex of ``self``. - This is the largest simplicial complex on the vertices of self whose - 1-skeleton is self. + This is the largest simplicial complex on the vertices of ``self`` whose + 1-skeleton is ``self``. This is only makes sense for undirected simple graphs. @@ -7776,7 +7776,7 @@ def clique_complex(self): @doc_index("Clique-related methods") def clique_polynomial(self, t=None): r""" - Return the clique polynomial of self. + Return the clique polynomial of ``self``. This is the polynomial where the coefficient of `t^n` is the number of cliques in the graph with `n` vertices. The constant term of the clique @@ -8594,7 +8594,7 @@ def _gomory_hu_tree(self, vertices, algorithm=None): @doc_index("Connectivity, orientations, trees") def gomory_hu_tree(self, algorithm=None): r""" - Return a Gomory-Hu tree of self. + Return a Gomory-Hu tree of ``self``. Given a tree `T` with labeled edges representing capacities, it is very easy to determine the maximum flow between any pair of vertices : diff --git a/src/sage/graphs/graph_decompositions/modular_decomposition.py b/src/sage/graphs/graph_decompositions/modular_decomposition.py index 68c06d603ed..22870f95dfd 100644 --- a/src/sage/graphs/graph_decompositions/modular_decomposition.py +++ b/src/sage/graphs/graph_decompositions/modular_decomposition.py @@ -160,14 +160,14 @@ def __init__(self, node_type): def set_node_split(self, node_split): """ - Add node_split to the node split of self. + Add node_split to the node split of ``self``. ``LEFT_SPLIT`` and ``RIGHT_SPLIT`` can exist together in ``self`` as ``BOTH_SPLIT``. INPUT: - - ``node_split`` -- node_split to be added to self + - ``node_split`` -- ``node_split`` to be added to ``self`` EXAMPLES:: diff --git a/src/sage/graphs/pq_trees.py b/src/sage/graphs/pq_trees.py index 2fa3e37f530..a5063d755dd 100644 --- a/src/sage/graphs/pq_trees.py +++ b/src/sage/graphs/pq_trees.py @@ -414,7 +414,7 @@ def __repr__(self): def simplify(self, v, left=False, right=False): r""" - Return a simplified copy of self according to the element ``v``. + Return a simplified copy of ``self`` according to the element ``v``. If ``self`` is a partial P-tree for ``v``, we would like to restrict the permutations of its children to permutations @@ -502,7 +502,7 @@ def flatten(self): r""" Return a flattened copy of ``self``. - If self has only one child, we may as well consider its + If ``self`` has only one child, we may as well consider its child's children, as ``self`` encodes no information. This method recursively "flattens" trees having only on PQ-tree child, and returns it. diff --git a/src/sage/graphs/schnyder.py b/src/sage/graphs/schnyder.py index 13d4ce10b83..2082ea33104 100644 --- a/src/sage/graphs/schnyder.py +++ b/src/sage/graphs/schnyder.py @@ -613,9 +613,9 @@ def __init__(self, parent=None, children=None, label=None): def compute_number_of_descendants(self): """ - Compute the number of descendants of self and all descendants. + Compute the number of descendants of ``self`` and all descendants. - For each TreeNode, sets result as attribute self.number_of_descendants + For each TreeNode, sets result as attribute ``self.number_of_descendants``. EXAMPLES:: @@ -642,9 +642,9 @@ def compute_number_of_descendants(self): def compute_depth_of_self_and_children(self): """ - Compute the depth of self and all descendants. + Compute the depth of ``self`` and all descendants. - For each TreeNode, sets result as attribute self.depth + For each TreeNode, sets result as ``attribute self.depth``. EXAMPLES::