Skip to content

Commit 62437bb

Browse files
committed
Fixed the documentation
1 parent d39eedc commit 62437bb

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

src/sage/sets/recursively_enumerated_set.pyx

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ No hypothesis on the structure
2525
2626
What we mean by "no hypothesis" is that the set is not known
2727
to be a forest, symmetric, or graded. However, it may have other
28-
structures, such as not containing an oriented cycle, that do not
28+
structure, such as not containing an oriented cycle, that does not
2929
help with the enumeration.
3030
3131
In this example, the seed is 0 and the successor function is either ``+2``
@@ -171,8 +171,25 @@ Only two things are necessary to define a set using a
171171
:class:`RecursivelyEnumeratedSet` object (the other
172172
classes being very similar):
173173
174-
.. figure:: ../../media/recursively-enumerated-set.png
175-
:scale: 67 %
174+
.. MATH::
175+
176+
\begin{array}{rcl}
177+
& ^{``}\hspace{0.5em}^{"} \\
178+
\swarrow & \downarrow & \searrow \\[5pt]
179+
^{``}a^{"} \hspace{3.125em} & ^{``}b^{"} & \hspace{3.125em}^{``}c^{"} \\
180+
\begin{array}{rcl}
181+
\swarrow & \downarrow & \searrow \\[5pt]
182+
^{``}aa^{"}\: & ^{``}ab^{"} & \:^{``}ac^{"} \\
183+
\end{array} &
184+
\begin{array}{rcl}
185+
\swarrow & \downarrow & \searrow \\[5pt]
186+
^{``}ba^{"}\: & ^{``}bb^{"} & \:^{``}bc^{"} \\
187+
\end{array} &
188+
\begin{array}{rcl}
189+
\swarrow & \downarrow & \searrow \\[5pt]
190+
^{``}ca^{"}\: & ^{``}cb^{"} & \:^{``}cc^{"} \\
191+
\end{array}
192+
\end{array}
176193
177194
For the previous example, the two necessary pieces of information are:
178195
@@ -369,7 +386,7 @@ def RecursivelyEnumeratedSet(seeds, successors, structure=None,
369386
370387
.. WARNING::
371388
372-
If you do not set a good structure, you might obtain bad results,
389+
If you do not set a valid structure, you might obtain bad results,
373390
like elements generated twice::
374391
375392
sage: f = lambda a: [a-1,a+1]
@@ -1537,9 +1554,9 @@ def search_forest_iterator(roots, children, algorithm='depth'):
15371554
[0, 1, 2], [0, 2, 1], [1, 0, 2], [1, 2, 0], [2, 0, 1], [2, 1, 0]]
15381555
"""
15391556
# Little trick: the same implementation handles both depth and
1540-
# breadth first search. Setting the position to -1 makes a depth search
1557+
# breadth first search. Setting position to -1 initiates a depth search
15411558
# (you ask the children for the last node you met). Setting
1542-
# position on 0 makes a breadth search (enumerate all the
1559+
# position on 0 initiates a breadth search (enumerate all the
15431560
# descendants of a node before going on to the next father)
15441561
if algorithm == 'depth':
15451562
position = -1
@@ -1884,7 +1901,7 @@ class RecursivelyEnumeratedSet_forest(Parent):
18841901
r"""
18851902
Return an iterator over the elements of ``self`` of given depth.
18861903
An element of depth `n` can be obtained by applying the
1887-
children function `n` times from the root. This function is not affected
1904+
children function `n` times from a root. This function is not affected
18881905
by post processing.
18891906
18901907
EXAMPLES::
@@ -1915,7 +1932,7 @@ class RecursivelyEnumeratedSet_forest(Parent):
19151932
r"""
19161933
Return an iterator over the elements of ``self`` of given depth.
19171934
An element of depth `n` can be obtained by applying the
1918-
children function `n` times from the root.
1935+
children function `n` times from a root.
19191936
19201937
EXAMPLES::
19211938

0 commit comments

Comments
 (0)