Exemplo n.º 1
0
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'
    ])
Exemplo n.º 2
0
 def __init__(self):
     ManifoldRecognizer.__init__(self, snappy.OrientableClosedCensus(), standard_hashes)
Exemplo n.º 3
0
def test_closed():
    out = ntools.DataOutFile('/tmp/snappy-out-' + version)
    for M in snappy.OrientableClosedCensus():
        out.write([M, hash_fundamental_group_presentation(M, 8)])