示例#1
0
def cobar_simp(x,f,n):
    for i in range(n):
        xx = CobarMonomial.random(x,f)
        print xx
        xx.simplify()
        print xx
        for term in xx.factors:
            print term
示例#2
0
def cobar_simp(x, f, n):
    for i in range(n):
        xx = CobarMonomial.random(x, f)
        print xx
        xx.simplify()
        print xx
        for term in xx.factors:
            print term
示例#3
0
def summand_test(x, y, f, n):
    for i in range(n):
        xx = CobarMonomial.random(x, f)
        yy = CobarPolynomial.random(x, y, f)
        xx.simplify()
        yy.simplify()
        print xx
        print yy
        print yy.is_summand(xx), "\n"
示例#4
0
def summand_test(x,y,f,n):
    for i in range(n):
        xx = CobarMonomial.random(x,f)
        yy = CobarPolynomial.random(x,y,f)
        xx.simplify()
        yy.simplify()
        print xx
        print yy
        print yy.is_summand(xx), "\n"
示例#5
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
示例#6
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
示例#7
0
def map_test(f, x, n):
    for i in range(n):
        xx = CobarMonomial.random(x, f)
        print xx
        print xx._map_reduced()
示例#8
0
def cobar_mon(x, f, n):
    for i in range(n):
        xx = CobarMonomial.random(x, f)
        print xx, "\n"
        print xx.get_degree(), "\n"
示例#9
0
def map_test(f,x,n):
    for i in range(n):
        xx = CobarMonomial.random(x,f)
        print xx
        print xx._map_reduced()
示例#10
0
def cobar_mon(x,f,n):
    for i in range(n):
        xx = CobarMonomial.random(x,f)
        print xx, "\n"
        print xx.get_degree(), "\n"