Example #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
Example #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
Example #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"
Example #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"
Example #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
Example #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
Example #7
0
def map_test(f, x, n):
    for i in range(n):
        xx = CobarMonomial.random(x, f)
        print xx
        print xx._map_reduced()
Example #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"
Example #9
0
def map_test(f,x,n):
    for i in range(n):
        xx = CobarMonomial.random(x,f)
        print xx
        print xx._map_reduced()
Example #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"