@@ -18,8 +18,8 @@ permuta
18
18
.. image :: https://requires.io/github/PermutaTriangle/Permuta/requirements.svg?branch=master
19
19
:target: https://requires.io/github/PermutaTriangle/Permuta/requirements/?branch=master
20
20
:alt: Requirements Status
21
- .. image :: https://zenodo.org/badge/DOI/10.5281/zenodo.4725759 .svg
22
- :target: https://doi.org/10.5281/zenodo.4725759
21
+ .. image :: https://zenodo.org/badge/DOI/10.5281/zenodo.4725758 .svg
22
+ :target: https://doi.org/10.5281/zenodo.4725758
23
23
24
24
Permuta is a Python library for working with perms (short for permutations),
25
25
patterns, and mesh patterns.
@@ -114,6 +114,21 @@ Printing perms gives zero-based strings.
114
114
>> > print (Perm((6 , 2 , 10 , 9 , 3 , 8 , 0 , 1 , 5 , 11 , 4 , 7 )))
115
115
(6 )(2 )(10 )(9 )(3 )(8 )(0 )(1 )(5 )(11 )(4 )(7 )
116
116
117
+ To get an iterator of all permutations of a certain length you can use
118
+
119
+ .. code-block :: python
120
+
121
+ >> > Perms4 = Perm.of_length(4 )
122
+
123
+ You can run a for-loop over this iterator if you need to do something with all
124
+ the permutations of this size. If you just want a specific permutation of this
125
+ size you might be better off using the unrank function.
126
+
127
+ .. code-block :: python
128
+
129
+ >> > Perm.unrank(23 ,4 )
130
+ Perm((3 , 2 , 1 , 0 ))
131
+
117
132
The avoids, contains, and occurrence methods enable working with patterns:
118
133
119
134
.. code-block :: python
@@ -206,6 +221,11 @@ given class.
206
221
>> > for strat in find_strategies(basis):
207
222
... print (strat.reference())
208
223
Enumeration of Permutation Classes and Weighted Labelled Independent Sets: Corollary 4.3
224
+ >> > basis = [Perm((1 , 3 , 0 , 2 )), Perm((2 , 0 , 3 , 1 ))]
225
+ >> > for strat in find_strategies(basis):
226
+ ... print (strat.reference())
227
+ Enumeration of Permutation Classes and Weighted Labelled Independent Sets: Corollary 4.6
228
+ The class contains only finitely many simple permutations
209
229
210
230
Permutation statistics
211
231
######################
@@ -506,6 +526,6 @@ Citing
506
526
If you found this library helpful with your research and would like to cite us,
507
527
you can use the following `BibTeX `_ or go to `Zenodo `_ for alternative formats.
508
528
509
- .. _BibTex : https://zenodo.org/record/4725759 /export/hx#.YImTibX7SUk
529
+ .. _BibTex : https://zenodo.org/record/4945792 /export/hx#.YImTibX7SUk
510
530
511
- .. _Zenodo : https://doi.org/10.5281/zenodo.4725759
531
+ .. _Zenodo : https://doi.org/10.5281/zenodo.4725758
0 commit comments