Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/aho-corasick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ This function returns the index of the child of the node with index
:param letter: the edge-label connecting the parent to the desired child.
:type letter: int

:returns: the index of the child.
:returns: The index of the child.
:rtype: int | Undefined

:raises LibsemigroupsError: if ``throw_if_node_index_not_active(parent)`` raises an exception.
Expand All @@ -126,7 +126,7 @@ Calculate the height of a node.
:param i: the index of the node whose height is sought
:type i: int

:returns: the height.
:returns: The height.
:rtype: int

:raises LibsemigroupsError: if ``throw_if_node_index_not_active(i)`` raises an exception.
Expand Down
2 changes: 1 addition & 1 deletion src/cong-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ had been newly constructed from *knd* and *p*.
:param p: the presentation.
:type p: Presentation

:returns: *self*.
:returns: *self*.
:rtype: {name}

:raises LibsemigroupsError: if *p* is not valid.
Expand Down
6 changes: 3 additions & 3 deletions src/dot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ This function adds a node with name *name*.
:param name: the name of the node to add.
:type name: str

:returns: a newly created :any:`Dot.Node` object with name *name*.
:returns: A newly created :any:`Dot.Node` object with name *name*.
:rtype: Dot.Node

:raises LibsemigroupsError: if there is already a node with name *name*.
Expand All @@ -235,7 +235,7 @@ This function adds an edge from the node named *head* to the node named *tail*.
:param tail: the name of the node at the tail of the edge.
:type tail: str

:returns: a newly created :any:`Dot.Edge` object.
:returns: A newly created :any:`Dot.Edge` object.
:rtype: Dot.Edge

:raises LibsemigroupsError: if there is no node named *head* and/or *tail*.
Expand Down Expand Up @@ -326,7 +326,7 @@ the represented graph and ``False`` otherwise.
:param name: the name of the node.
:type name: str

:returns: whether or not *name* is the name of a node.
:returns: Whether or not *name* is the name of a node.
:rtype: bool
)pbdoc");
dot.def("kind",
Expand Down
4 changes: 2 additions & 2 deletions src/errors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ emanate from C++. This function returns whether :any:`LibsemigroupsError`
messages contain a prefix that indicates which C++ function raised the
exception.

:return: Whether :any:`LibsemigroupsError` messages contain a prefix about the
:returns: Whether :any:`LibsemigroupsError` messages contain a prefix about the
C++ function that raised the exception.
:rtype: bool
)pbdoc");
Expand All @@ -103,7 +103,7 @@ emanate from C++. This function specifies whether :any:`LibsemigroupsError`
messages should contain a prefix that indicates which C++ function raised the
exception. By default, this information is not included.

:param val: Whether :any:`LibsemigroupsError` messages should contain a prefix
:param val: whether :any:`LibsemigroupsError` messages should contain a prefix
about the C++ function that raised the exception.
:type val: bool

Expand Down
2 changes: 1 addition & 1 deletion src/forest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ Get the size of the range.

This function returns the number of paths in the range.

:returns: the number of paths in the range.
:returns: The number of paths in the range.
:rtype: int
)pbdoc");

Expand Down
2 changes: 1 addition & 1 deletion src/freeband.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ band.
:param y: the second word to compare in the free band.
:type y: list[int]

:return:
:returns:
``True`` if both words are the same as elements of the free band and
``False`` otherwise.
:rtype: bool
Expand Down
18 changes: 10 additions & 8 deletions src/froidure-pin-base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace libsemigroups {
"FroidurePinBase",
R"pbdoc(
Base class for :any:`FroidurePin` containing non-element specific data and
member functions. :any:`FroidurePin` is an abstract class which cannot be
member functions. :any:`FroidurePinBase` is an abstract class which cannot be
instantiated directly, only via the derived class :any:`FroidurePin`.)pbdoc");

thing.def(
Expand Down Expand Up @@ -67,7 +67,7 @@ Set a new value for the batch size.
The *batch size* is the number of new elements to be found by any call to
:any:`Runner.run`. This is used by, for example, :any:`FroidurePin.position` so
that it is possible to find the position of an element after only partially
enumerating the semigroup.The default value of the batch size is ``8192``.
enumerating the semigroup. The default value of the batch size is ``8192``.

:param val: the new value for the batch size.
:type val: int
Expand Down Expand Up @@ -171,7 +171,7 @@ This function return the right Cayley graph of the semigroup as it has been
enumerated so-far. No enumeration is triggered by calls to this function.

:returns:
The (possibly partially enumerated) left Cayley graph.
The (possibly partially enumerated) right Cayley graph.
:rtype:
WordGraph

Expand Down Expand Up @@ -292,7 +292,8 @@ first letter of the element.
Check if the categorical multiplicative identity is an element.

:returns:
Whether or not the one of any of the elements belongs to the semigroup.
Whether or not the categorical multiplicative identity belongs to the
semigroup.
:rtype:
bool

Expand All @@ -310,7 +311,8 @@ Check if the categorical multiplicative identity is an element.
Check if the categorical multiplicative identity is an element.

:returns:
Whether or not the one of any of the elements belongs to the semigroup.
Whether or not the categorical multiplicative identity belongs to the
semigroup.
:rtype:
bool

Expand Down Expand Up @@ -424,7 +426,7 @@ trigger any enumeration.
Returns the total number of relations in a presentation defining the semigroup.
This function triggers a full enumeration of the semigroup.

:returns: The number of rules so-far found.
:returns: The total number of rules.
:rtype: int

:complexity:
Expand Down Expand Up @@ -632,7 +634,7 @@ Returns an iterator yielding the so-far enumerated normal forms (if any).
This function returns an iterator yielding the normal forms of the semigroup
represented by *fp* instance (if any). This function does not perform any
enumeration of *fp*. If you want to obtain the
complete set of rules, then use :any:`normal_forms` instead.
complete set of normal forms, then use :any:`normal_forms` instead.

:param fp:
the :any:`FroidurePin` object.
Expand Down Expand Up @@ -753,7 +755,7 @@ Returns an iterator yielding the rules.

This function returns an iterator yielding the rules in a confluent terminating
rewriting system defining a semigroup isomorphic to the one defined by
*fp*. This function performs a full enumeration of *fp* If you want to
*fp*. This function performs a full enumeration of *fp*. If you want to
obtain the current set of rules without triggering any enumeration, then
use :any:`current_rules` instead.

Expand Down
12 changes: 6 additions & 6 deletions src/froidure-pin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Copy a :any:`FroidurePin` object.
R"pbdoc(
:sig=(self: FroidurePin, i: int) -> int:

Returns the position in of the generator with specified index.
Returns the position of the generator with specified index.

In many cases :any:`FroidurePin.current_position` called with argument *i* will
return *i*, examples of when this will not be the case are:
Expand Down Expand Up @@ -148,7 +148,7 @@ better to just multiply the transformations together.
:rtype: int

:raises LibsemigroupsError:
if the values *i* and *j* are greater than or equal to
if *i* or *j* is greater than or equal to
:any:`FroidurePin.current_size`.
)pbdoc");

Expand Down Expand Up @@ -283,7 +283,7 @@ elements are sorted, or :any:`UNDEFINED` if *i* is greater than

Returns the position corresponding to a word.

This function returns the position in *fp* corresponding to the the word
This function returns the position in *fp* corresponding to the word
*w* (in the generators). No enumeration is performed, and :any:`UNDEFINED`
is returned if the position of the element corresponding to *w* cannot be
determined.
Expand Down Expand Up @@ -365,7 +365,7 @@ is that the resulting factorisation may not be minimal.
:param x: a possible element, or index of element, to factorise.
:type x: Element | int

:returns: Returns a word in the generators which evaluates to *x*.
:returns: A word in the generators which evaluates to *x*.
:rtype: list[int]

:raises LibsemigroupsError:
Expand Down Expand Up @@ -548,7 +548,7 @@ Add a copy of an element to the generators.
This function can be used to add new generators to an existing
:any:`FroidurePin` instance in such a way that any previously enumerated data
is preserved and not recomputed, or copied. This can be faster than recomputing
the semigroup generated by the old generators and the new generators.This
the semigroup generated by the old generators and the new generators. This
function changes the semigroup in-place, thereby invalidating possibly
previously known data about the semigroup, such as the left or right Cayley
graphs, number of idempotents, and so on.
Expand Down Expand Up @@ -863,7 +863,7 @@ in the same state as if it had just been constructed from *gens*.

Find the position of an element with enumeration if necessary.

This function the position of *x* in a :any:`FroidurePin` instance, or
This function returns the position of *x* in a :any:`FroidurePin` instance, or
:any:`UNDEFINED` if *x* is not an element.

:param x: a possible element.
Expand Down
14 changes: 7 additions & 7 deletions src/gabow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ This function constructs a :any:`Gabow` object from a :any:`WordGraph` *wg*.

Returns a list containing the strongly connected component with given index.

This function returns a list containing the strongly connected components with
This function returns a list containing the strongly connected component with
index *i* of the :any:`WordGraph` (returned by :any:`Gabow.word_graph`) used
to construct the :any:`Gabow` instance.

Expand All @@ -113,7 +113,7 @@ to construct the :any:`Gabow` instance.
:rtype: list[int]

:raises LibsemigroupsError:
if there is *i* is greater than or equal to
if *i* is greater than or equal to
:any:`number_of_components`.

.. note::
Expand All @@ -131,8 +131,8 @@ to construct the :any:`Gabow` instance.

Returns a list containing the strongly connected component of a given node.

This function returns a list containing the strongly connected components of
the node *n* of the :any:`WordGraph` (returned by :any:`Gabow.word_graph` ) used to
This function returns a list containing the strongly connected component of
the node *n* of the :any:`WordGraph` (returned by :any:`Gabow.word_graph`) used to
construct the :any:`Gabow` instance.

:param n: the node.
Expand Down Expand Up @@ -210,7 +210,7 @@ underlying graph of a :any:`Gabow` instance.
This function re-initializes a :any:`Gabow` object so that it is in the same
state as if it had just been constructed from *wg*.

:param wg: The word graph.
:param wg: the word graph.
:type wg: WordGraph

:returns: *self*.
Expand Down Expand Up @@ -262,8 +262,8 @@ Returns the root of the strongly connected component containing a given node.

This function returns the root of the strongly connected component containing
the node *n* of the underlying :any:`WordGraph`. Two nodes ``a`` and ``b``
belong to the same strongly connected component if and only if ``root_of(a) ==
root_of(b)``.
belong to the same strongly connected component if and only if
``root_of(a) == root_of(b)``.

:param n: the node.
:type n: int
Expand Down
Loading