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