示例#1
0
 def toModular(self,mf):
     '''Convert integer coefficients to modular coefficients.
     '''
     p = self.pset;
     l = p.list;
     r = p.ring;
     rm = GenPolynomialRing( mf, r.nvar, r.tord, r.vars );
     pm = PolyUtil.fromIntegerCoefficients(rm,l);
     r = Ring("",rm);
     return Ideal(r,"",pm);
示例#2
0
 def toInteger(self):
     '''Convert rational coefficients to integer coefficients.
     '''
     p = self.pset;
     l = p.list;
     r = p.ring;
     ri = GenPolynomialRing( BigInteger(), r.nvar, r.tord, r.vars );
     pi = PolyUtil.integerFromRationalCoefficients(ri,l);
     r = Ring("",ri);
     return Ideal(r,"",pi);