Skip to content
Open
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
12 changes: 12 additions & 0 deletions doc/news/homology.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**Added:**

* Homology of fat graph and generic spin parity computation

**Deprecated:**

* RibbonGraph are deprecated in favor of FatGraph

**Removed:**

* it is not possible anymore to build a pillowcase cover from
a QuadraticCylinderDiagram and (length, height, twist) coordinates
20 changes: 19 additions & 1 deletion surface_dynamics/flat_surfaces/abelian_strata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,23 @@ def permutation_representative(self, left_degree=None, reduced=True, alphabet=No
1
sage: p.rauzy_diagram()
Rauzy diagram with 20 permutations

TESTS::

sage: from surface_dynamics import AbelianStratum
sage: assert AbelianStratum(6).hyperelliptic_component().permutation_representative(reduced=True)._labels is None
sage: assert AbelianStratum(6).odd_component().permutation_representative(reduced=True)._labels is None
sage: assert AbelianStratum(6).even_component().permutation_representative(reduced=True)._labels is None
sage: assert AbelianStratum(3, 3).hyperelliptic_component().permutation_representative(reduced=True)._labels is None
sage: assert AbelianStratum(3, 3).non_hyperelliptic_component().permutation_representative(reduced=True)._labels is None
sage: assert AbelianStratum(1, 1, 1, 1).unique_component().permutation_representative(reduced=True)._labels is None

sage: assert AbelianStratum(6).hyperelliptic_component().permutation_representative(reduced=False)._labels is not None
sage: assert AbelianStratum(6).odd_component().permutation_representative(reduced=False)._labels is not None
sage: assert AbelianStratum(6).even_component().permutation_representative(reduced=False)._labels is not None
sage: assert AbelianStratum(3, 3).hyperelliptic_component().permutation_representative(reduced=False)._labels is not None
sage: assert AbelianStratum(3, 3).non_hyperelliptic_component().permutation_representative(reduced=False)._labels is not None
sage: assert AbelianStratum(1, 1, 1, 1).unique_component().permutation_representative(reduced=False)._labels is not None
"""
g = self._stratum.genus()
n = self._stratum.nb_fake_zeros()
Expand Down Expand Up @@ -2239,14 +2256,15 @@ def permutation_representative(self, left_degree=None, reduced=True, alphabet=No
if reduced:
from surface_dynamics.interval_exchanges.reduced import ReducedPermutationIET
p = ReducedPermutationIET([l0, l1])

else:
from surface_dynamics.interval_exchanges.labelled import LabelledPermutationIET
p = LabelledPermutationIET([l0, l1])

if alphabet is not None:
p.alphabet(alphabet)
elif relabel:
p.alphabet(range(len(p)))

return p

def rauzy_class_cardinality(self, left_degree=None, reduced=True):
Expand Down
Loading