@@ -20,6 +20,8 @@ AUTHORS:
2020
2121- Sébastien Labbé, April 2014, at Sage Days 57, Cernay-la-ville
2222
23+ EXAMPLES:
24+
2325No hypothesis on the structure
2426------------------------------
2527
@@ -28,8 +30,6 @@ to be a forest, symmetric, or graded. However, it may have other
2830structure, such as not containing an oriented cycle, that does not
2931help with the enumeration.
3032
31- EXAMPLES:
32-
3333In this example, the seed is 0 and the successor function is either ``+ 2``
3434or ``+ 3``. This is the set of non negative linear combinations of 2 and 3::
3535
@@ -55,9 +55,7 @@ Symmetric structure
5555
5656The origin ``( 0, 0) `` as seed and the upper, lower, left and right lattice
5757point as successor function. This function is symmetric since `p` is a
58- successor of `q` if and only if `q` is a successor or `p`:
59-
60- EXAMPLES::
58+ successor of `q` if and only if `q` is a successor or `p`::
6159
6260 sage: succ = lambda a: [(a[0 ]-1,a[1 ]), ( a[0 ],a[1 ]-1) , ( a[0 ]+ 1,a[1 ]) , ( a[0 ],a[1 ]+ 1) ]
6361 sage: seeds = [(0,0) ]
@@ -92,9 +90,7 @@ Graded structure
9290----------------
9391
9492Identity permutation as seed and ``permutohedron_succ`` as successor
95- function:
96-
97- EXAMPLES::
93+ function::
9894
9995 sage: succ = attrcall( "permutohedron_succ")
10096 sage: seed = [Permutation([1..5 ])]
@@ -144,7 +140,7 @@ Graded components (set of elements of the same depth)::
144140Forest structure
145141----------------
146142
147- EXAMPLES:
143+ .. RUBRIC:: Forest structure [ Ex 1 ]
148144
149145The set of words over the alphabet `\{ a,b\} ` can be generated from the
150146empty word by appending the letter `a` or `b` as a successor function. This set
@@ -168,7 +164,7 @@ Breadth first search iterator::
168164 sage: [next(it) for _ in range(6) ]
169165 ['', 'a', 'b', 'aa', 'ab', 'ba' ]
170166
171- The following example of Forest structure was provided by Florent Hivert.
167+ This example was provided by Florent Hivert.
172168
173169How to define a set using those classes?
174170
234230 sage: S. list( )
235231 ['', 'a', 'aa', 'ab', 'ac', 'b', 'ba', 'bb', 'bc', 'c', 'ca', 'cb', 'cc' ]
236232
237- The following example of Forest structure was provided by Florent Hivert.
233+ .. RUBRIC:: Forest structure [Ex 2 ]
234+
235+ This example was provided by Florent Hivert.
238236
239237Here is a little more involved example. We want to iterate through all
240238permutations of a given set `S`. One solution is to take elements of `S` one
@@ -1692,8 +1690,6 @@ class RecursivelyEnumeratedSet_forest(Parent):
16921690 recover the corresponding integers, and discard tuples finishing
16931691 by zero.
16941692
1695- EXAMPLES:
1696-
16971693 A first approach is to pass the ``roots`` and ``children``
16981694 functions as arguments to :meth:`RecursivelyEnumeratedSet_forest. __init__`::
16991695
0 commit comments