ModularAlgebraicGcdOperations(MP, MPT, MD)ΒΆ
amodgcd.spad line 23 [edit on github]
This category specifies operations needed by ModularAlgebraicGcd package. Since we have multiple implementations we specify interface here and put implementations in separate packages. Most operations are done using special purpose abstract representation. Appropriate types are passed as parameters: MPT is type of modular polynomials in one variable with coefficients in some algebraic extension. MD is type of modulus. Final results are converted to packed representation, with coefficients (from prime field) stored in one array and exponents (in main variable and in auxiliary variables representing generators of algebrac extension) stored in parallel array.
- canonicalIfCan: (MPT, MD) -> Union(MPT, failed)
canonicalIfCan(x, m)tries to dividexby its leading coefficient modulom.
- degree: MPT -> Integer
degree(x)gives degree ofx.
- MPtoMPT: (MP, Symbol, List Symbol, MD) -> Union(MPT, failed)
MPtoMPT(p, s, ls, m)convertspto packed representation.
- pack_exps: (Integer, Integer, MD) -> SortedExponentVector
pack_exps(d, s, m)produces vector of exponents up to degreed.sis size (degree) of algebraic extension. Use together withrepack1.
- pack_modulus: (List MP, List Symbol, Integer) -> Union(MD, failed)
pack_modulus(lp, ls, p)convertslp,lsand primepwhich together describe algebraic extension to packed representation.
- pseudoRem: (MPT, MPT, MD) -> MPT
pseudoRem(x, y, m)computes pseudoremainder ofxbyymodulom.
- repack1: (MPT, U32Vector, Integer, MD) -> Void
repack1(x, a, d, m)stores coefficients ofxin a.dis degree ofx. Corresponding exponents are given by pack_exps.
- zero?: MPT -> Boolean
zero?(x)checks ifxis zero.