lscubes.py output infinite pairs + small bugfix dev
authorDmitriy Morozov <dmitriy@mrzv.org>
Wed, 10 Jul 2013 14:39:29 -0700
branchdev
changeset 276 4e136f6afbb5
parent 275 5f5f4cc70333
child 277 b4fd8880a09a
lscubes.py output infinite pairs + small bugfix
examples/pl-functions/lscubes.py
--- a/examples/pl-functions/lscubes.py	Mon Jun 10 17:25:57 2013 +0200
+++ b/examples/pl-functions/lscubes.py	Wed Jul 10 14:39:29 2013 -0700
@@ -36,12 +36,17 @@
     for c in fltr:
         # print "%s: %s" % (c, " + ".join(map(str, c.boundary())))
         # print complex
-        i,d = ch.add([complex[cb] for cb in c.boundary()], c.data)
+        i,d,_ = ch.add([complex[cb] for cb in c.boundary()], c.data)
         complex[c] = i
         if d:
             birth = d
             print c.dimension() - 1, max_vertex(fltr[birth], vertices), max_vertex(c, vertices)
 
+    for ccl in ch:
+        birth = ccl.birth
+        c = fltr[birth]
+        print c.dimension(), max_vertex(c, vertices), 'inf'
+
 if __name__ == '__main__':
     if len(argv) < 3:
         print "Usage: %s VERTICES CUBES" % argv[0]