示例#1
0
def vfe_test(x, f, n):
    C = CobarComplex(7)
    print "calculating complex"
    cplx = C.get_cplx()
    for i in range(n):
        xx = CobarMonomial.random(x, f)
        print "finding good xx"
        while xx.get_degree()[0] > opts.bounds:
            xx = CobarMonomial.random(x, f)
        yy = xx._map()
        vect = C.vector_from_element(yy)
        deg = yy.get_degree()[0]
        wt = yy.get_degree()[1]
        for thing in C.get_cplx()[f + 1]._dict[(deg, wt)]:
            print thing
        print "\n"
        print xx
        print yy
        print vect
示例#2
0
def vfe_test(x,f,n):
    C= CobarComplex(7)
    print "calculating complex"
    cplx = C.get_cplx()
    for i in range(n):
        xx = CobarMonomial.random(x,f)
        print "finding good xx"
        while xx.get_degree()[0] > opts.bounds:
            xx = CobarMonomial.random(x,f)
        yy = xx._map()
        vect = C.vector_from_element(yy)
        deg = yy.get_degree()[0]
        wt = yy.get_degree()[1]
        for thing in C.get_cplx()[f+1]._dict[(deg,wt)]:
            print thing
        print "\n"
        print xx
        print yy
        print vect