NZMATH  1.2.0
About: NZMATH is a Python based number theory oriented calculation system.
  Fossies Dox: NZMATH-1.2.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

nzmath.poly.hensel Namespace Reference

Classes

class  HenselLiftMulti
 
class  HenselLiftPair
 
class  HenselLiftSimultaneously
 

Functions

def _extgcdp (f, g, p)
 
def _init_cofactors (factors)
 
def lift_upto (target, factors, p, bound)
 

Variables

 the_ring = polyring.PolynomialRing(rational.theIntegerRing)
 
 the_one = the_ring.one
 
 the_zero = the_ring.zero
 

Detailed Description

hensel -- Hensel Lift classes for factorization
      of integer coefficient polynomials


If you need lifted factors only once, you may want to use lift_upto
function.  On the other hand, if you might happen to need another
lift, you would directly use one of the lifters and its lift method
for consecutive lifts.

Function Documentation

◆ _extgcdp()

def nzmath.poly.hensel._extgcdp (   f,
  g,
  p 
)
private
_extgcdp(f,g,p) -> u,v,w

Find u,v,w such that f*u + g*v = w = gcd(f,g) mod p.
p should be a prime number.

This is a private function.

Definition at line 25 of file hensel.py.

Referenced by nzmath.poly.hensel.HenselLiftPair.from_factors(), and nzmath.poly.hensel.HenselLiftMulti.from_factors().

◆ _init_cofactors()

def nzmath.poly.hensel._init_cofactors (   factors)
private
Return list of bi's; bi = a{i+1}*...*ar where ai's are of factors.

This is a private function.

Definition at line 54 of file hensel.py.

Referenced by nzmath.poly.hensel.HenselLiftMulti.from_factors().

◆ lift_upto()

def nzmath.poly.hensel.lift_upto (   target,
  factors,
  p,
  bound 
)
Hensel lift factors mod p of target upto bound and return factors
mod q and q.

PRECONDITIONS:
target == product(factors) mod p
POSTCONDITIONS:
there exist k s.t. q == p**k >= bound and
target == product(result) mod q

Definition at line 493 of file hensel.py.

Variable Documentation

◆ the_one

nzmath.poly.hensel.the_one = the_ring.one

Definition at line 21 of file hensel.py.

◆ the_ring

nzmath.poly.hensel.the_ring = polyring.PolynomialRing(rational.theIntegerRing)

Definition at line 20 of file hensel.py.

◆ the_zero

nzmath.poly.hensel.the_zero = the_ring.zero

Definition at line 22 of file hensel.py.