class FACTORIZATION_ALG
****

__Factorize_a_polynomial
Let p:prime.(1) Let Ap be A in Zp<t>. if Ap=1 ; Apd:=1; Resume. (2) Search A'p s.t. A'p | Apd in Zp[x].(3) Check of A' | A in Z[x]

Contain algorithms of 2 type of factorization in Zp[x] and 2 type of constructing polynomials in Z[x] from Zp[x].


Flattened version is here



Public


Readonly Shareds
shared DpolyM:POLYS_INTI;
**** divisor in Zp i.e. DpolyM|PolyM
shared DpolyMs:POLYS_INTI;
**** change each coefficient to little abs
shared Factor:ARRAY{POLYS_INTI};
****
shared FactorP:ARRAY{POLYS_INTI};
**** factors in Z/(prime)Z
shared PolyM:POLYS_INTI;
**** PolyN in Zp
shared PolyN:POLYS_INTI;
**** Normalized

Writable Shareds
shared DpolyM:POLYS_INTI;
**** divisor in Zp i.e. DpolyM|PolyM
shared DpolyMs:POLYS_INTI;
**** change each coefficient to little abs
shared Factor:ARRAY{POLYS_INTI};
****
shared FactorP:ARRAY{POLYS_INTI};
**** factors in Z/(prime)Z
shared PolyM:POLYS_INTI;
**** PolyN in Zp
shared PolyN:POLYS_INTI;
**** Normalized

Features
checkDivZp(dividend,divisor:POLYS_INTI, prime:INTI):BOOL
**** true if divisible in Zp
checkZp(i:INTI,prime:INTI):BOOL
factorize(poly:POLYS_INTI):ARRAY{POLYS_INTI}
**** factorize a polynomial wrapper of factorizeSqrFree(p)
factorizeSqrFree(p:POLYS_INTI):ARRAY{POLYS_INTI}
**** - factorize a square free polynomial
genFactors(f:POLYS_INTI, uList:ARRAY{POLYS_INTI}, prime:INTI):ARRAY{POLYS_INTI}
getQ(f:POLYS_INTI,prime:INTI):MAT_INTI
init
printQ(q:MAT_INTI)
resume(prime:INTI):BOOL
**** TRUE if find Factors
setPoly(d:CARD,prime:INTI):BOOL
setPoly2(d:CARD,prime:INTI,degD:CARD):BOOL
**** true if factors are determined.
setPolyB(depth:CARD, dpoly:POLYS_INTI, prime:INTI):BOOL
**** true if factor is determined
setPolyBerlekamp(prime:INTI)
solveQ1(q:MAT_INTI,prime:INTI):ARRAY{POLYS_INTI}

The Sather Home Page