On Apr 14, 2:57 pm, William Stein <wst...@gmail.com> wrote:
> You should post exact code so that we can replicate your problem.

I've boiled down the problem into the example below.  Just attach and
then run "prob()".

One thing to note is that's just doing the exact same thing again and
again, but eventually it up and crashes.  On my system, which is
detailed below, it dies after about 10-20 minutes at the 4000ish
iteration.

System details:  MacPro3,1 with 2 Quad-Core Xeon Processors @ 2.8 Ghz,
running 10.5.8.
Sage 4.3.2 self-compiled with i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1
(Apple Inc. build 5493)

Thanks,

Nathan

------begin code-----


datum = ([0, 1, 0, 2, 0, 2], [([-1, -2, -1, 1, -1, 0], [1, 2, 1, 0, 1,
0], -1), ([2, 0, 0, 0, 0, 0], [0, -1, 0, 0, 0, 0], 1), ([-1, 2, 0, -1,
0, 0], [-1, 0, -1, 1, 0, 0], 1), ([0, 0, 1, 1, 0, -1], [0, -1, 1, -2,
-2, 2], -1), ([0, 0, 0, -1, 2, 1], [0, 0, -1, 1, 0, 0], -1), ([0, 0,
0, 0, -1, 0], [0, 0, 0, 0, 1, -2], -1)])

class Surface():
    def __init__(self, datum):
        self.Coefficients, self.RawEquations = datum

def eval_eqn( (a,b,c), z):
    ans = c
    for i, z in enumerate(z):
        ans *= z**a[i] * (1 - z) ** b[i]
    return ans

class OneCuspedManifold():
    def raw_natural_gluing_equations(self, surface):
        return surface.RawEquations

    def natural_gluing_equations(self, surface):
        n = len(surface.Coefficients)
        z = var(" ".join(["z%d" % i for i in range(n)]))
        return [eval_eqn(eqn, z) for eqn in
self.raw_natural_gluing_equations(surface)]

    def first_order_equations(self, surface):
        V = [int(e) for e in list(surface.Coefficients)]
        n = len(V)
        a_vars = var(" ".join(["a%d" % i for i in range(n)]))
        t = var('t')
        base_eqns = self.raw_natural_gluing_equations(surface)
        z = [ a * t ** e for a, e in zip(a_vars, V) ]
        eqns = [eval_eqn(eqn, z).subs(t=0) for eqn in base_eqns]
        return eqns

    def comes_from_an_ideal_point(self, surface):
        n = len(surface.Coefficients)
        R = PolynomialRing(QQ, ['a%d' % i for i in range(0,n)] + ['b
%d' % i for i in range(0,n)])
        eqns = self.first_order_equations(surface)
        poly_eqns = [ R(e.numerator() - e.denominator()) for e in
eqns]

def prob():
    count = 0
    while 1:
        M = OneCuspedManifold()
        S = Surface(datum)
        M.comes_from_an_ideal_point(S)
        count += 1

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

To unsubscribe, reply using "remove me" as the subject.

Reply via email to