def test_polished(dec_prec=200): def test_manifold(manifold): eqns = manifold.gluing_equations('rect') shapes = manifold.tetrahedra_shapes('rect', dec_prec=dec_prec) return snap.shapes.gluing_equation_error(eqns, shapes) def test_census(name, census): manifolds = [M for M in census] print('Checking gluing equations for %d %s manifolds' % (len(manifolds), name)) max_error = pari(0) for i, M in enumerate(manifolds): max_error = max(max_error, test_manifold(M)) print('\r ' + repr((i, M)).ljust(35) + ' Max error so far: %.2g' % float(max_error), end='') print() test_census('cusped census', snappy.OrientableCuspedCensus(filter='cusps>1')[-100:]) test_census('closed census', snappy.OrientableClosedCensus()[-100:]) test_census('4-component links', [ M for M in snappy.LinkExteriors(num_cusps=4) if M.solution_type() == 'all tetrahedra positively oriented' ])
def test_knots(): for M in snappy.LinkExteriors(cusps=1): print M.name(), compare_one_knot(M.link())
def basic_test(): for M in snappy.LinkExteriors(): if M.solution_type().startswith('all tetra'): L = Link(M.name()) test_link(L)