Esempio n. 1
0
def test_dmp_deflate():
    assert dmp_deflate([[]], 1, ZZ) == ((1, 1), [[]])
    assert dmp_deflate([[2]], 1, ZZ) == ((1, 1), [[2]])

    f = [[1, 0, 0], [], [1, 0], [], [1]]

    assert dmp_deflate(f, 1, ZZ) == ((2, 1), [[1, 0, 0], [1, 0], [1]])
Esempio n. 2
0
 def deflate(f):
     """Reduce degree of `f` by mapping `x_i**m` to `y_i`. """
     J, F = dmp_deflate(f.rep, f.lev, f.dom)
     return J, f.per(F)
Esempio n. 3
0
 def deflate(f):
     """Reduce degree of `f` by mapping `x_i**m` to `y_i`. """
     J, F = dmp_deflate(f.rep, f.lev, f.dom)
     return J, f.per(F)