regina 7.3.1.1__cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of regina might be problematic. Click here for more details.

Files changed (163) hide show
  1. regina/__init__.py +203 -0
  2. regina/engine.cpython-313-x86_64-linux-gnu.so +0 -0
  3. regina/plainCompleter.py +221 -0
  4. regina/pyCensus/__init__.py +14 -0
  5. regina/pyCensus/christy-knots-links.tdb +0 -0
  6. regina/pyCensus/closed-hyp-census-full.tdb +0 -0
  7. regina/pyCensus/closed-nor-census-11.tdb +0 -0
  8. regina/pyCensus/closed-or-census-11.tdb +0 -0
  9. regina/pyCensus/cusped-hyp-nor-census-9.tdb +0 -0
  10. regina/pyCensus/cusped-hyp-or-census-9.tdb +0 -0
  11. regina/sageRegina/__init__.py +2 -0
  12. regina/sageRegina/config.py +9 -0
  13. regina/sageRegina/test.py +132 -0
  14. regina/sageRegina/testsuite/CMakeLists.txt +60 -0
  15. regina/sageRegina/testsuite/O2_1.rga +15 -0
  16. regina/sageRegina/testsuite/O2_1.tri +28 -0
  17. regina/sageRegina/testsuite/README.txt +20 -0
  18. regina/sageRegina/testsuite/alltypes.out +1551 -0
  19. regina/sageRegina/testsuite/alltypes.test +88 -0
  20. regina/sageRegina/testsuite/angles.out +102 -0
  21. regina/sageRegina/testsuite/angles.test +72 -0
  22. regina/sageRegina/testsuite/basic_callback.out +124 -0
  23. regina/sageRegina/testsuite/basic_sub.out +7 -0
  24. regina/sageRegina/testsuite/bool.out +6 -0
  25. regina/sageRegina/testsuite/bool.test +64 -0
  26. regina/sageRegina/testsuite/bytes.out +17 -0
  27. regina/sageRegina/testsuite/bytes.test +78 -0
  28. regina/sageRegina/testsuite/callbacks.out +515 -0
  29. regina/sageRegina/testsuite/callbacks.test +281 -0
  30. regina/sageRegina/testsuite/census.out +120 -0
  31. regina/sageRegina/testsuite/census.test +157 -0
  32. regina/sageRegina/testsuite/clone.out +18 -0
  33. regina/sageRegina/testsuite/clone.test +101 -0
  34. regina/sageRegina/testsuite/constructors.out +14 -0
  35. regina/sageRegina/testsuite/constructors.test +97 -0
  36. regina/sageRegina/testsuite/cube.orb +87 -0
  37. regina/sageRegina/testsuite/discs.out +3 -0
  38. regina/sageRegina/testsuite/discs.test +40 -0
  39. regina/sageRegina/testsuite/docstrings.filter +19 -0
  40. regina/sageRegina/testsuite/docstrings.out +808 -0
  41. regina/sageRegina/testsuite/docstrings.out.v2 +808 -0
  42. regina/sageRegina/testsuite/docstrings.test +57 -0
  43. regina/sageRegina/testsuite/dodec.orb +309 -0
  44. regina/sageRegina/testsuite/embeddings.out +23 -0
  45. regina/sageRegina/testsuite/embeddings.test +89 -0
  46. regina/sageRegina/testsuite/enumerate.out +62 -0
  47. regina/sageRegina/testsuite/enumerate.test +82 -0
  48. regina/sageRegina/testsuite/equality.out +112 -0
  49. regina/sageRegina/testsuite/equality.test +310 -0
  50. regina/sageRegina/testsuite/euler.out +15 -0
  51. regina/sageRegina/testsuite/euler.test +95 -0
  52. regina/sageRegina/testsuite/exception.out +7 -0
  53. regina/sageRegina/testsuite/exception.test +100 -0
  54. regina/sageRegina/testsuite/facenumbering.out +546 -0
  55. regina/sageRegina/testsuite/facenumbering.test +74 -0
  56. regina/sageRegina/testsuite/faces.out +40 -0
  57. regina/sageRegina/testsuite/faces.test +72 -0
  58. regina/sageRegina/testsuite/file.out +1229 -0
  59. regina/sageRegina/testsuite/file.test +70 -0
  60. regina/sageRegina/testsuite/file1.rga +0 -0
  61. regina/sageRegina/testsuite/file2.rga +0 -0
  62. regina/sageRegina/testsuite/file3.rga +119 -0
  63. regina/sageRegina/testsuite/flype.out +37 -0
  64. regina/sageRegina/testsuite/flype.test +50 -0
  65. regina/sageRegina/testsuite/generic.out +116 -0
  66. regina/sageRegina/testsuite/generic.test +76 -0
  67. regina/sageRegina/testsuite/groups.out +70 -0
  68. regina/sageRegina/testsuite/groups.test +117 -0
  69. regina/sageRegina/testsuite/hypersurfaces.out +681 -0
  70. regina/sageRegina/testsuite/hypersurfaces.test +90 -0
  71. regina/sageRegina/testsuite/i18n-latin1.rga +8 -0
  72. regina/sageRegina/testsuite/i18n-utf8.rga +8 -0
  73. regina/sageRegina/testsuite/i18n.out +6 -0
  74. regina/sageRegina/testsuite/i18n.test +91 -0
  75. regina/sageRegina/testsuite/id.out +2 -0
  76. regina/sageRegina/testsuite/id.test +47 -0
  77. regina/sageRegina/testsuite/index.out +2 -0
  78. regina/sageRegina/testsuite/index.test +43 -0
  79. regina/sageRegina/testsuite/integer.out +74 -0
  80. regina/sageRegina/testsuite/integer.test +56 -0
  81. regina/sageRegina/testsuite/italian.orb +90 -0
  82. regina/sageRegina/testsuite/iterators.out +118 -0
  83. regina/sageRegina/testsuite/iterators.test +128 -0
  84. regina/sageRegina/testsuite/knotted-Y.orb +47 -0
  85. regina/sageRegina/testsuite/listener.out +43 -0
  86. regina/sageRegina/testsuite/listener.test +101 -0
  87. regina/sageRegina/testsuite/listview.out +416 -0
  88. regina/sageRegina/testsuite/listview.test +253 -0
  89. regina/sageRegina/testsuite/lookup.out +13 -0
  90. regina/sageRegina/testsuite/lookup.test +44 -0
  91. regina/sageRegina/testsuite/memory1.out +62 -0
  92. regina/sageRegina/testsuite/memory1.test +154 -0
  93. regina/sageRegina/testsuite/memory2.out +62 -0
  94. regina/sageRegina/testsuite/memory2.test +124 -0
  95. regina/sageRegina/testsuite/memory3.out +92 -0
  96. regina/sageRegina/testsuite/memory3.test +216 -0
  97. regina/sageRegina/testsuite/misc.out +7 -0
  98. regina/sageRegina/testsuite/misc.test +56 -0
  99. regina/sageRegina/testsuite/operators.out +129 -0
  100. regina/sageRegina/testsuite/operators.test +61 -0
  101. regina/sageRegina/testsuite/orb.out +441 -0
  102. regina/sageRegina/testsuite/orb.test +49 -0
  103. regina/sageRegina/testsuite/pdf.out +4 -0
  104. regina/sageRegina/testsuite/pdf.test +49 -0
  105. regina/sageRegina/testsuite/perm.out +55 -0
  106. regina/sageRegina/testsuite/perm.test +96 -0
  107. regina/sageRegina/testsuite/plantri.out +12 -0
  108. regina/sageRegina/testsuite/plantri.test +60 -0
  109. regina/sageRegina/testsuite/presentations.out +11 -0
  110. regina/sageRegina/testsuite/presentations.test +61 -0
  111. regina/sageRegina/testsuite/refs.out +51 -0
  112. regina/sageRegina/testsuite/refs.test +128 -0
  113. regina/sageRegina/testsuite/repr.out +951 -0
  114. regina/sageRegina/testsuite/repr.out.v2 +951 -0
  115. regina/sageRegina/testsuite/repr.test +548 -0
  116. regina/sageRegina/testsuite/safeheldtype_basic.out +17 -0
  117. regina/sageRegina/testsuite/safeheldtype_basic.test +113 -0
  118. regina/sageRegina/testsuite/safeheldtype_packet.out +58 -0
  119. regina/sageRegina/testsuite/safeheldtype_packet.test +181 -0
  120. regina/sageRegina/testsuite/sample.pdf +0 -0
  121. regina/sageRegina/testsuite/sets.out +7 -0
  122. regina/sageRegina/testsuite/sets.test +44 -0
  123. regina/sageRegina/testsuite/skeleton.out +308 -0
  124. regina/sageRegina/testsuite/skeleton.test +54 -0
  125. regina/sageRegina/testsuite/snappea.out +82 -0
  126. regina/sageRegina/testsuite/snappea.test +107 -0
  127. regina/sageRegina/testsuite/snapshot.out +15 -0
  128. regina/sageRegina/testsuite/snapshot.test +78 -0
  129. regina/sageRegina/testsuite/sort.out +57 -0
  130. regina/sageRegina/testsuite/sort.test +53 -0
  131. regina/sageRegina/testsuite/special.out +4 -0
  132. regina/sageRegina/testsuite/special.test +47 -0
  133. regina/sageRegina/testsuite/standardtri.out +12101 -0
  134. regina/sageRegina/testsuite/standardtri.test +455 -0
  135. regina/sageRegina/testsuite/surfaces.out +2133 -0
  136. regina/sageRegina/testsuite/surfaces.test +114 -0
  137. regina/sageRegina/testsuite/swapping.out +25 -0
  138. regina/sageRegina/testsuite/swapping.test +88 -0
  139. regina/sageRegina/testsuite/testall.in +176 -0
  140. regina/sageRegina/testsuite/testbasic.in +279 -0
  141. regina/sageRegina/testsuite/testcallback.in +150 -0
  142. regina/sageRegina/testsuite/testsub.in +150 -0
  143. regina/sageRegina/testsuite/theta_in_solid_torus.orb +65 -0
  144. regina/sageRegina/testsuite/tightencode.out +40 -0
  145. regina/sageRegina/testsuite/tightencode.test +108 -0
  146. regina/sageRegina/testsuite/treedecomp.out +135 -0
  147. regina/sageRegina/testsuite/treedecomp.test +66 -0
  148. regina/sageRegina/testsuite/treetraversal.out +52 -0
  149. regina/sageRegina/testsuite/treetraversal.test +190 -0
  150. regina/sageRegina/testsuite/trigeneral.out +1251 -0
  151. regina/sageRegina/testsuite/trigeneral.test +155 -0
  152. regina/sageRegina/testsuite/utf8.out +42 -0
  153. regina/sageRegina/testsuite/utf8.test +94 -0
  154. regina/sageRegina/version.py +5 -0
  155. regina/sageSetup.py +41 -0
  156. regina/test.py +6 -0
  157. regina-7.3.1.1.dist-info/METADATA +109 -0
  158. regina-7.3.1.1.dist-info/RECORD +163 -0
  159. regina-7.3.1.1.dist-info/WHEEL +6 -0
  160. regina-7.3.1.1.dist-info/top_level.txt +4 -0
  161. regina.libs/libbz2-a273e504.so.1.0.6 +0 -0
  162. regina.libs/libgmp-afec2dd4.so.10.2.0 +0 -0
  163. regina.libs/libgmpxx-25f6cf8d.so.4.4.0 +0 -0
@@ -0,0 +1,44 @@
1
+ # Regina - A Normal Surface Theory Calculator
2
+ # Python Test Suite Component
3
+ #
4
+ # Copyright (c) 2007-2023, Ben Burton
5
+ # For further details contact Ben Burton (bab@debian.org).
6
+ #
7
+ # Tests the census database lookup routines.
8
+ #
9
+ # This file is a single component of Regina's python test suite. To run
10
+ # the python test suite, move to the main python directory in the source
11
+ # tree and run "make check".
12
+ #
13
+ # This program is free software; you can redistribute it and/or
14
+ # modify it under the terms of the GNU General Public License as
15
+ # published by the Free Software Foundation; either version 2 of the
16
+ # License, or (at your option) any later version.
17
+ #
18
+ # As an exception, when this program is distributed through (i) the
19
+ # App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
20
+ # (iii) Google Play by Google Inc., then that store may impose any
21
+ # digital rights management, device limits and/or redistribution
22
+ # restrictions that are required by its terms of service.
23
+ #
24
+ # This program is distributed in the hope that it will be useful, but
25
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
+ # General Public License for more details.
28
+ #
29
+ # You should have received a copy of the GNU General Public
30
+ # License along with this program; if not, write to the Free
31
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
32
+ # MA 02110-1301, USA.
33
+
34
+ def search(sig):
35
+ print('SEARCH:', sig)
36
+ hits = Census.lookup(sig)
37
+ print('Hits:', len(hits))
38
+ for h in hits:
39
+ print(' ' + h.db().desc() + ' - ' + h.name())
40
+ print()
41
+
42
+ search('foo')
43
+ search('cPcbbbiht')
44
+ search('nLLvLMPMQkcdijihjjmlklmmicgcvcbkihlfng')
@@ -0,0 +1,62 @@
1
+ Insertion case
2
+ Step 1
3
+ Step 2
4
+ Step 3
5
+ Step 4
6
+ Step 5
7
+ Destroying: t
8
+ Destroying: c
9
+ Step 6
10
+ Root destruction case
11
+ Step 1
12
+ Step 2
13
+ Step 3
14
+ Step 4
15
+ Destroying: a
16
+ Step 5
17
+ b
18
+ None
19
+ Orphan case
20
+ Step 1
21
+ Step 2
22
+ Step 3
23
+ Step 4
24
+ Step 5
25
+ Destroying: p
26
+ Step 6
27
+ Destroying: q
28
+ Step 7
29
+ Multiple orphan case
30
+ Step 1
31
+ Step 2
32
+ Step 3
33
+ Step 4
34
+ Destroying: x
35
+ Step 5
36
+ Destroying: y
37
+ Step 6
38
+ Many references case
39
+ Step 1
40
+ Step 2
41
+ Step 3
42
+ Step 4
43
+ Step 5
44
+ Destroying: f
45
+ Step 6
46
+ Step 7
47
+ Destroying: g
48
+ Destroying: g
49
+ Step 8
50
+ Empty 3-D triangulation
51
+ b
52
+ Deep reference case
53
+ Step 1
54
+ Step 2
55
+ Step 3
56
+ Destroying: z2
57
+ Destroying: x
58
+ Step 4
59
+ Destroying: z1
60
+ Step 5
61
+ Destroying: y
62
+ Step 6
@@ -0,0 +1,154 @@
1
+ # Regina - A Normal Surface Theory Calculator
2
+ # Python Test Suite Component
3
+ #
4
+ # Copyright (c) 2015-2023, Ben Burton
5
+ # For further details contact Ben Burton (bab@debian.org).
6
+ #
7
+ # Tests the lifetime management of packets.
8
+ #
9
+ # This file is a single component of Regina's python test suite. To run
10
+ # the python test suite, move to the main python directory in the source
11
+ # tree and run "make check".
12
+ #
13
+ # This program is free software; you can redistribute it and/or
14
+ # modify it under the terms of the GNU General Public License as
15
+ # published by the Free Software Foundation; either version 2 of the
16
+ # License, or (at your option) any later version.
17
+ #
18
+ # As an exception, when this program is distributed through (i) the
19
+ # App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
20
+ # (iii) Google Play by Google Inc., then that store may impose any
21
+ # digital rights management, device limits and/or redistribution
22
+ # restrictions that are required by its terms of service.
23
+ #
24
+ # This program is distributed in the hope that it will be useful, but
25
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
+ # General Public License for more details.
28
+ #
29
+ # You should have received a copy of the GNU General Public
30
+ # License along with this program; if not, write to the Free
31
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
32
+ # MA 02110-1301, USA.
33
+
34
+ # Fetch the python/testsuite path in the source tree, since we will need
35
+ # to access external files.
36
+ import sys
37
+ if (len(sys.argv) > 1):
38
+ testpath = sys.argv[1]
39
+ else:
40
+ testpath = '.'
41
+
42
+ class Watcher(PacketListener):
43
+ def __init__(self, packet):
44
+ PacketListener.__init__(self)
45
+ packet.listen(self)
46
+ def packetBeingDestroyed(self, packet):
47
+ print('Destroying: ' + packet.label())
48
+
49
+
50
+ print('Insertion case')
51
+ print('Step 1')
52
+ c = Container(); cw = Watcher(c); c.setLabel('c')
53
+ print('Step 2')
54
+ t = PacketOfTriangulation3(); t.newTetrahedron(); tw = Watcher(t); t.setLabel('t')
55
+ print('Step 3')
56
+ c.append(t)
57
+ print('Step 4')
58
+ t = None
59
+ print('Step 5')
60
+ c = None # Should destroy both c and t
61
+ print('Step 6')
62
+
63
+ print('Root destruction case')
64
+ print('Step 1')
65
+ a = Container(); aw = Watcher(a); a.setLabel('a')
66
+ print('Step 2')
67
+ b = PacketOfTriangulation3(); bw = Watcher(b); b.setLabel('b')
68
+ print('Step 3')
69
+ a.append(b)
70
+ print('Step 4')
71
+ a = None # Should destroy a only, since we are holding a reference to b
72
+ print('Step 5')
73
+ # b remains alive but orphaned
74
+ print(b.label())
75
+ print(b.parent())
76
+
77
+ print('Orphan case')
78
+ print('Step 1')
79
+ p = Container(); pw = Watcher(p); p.setLabel('p')
80
+ print('Step 2')
81
+ q = PacketOfTriangulation3(); qw = Watcher(q); q.setLabel('q')
82
+ print('Step 3')
83
+ p.append(q)
84
+ print('Step 4')
85
+ q.makeOrphan()
86
+ print('Step 5')
87
+ p = None # Should destroy p
88
+ print('Step 6')
89
+ q = None # Should destroy q
90
+ print('Step 7')
91
+
92
+ # An example of makeOrphan where we never held the reference to the
93
+ # child in the first place.
94
+ print('Multiple orphan case')
95
+ print('Step 1')
96
+ x = regina.open(testpath + '/file1.rga'); xw = Watcher(x); x.setLabel('x')
97
+ print('Step 2')
98
+ y = x.lastChild(); yw = Watcher(y); y.setLabel('y')
99
+ print('Step 3')
100
+ y.makeOrphan()
101
+ print('Step 4')
102
+ x = None # Should destroy x
103
+ print('Step 5')
104
+ y = None # Should destroy y
105
+ print('Step 6')
106
+
107
+ # An example like above, but where we hold many references to the same
108
+ # child packet.
109
+ print('Many references case')
110
+ print('Step 1')
111
+ f = regina.open(testpath + '/file2.rga'); fw = Watcher(f); f.setLabel('f')
112
+ print('Step 2')
113
+ g = f.lastChild(); gw = Watcher(g); g.setLabel('g')
114
+ print('Step 3')
115
+ h = f.lastChild(); hw = Watcher(h) # h is the same packet as g
116
+ print('Step 4')
117
+ g.makeOrphan()
118
+ print('Step 5')
119
+ f = None # Should destroy f
120
+ print('Step 6')
121
+ g = None
122
+ print('Step 7')
123
+ h = None # Should destroy g (and there are two watchers now)
124
+ print('Step 8')
125
+
126
+ # b should still be alive at this point.
127
+ print(b)
128
+ print(b.label())
129
+
130
+ # Destroy b's watcher now, so it does not try to call print() as the
131
+ # entire python system is shutting down
132
+ bw = None
133
+
134
+ # An example where we drop the root of a tree but hang on to references
135
+ # deeper within the tree.
136
+ print('Deep reference case')
137
+ x = Container(); x.setLabel('x'); xw = Watcher(x);
138
+ y = Container(); y.setLabel('y'); yw = Watcher(y);
139
+ z1 = Container(); z1.setLabel('z1'); z1w = Watcher(z1);
140
+ z2 = Container(); z2.setLabel('z2'); z2w = Watcher(z2);
141
+ print('Step 1')
142
+ x.append(z1)
143
+ x.append(z2)
144
+ z1.append(y)
145
+ print('Step 2')
146
+ z2 = None
147
+ print('Step 3')
148
+ x = None # Should delete x and z2, with the child z2 going first
149
+ print('Step 4')
150
+ z1 = None # Should delete z1
151
+ print('Step 5')
152
+ y = None # Should delete y
153
+ print('Step 6')
154
+
@@ -0,0 +1,62 @@
1
+ Script variables #1
2
+ Step 1
3
+ Step 2
4
+ Step 3
5
+ Step 4
6
+ Step 5
7
+ Step 6
8
+ Step 7
9
+ Step 8
10
+ Destroying: a1
11
+ Step 9
12
+ Bounded orientable 3-D triangulation, f = ( 4 6 4 1 )
13
+ b1
14
+ None
15
+ Empty script, foo = <b1>
16
+ c1
17
+ None
18
+ Script variables #2
19
+ Step 1
20
+ Step 2
21
+ Step 3
22
+ Destroying: c1
23
+ Step 4
24
+ Step 5
25
+ Step 6
26
+ Step 7
27
+ Destroying: b1
28
+ Step 8
29
+ Step 9
30
+ Destroying: a2
31
+ Step 10
32
+ Bounded orientable 3-D triangulation, f = ( 4 6 4 1 )
33
+ b2
34
+ None
35
+ Empty script, foo = (null)
36
+ c2
37
+ None
38
+ Example triangulation
39
+ Step 1
40
+ Step 2
41
+ Destroying: f
42
+ Step 3
43
+ Vertex link #1
44
+ Step 1
45
+ Step 2
46
+ Step 3
47
+ Destroying: t1
48
+ Step 4
49
+ qvLLMvvMQegfhlnpopaabcbcaeb
50
+ Vertex link #2
51
+ Step 1
52
+ Step 2
53
+ Step 3
54
+ Destroying: t2
55
+ Step 4
56
+ Step 5
57
+ Bounded orientable 3-D triangulation, f = ( 4 6 4 1 )
58
+ b2
59
+ None
60
+ Empty script, foo = (null)
61
+ c2
62
+ None
@@ -0,0 +1,124 @@
1
+ # Regina - A Normal Surface Theory Calculator
2
+ # Python Test Suite Component
3
+ #
4
+ # Copyright (c) 2015-2023, Ben Burton
5
+ # For further details contact Ben Burton (bab@debian.org).
6
+ #
7
+ # Tests the independence and lifespans of engine-generated packets.
8
+ #
9
+ # This file is a single component of Regina's python test suite. To run
10
+ # the python test suite, move to the main python directory in the source
11
+ # tree and run "make check".
12
+ #
13
+ # This program is free software; you can redistribute it and/or
14
+ # modify it under the terms of the GNU General Public License as
15
+ # published by the Free Software Foundation; either version 2 of the
16
+ # License, or (at your option) any later version.
17
+ #
18
+ # As an exception, when this program is distributed through (i) the
19
+ # App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
20
+ # (iii) Google Play by Google Inc., then that store may impose any
21
+ # digital rights management, device limits and/or redistribution
22
+ # restrictions that are required by its terms of service.
23
+ #
24
+ # This program is distributed in the hope that it will be useful, but
25
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
+ # General Public License for more details.
28
+ #
29
+ # You should have received a copy of the GNU General Public
30
+ # License along with this program; if not, write to the Free
31
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
32
+ # MA 02110-1301, USA.
33
+
34
+ class Watcher(PacketListener):
35
+ def __init__(self, packet, label):
36
+ PacketListener.__init__(self)
37
+ packet.setLabel(label)
38
+ packet.listen(self)
39
+ def packetBeingDestroyed(self, packet):
40
+ print('Destroying: ' + packet.label())
41
+
42
+
43
+ print('Script variables #1')
44
+ print('Step 1')
45
+ a = Container(); aw1 = Watcher(a, 'a1')
46
+ print('Step 2')
47
+ b = PacketOfTriangulation3(); dummy = b.newSimplex(); bw1 = Watcher(b, 'b1')
48
+ print('Step 3')
49
+ c = Script(); cw1 = Watcher(c, 'c1')
50
+ print('Step 4')
51
+ a.append(b)
52
+ print('Step 5')
53
+ a.append(c)
54
+ print('Step 6')
55
+ dummy = c.addVariable('foo', b)
56
+ print('Step 7')
57
+ val = c.variableValue('foo')
58
+ print('Step 8')
59
+ a = None # destroys a1
60
+ print('Step 9')
61
+ # (b1 == val) and c1 are orphaned but alive
62
+ print(b); print(b.label()); print(b.parent())
63
+ print(c); print(c.label()); print(c.parent())
64
+
65
+ print('Script variables #2')
66
+ print('Step 1')
67
+ a = Container(); aw2 = Watcher(a, 'a2')
68
+ print('Step 2')
69
+ b = PacketOfTriangulation3(); dummy = b.newSimplex(); bw2 = Watcher(b, 'b2')
70
+ print('Step 3')
71
+ c = Script(); cw2 = Watcher(c, 'c2') # destroys c1
72
+ print('Step 4')
73
+ a.append(b)
74
+ print('Step 5')
75
+ a.append(c)
76
+ print('Step 6')
77
+ dummy = c.addVariable('foo', a)
78
+ print('Step 7')
79
+ val = c.variableValue('foo') # destroys b1
80
+ print('Step 8')
81
+ a = None
82
+ print('Step 9')
83
+ val = None # destroys a
84
+ print('Step 10')
85
+ # b2 and c2 are orphaned but alive
86
+ print(b); print(b.label()); print(b.parent())
87
+ print(c); print(c.label()); print(c.parent())
88
+
89
+ print('Example triangulation')
90
+ print('Step 1')
91
+ f = PacketOfSnapPeaTriangulation(ExampleSnapPea.figureEight()); fw = Watcher(f, 'f')
92
+ print('Step 2')
93
+ f = None # destroys f
94
+ print('Step 3')
95
+
96
+ print('Vertex link #1')
97
+ print('Step 1')
98
+ t = PacketOfTriangulation3(Example3.lens(7,1)); tw = Watcher(t, 't1')
99
+ print('Step 2')
100
+ v = t.vertex(0).buildLink()
101
+ print('Step 3')
102
+ t = None # destroys t1 but not v1
103
+ print('Step 4')
104
+ print(v.isoSig())
105
+
106
+ print('Vertex link #2')
107
+ print('Step 1')
108
+ t = PacketOfTriangulation3(Example3.lens(7,1)); tw = Watcher(t, 't2')
109
+ print('Step 2')
110
+ v = t.vertex(0).buildLink() # destroys v1
111
+ print('Step 3')
112
+ t = None # destroys t2
113
+ print('Step 4')
114
+ v = None # destroys v2
115
+ print('Step 5')
116
+
117
+ # b2 and c2 are still alive at this point
118
+ print(b); print(b.label()); print(b.parent())
119
+ print(c); print(c.label()); print(c.parent())
120
+
121
+ # Destroy their watchers now, so they do not try to call print() as the
122
+ # entire python system is shutting down
123
+ bw2 = None
124
+ cw2 = None
@@ -0,0 +1,92 @@
1
+ Vertices of triangulation: vertices()
2
+ Step 1
3
+ Step 2
4
+ Step 3
5
+ Step 4
6
+ Destroying: t
7
+ Step 5
8
+ Vertices of triangulation: edges()
9
+ Step 1
10
+ Step 2
11
+ Step 3
12
+ Step 4
13
+ Destroying: t
14
+ Step 5
15
+ Vertices of triangulation: vertex()
16
+ Step 1
17
+ Step 2
18
+ Step 3
19
+ Step 4
20
+ Destroying: t
21
+ Step 5
22
+ Vertices of triangulation: edge()
23
+ Step 1
24
+ Step 2
25
+ Step 3
26
+ Step 4
27
+ Destroying: t
28
+ Step 5
29
+ Vertices of triangulation: faces<0>()
30
+ Step 1
31
+ Step 2
32
+ Step 3
33
+ Step 4
34
+ Destroying: t
35
+ Step 5
36
+ Vertices of triangulation: faces<1>()
37
+ Step 1
38
+ Step 2
39
+ Step 3
40
+ Step 4
41
+ Destroying: t
42
+ Step 5
43
+ Vertices of triangulation: face<0>()
44
+ Step 1
45
+ Step 2
46
+ Step 3
47
+ Step 4
48
+ Destroying: t
49
+ Step 5
50
+ Vertices of triangulation: face<1>()
51
+ Step 1
52
+ Step 2
53
+ Step 3
54
+ Step 4
55
+ Destroying: t
56
+ Step 5
57
+ Vertices of simplex
58
+ Step 1
59
+ Step 2
60
+ Step 3
61
+ Step 4
62
+ Step 5
63
+ Destroying: t
64
+ Step 6
65
+ Step 7
66
+ Vertices of face
67
+ Step 1
68
+ Step 2
69
+ Step 3
70
+ Step 4
71
+ Step 5
72
+ Destroying: t
73
+ Step 6
74
+ Step 7
75
+ Vertices of component
76
+ Step 1
77
+ Step 2
78
+ Step 3
79
+ Step 4
80
+ Step 5
81
+ Destroying: t
82
+ Step 6
83
+ Step 7
84
+ Vertices of boundary component
85
+ Step 1
86
+ Step 2
87
+ Step 3
88
+ Step 4
89
+ Step 5
90
+ Destroying: t
91
+ Step 6
92
+ Step 7