Commit 4261f079 authored by Manuel Schrauth's avatar Manuel Schrauth
Browse files

provide __len__ for core classes

parent 8e4fdf04
......@@ -39,6 +39,9 @@ class VertexTilingClass:
else:
raise StopIteration
def __len__(self):
return len(self.polygons)
# constructs the vertices of the fundamental hyperbolic {p,q} polygon
def create_fundamental_polygon(self):
r = fund_radius(self.p, self.q)
......@@ -140,6 +143,9 @@ class HyperbolicTiling:
else:
raise StopIteration
def __len__(self):
return len(self.polygons)
def create_fundamental_polygon(self): # constructs the vertices of the fundamental hyperbolic {p,q} polygon
r = fund_radius(self.p, self.q)
polygon = HyperPolygon(self.p, self.q)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment