## Complexes
# Square
#square = [[0], [1], [2], [3], [0,1], [0,3], [1,2], [2,3]]
#square = [Simplex(vertices) for vertices in square]
#square_points = [[0,0], [0,1], [1,1], [1,0]]
#show_complex(square_points, square)
# 8-sphere
simplex_9 = Simplex(range(10)) # 9-simplex
sphere_8 = closure([simplex_9], 8) # 8-skeleton of the 9_simplex
print "Number of simplices:", len(sphere_8)
f = Filtration(sphere_8, dim_cmp)
p = StaticPersistence(f)
p.pair_simplices()
dgms = init_diagrams(p, f, lambda s: 0)
for i, dgm in enumerate(dgms):
print "Dimension:", i
print dgm