Skip to content

Commit 2a33f2a

Browse files
committed
Adding a factor to prefer not conjugating matrices so that the results are more stable across platforms.
1 parent 610d3fe commit 2a33f2a

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

python/drilling/test_cases.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
Tests drilling geodesics that are entirely in the 2-skeleton::
3939
4040
>>> M.drill_words(['a','acAADa']).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
41-
'ivvPQQcfhghgfghfaaaaaaaaa_BabBBbBaBBaBbbab'
41+
'ivvPQQcfhghgfghfaaaaaaaaa_BabBBbBaBBaBbbBa'
4242
4343
Same test as verified computation::
4444
4545
sage: M.drill_words(['a','acAADa'], verified = True, bits_prec = 60).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
46-
'ivvPQQcfhghgfghfaaaaaaaaa_BabBBbBaBBaBbbab'
46+
'ivvPQQcfhghgfghfaaaaaaaaa_BabBBbBaBBaBbbBa'
4747
4848
Test error when drilling something close to core curve::
4949
@@ -70,7 +70,7 @@
7070
handled by 2-3 moves (in particular, commit f9879d04 introduced a bug):
7171
7272
>>> Manifold("m004").drill_words(['CAC','CCbC']).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
73-
'qLvvLvAMQQQkcgimopkllmpkonnnpixcaelchapewetvrn_bcaaBbBBbBaaBbB'
73+
'qLvvLvAMQQQkcgimopkllmpkonnnpixcaelchapewetvrn_bcaaBbBBbaBaBbB'
7474
7575
7676
An interesting case where geodesic intersects triangulation in only one tetrahedron:
@@ -110,6 +110,12 @@
110110
Number of tets after subdividing: 69
111111
Shortening geodesic by sweeping across triangle.
112112
'mLALzLQMPbcbefjhhijkllxxnnxagbxnhhn_cbBabBcB'
113+
>>> Manifold("m307").drill_word('dadadabCdada', verbose=True).isometry_signature(of_link=True) # doctest: +NUMERIC9
114+
Tubes lower bound injectivity radius: 0.380575727319487
115+
Number of geodesic pieces: [9]
116+
Number of tets after subdividing: 45
117+
Shortening geodesic by sweeping across triangle.
118+
'oLLwQvvPQQcbeefgemnllnmnmlhhaaaaaahaaaaah_bBbabaab'
113119
>>> Manifold("m307").drill_word('ADADcBADADAD', verbose=True).isometry_signature(of_link=True) # doctest: +NUMERIC9
114120
Tubes lower bound injectivity radius: 0.380575727319372
115121
Number of geodesic pieces: [9]

python/geometric_structure/geodesic/fixed_points.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
__all__ = ['r13_fixed_points_of_psl2c_matrix',
1010
'r13_fixed_line_of_psl2c_matrix']
1111

12+
_pref_factor = 64
13+
1214
def r13_fixed_points_of_psl2c_matrix(m):
1315
"""
1416
Given a PSL(2,C)-matrix m acting on the upper halfspace model,
@@ -22,15 +24,15 @@ def r13_fixed_points_of_psl2c_matrix(m):
2224
# a fixed matrix t.
2325

2426
# To decide whether to conjugate, we compare m[1,0] with
25-
# the value m[1,0] has after conjugating.
27+
# the value m[1,0] has after conjugating - with a factor to prefer not
28+
# to conjugate.
2629

27-
abs_c = _lower_bound_abs(m[1,0])
30+
abs_c = _lower_bound_abs(m[1,0]) * _pref_factor
2831

2932
bc = m[1,0] - m[0,1]
3033
ad = m[1,1] - m[0,0]
3134
abs_c_pm_m_pp = _lower_bound_abs(bc + ad)
3235
abs_c_pp_m_pm = _lower_bound_abs(bc - ad)
33-
3436
if abs_c > abs_c_pm_m_pp and abs_c > abs_c_pp_m_pm:
3537
return _r13_fixed_points_of_psl2c_matrix(m)
3638

0 commit comments

Comments
 (0)