Commit 2b4bec7d by Vincent Delecroix

### get rid of balanced statistics

parent 8777ac7c
Pipeline #54063300 canceled with stage
 ... ... @@ -322,17 +322,7 @@ class Automaton(object): sage: from surface_dynamics import * sage: A = Automaton.from_stratum(AbelianStratum(2)) sage: A.statistics() {0: 24, 1: 4, 2: 4, 48: 2, 80: 2, 112: 24, 113: 5, 114: 5, 120: 10, 125: 3, 126: 3} {0: 24, 1: 4, 2: 4, 16: 28, 17: 5, 18: 5, 24: 10, 29: 3, 30: 3} """ from collections import defaultdict d = defaultdict(int) ... ...
 ... ... @@ -26,10 +26,8 @@ SQUARETILED = 1 << 2 QUADRANGULABLE = 1 << 3 CYLINDRICAL = RED | BLUE GEOMETRIC = 1 << 4 VBALANCED = 1 << 5 HBALANCED = 1 << 6 ST = SQUARETILED | GEOMETRIC | VBALANCED | HBALANCED ST = SQUARETILED | GEOMETRIC PROPERTIES_COLOURS = { NONE : '#FFFFFF', # white ... ... @@ -43,12 +41,10 @@ PROPERTIES_COLOURS = { } def key_property(p): return -((1<<8) * bool(p & BLUE) | \ (1<<7) * bool(p & RED) | \ (1<<6) * bool(p & SQUARETILED) | \ (1<<5) * bool(p & GEOMETRIC) | \ (1<<4) * bool(p & VBALANCED) | \ (1<<3) * bool(p & HBALANCED)) return -((1<<4) * bool(p & BLUE) | \ (1<<3) * bool(p & RED) | \ (1<<2) * bool(p & SQUARETILED) | \ (1<<1) * bool(p & GEOMETRIC)) def properties_to_string(p): r""" ... ... @@ -58,7 +54,7 @@ def properties_to_string(p): sage: from veerer.constants import * sage: T = VeeringTriangulation("(0,1,8)(2,~7,~1)(3,~0,~2)(4,~5,~3)(5,6,~4)(7,~8,~6)", "BRRRRBRBR") sage: properties_to_string(T.properties_code()) 'red geometric h-balanced' 'red geometric' sage: properties_to_string(ST|BLUE) 'blue square-tiled' ... ... @@ -92,13 +88,6 @@ def properties_to_string(p): if p & GEOMETRIC: s.append('geometric') if p & VBALANCED and p & HBALANCED: s.append('hv-balanced') elif p & HBALANCED: s.append('h-balanced') elif p & VBALANCED: s.append('v-balanced') if s: return ' '.join(s) else: ... ...
 ... ... @@ -1772,12 +1772,11 @@ class VeeringTriangulation(Triangulation): sage: from veerer.constants import properties_to_string sage: T = VeeringTriangulation("(0,1,8)(2,~7,~1)(3,~0,~2)(4,~5,~3)(5,6,~4)(7,~8,~6)", "BRRRRBRBR") sage: T.properties_code() 81 17 sage: properties_to_string(81) 'red geometric h-balanced' 'red geometric' """ from .constants import (BLUE, RED, SQUARETILED, SQUARETILED, QUADRANGULABLE, GEOMETRIC, VBALANCED, HBALANCED) from .constants import BLUE, RED, SQUARETILED, QUADRANGULABLE, GEOMETRIC code = 0 if self.is_square_tiled(RED): ... ... @@ -1794,22 +1793,14 @@ class VeeringTriangulation(Triangulation): code |= BLUE if self.is_geometric(): code |= GEOMETRIC if self.is_balanced(VERTICAL): code |= VBALANCED if self.is_balanced(HORIZONTAL): code |= HBALANCED if code & BLUE and code & RED: raise RuntimeError("found a blue and red triangulations!") if code & SQUARETILED: if not code & BLUE and not code & RED: raise RuntimeError("square-tiled should be colored") raise RuntimeError("square-tiled should be coloured") if not code & GEOMETRIC: raise RuntimeError("square-tiled should be geometric") if not code & VBALANCED: raise RuntimeError("square-tiled should be v-balanced") if not code & HBALANCED: raise RuntimeError("square-tiled should be h-balanced") return code ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!