File: dd-tree.py

package info (click to toggle)
regina-normal 5.1-6
  • links: PTS
  • area: main
  • in suites: buster
  • size: 54,488 kB
  • sloc: cpp: 142,029; ansic: 19,218; xml: 9,844; objc: 7,729; perl: 1,190; python: 623; sh: 614; makefile: 34
file content (28 lines) | stat: -rw-r--r-- 879 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import time

progress = 1

sigs = [ 'tLAwLvLLMvQQQkcbbdfkonmlnroqprqqsshqnhjpiapvsvnjrgfohk',
         'uLAMLvvLzLQMQQcbcbdegmlopoqnrprsssttxxjxxjlldarjggsckofxr',
         'CLAMzLvvPwzALQwvQQQkbcbdefhkmnorpvvtsrywzwzBABBAAhhjhhhkfldtgwxapcbwvwswihlili',
         'xvLvvvwMvQPPQQQQcehpjtqksntrtvoupwpsuwsvwcgacalvucahatbhapaggjgfk' ]

def enum(t, coords, which, alg):
    start = time.clock()
    if progress:
        m = ProgressTracker()
        s = NormalSurfaces.enumerate(t, coords, which, alg, m)
        while not m.isFinished():
            print m.percent(), '%'
            time.sleep(0.3)
    else:
        s = NormalSurfaces.enumerate(t, coords, which, alg)
    print s
    print time.clock() - start

for sig in sigs:
    print sig
    t = Triangulation3.fromIsoSig(sig)

    enum(t, NS_QUAD, NS_VERTEX, NS_ALG_DEFAULT)
    enum(t, NS_QUAD, NS_VERTEX, NS_VERTEX_DD)