Пример #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"