ModularFactorizationOperations(PA, MMT, MD, PMD)ΒΆ
ffact.spad line 1 [edit on github]
This category specifies operations needed by univariate factorization over finite fields
- add_poly: (PA, PA, MD) -> PA
add_poly(pol1, pol2, md)add polynomialspol1andpol2.
- copy_mat_part: (MMT, Integer) -> MMT
copy_mat_part(man, nr)creates copy of modular composition matrix stored in firstnrrows of mat.
- copy_poly: (PA, Integer, MD) -> PA
copy_poly(pol, d, m)creates copy ofpolwith enough space to represent polynomials of degree smaller thand. Error if degree ofpolis bigger or equal thand.
- degree: PA -> Integer
degree(pol)returns degree of the polynomialpol.
- divide!: (PA, PA, MD) -> PA
divide!(pol1, pol2, md)performs division with remainder ofpol1bypol2.pol1is modified in place to contain remainder. Quotient is return value.
- empty_mat?: MMT -> Boolean
empty_mat?(mat)returnstrueif matrix is empty,falseotherwise.
- empty_mat: () -> MMT
empty_mat()returns empty (that is of dimensions 0) matrix.
- empty_poly: () -> PA
empty_poly()returns empty (that is 0) polynomial.
- gcd: (PA, PA, MD) -> PA
gcd(pol1, pol2, md)computesgcdofpol1andpol2.
- get_char: MD -> Integer
get_char(md)returns characteristic of the field described by infomd.
- get_extension_degree: MD -> Integer
get_extension_degree(md)returns degree of the field described by infomdover its prime subfield.
- get_mod: PMD -> MD
get_mod(pmd)extracts field info from reduction data.
- ini_rdata: (PA, MD) -> PMD
ini_rdata(pv, p)generates data allowing faster computation of remainders from division bypvmodulop. Result is used by other functions in this package, in particularred_pol!.
- mod_exp: (PA, Integer, PMD) -> PA
mod_exp(pv, d, rd)computespv^dmodulo reduction data inrd.
- modular_compose: (PA, MMT, PA, NonNegativeInteger, PMD) -> PA
modular_compose(pol, pm, p1, l1, rd)computes composion ofpolwithp0modulo reduction datard.pmandp1are as from call topower_matrix(p0, l1, rd).
- monomial1: MD -> PA
monomial1(md)returns monomial of degree 1 with coefficient 1.
- power_matrix: (PA, NonNegativeInteger, PMD) -> Record(matr: MMT, poly: PA)
power_matrix(s, l, rd)computes [m,p] such thatp = s^lmodulo reduction datardand columnjofmcontains^jmodulo reduction datard. Note that lowest column index isj = 0and highest index isj=l-1.rdshould be obtained by earlier call toini_rdata.
- random_poly: (Integer, MD) -> PA
random_poly(n, md)generated random polynomial of degreen.
- red_pol!: (PA, PMD) -> PA
red_pol!(pv, rd)computes remainder ofpvusing reduction datardproduced by earlier call toini_rdata.
- shift_mat!: (MMT, Integer, Integer) -> Void
shift_mat!(mat, sa, nr)moves modular composition matrix stored innrrows ofmatstarting atsato firstnrrows ofmat. This is designed to work on output of split_mat!.
- split_mat!: (MMT, Integer, Integer, Integer, PMD, PMD) -> Void
split_mat!(mat, nr0, nr1, nr2, pmod1, pmod2)splits modular composition matrixmatinto two matrices, first modulopmod1, second modulopmod2. To save space first result replaces firstnr1rows ofmat, second result is stored in nextnr2rows ofmat.nr0is number of rows used in argument.
- sub1!: (PA, MD) -> PA
sub1!(pol, md)subtracts 1 from the polynomialpol.
- sub_poly: (PA, PA, MD) -> PA
sub_poly(pol1, pol2, md)subtracts polynomialspol2frompol1.