Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PIR_ntl_ZZ_p Class Reference
[linbox/field]

#include <PIR-ntl-ZZ_p.h>

List of all members.


Detailed Description

extend Wrapper of ZZ_p from NTL. Add PIR functions


Static Public Member Functions

template<class Element2> Element & init (Element &x, const Element2 &y)
 Init x from y.

Element & init (Element &x, const Element &y)
 Init from a NTL::ZZ_p.

Element & init (Element &x, const integer &y)
 I don't know how to init from integer.

integerconvert (integer &x, const Element &y)
 Convert y to an Element.

Element & assign (Element &x, const Element &y)
 x = y.

bool areEqual (const Element &x,const Element &y)
 Test if x == y.

bool isZero (const Element &x)
 Test if x == 0.

bool isOne (const Element &x)
 Test if x == 1.

Element & add (Element &x, const Element &y, const Element &z)
 return x = y + z

Element & sub (Element &x, const Element &y, const Element &z)
 return x = y - z

template<class Int> Element & mul (Element &x, const Element &y, const Int &z)
 return x = y * z

Element & div (Element &x, const Element &y, const Element &z)
 If exists a, such that a * z =y, return x = one of them. Otherwise, throw an exception.

Element & inv (Element &x, const Element &y)
 If y is a unit, return x = 1 / y, otherwsie, throw an exception.

Element & neg (Element &x, const Element &y)
 return x = -y;

template<class Int> Element & axpy (Element &r, const Element &a, const Int &x, const Element &y)
 return r = a x + y

Element & addin (Element &x, const Element &y)
 return x += y;

Element & subin (Element &x, const Element &y)
 return x -= y;

template<class Int> Element & mulin (Element &x, const Int &y)
 return x *= y;

Element & divin (Element &x, const Element &y)
 If y divides x, return x /= y, otherwise throw an exception.

Element & invin (Element &x)
 If x is a unit, x = 1 / x, otherwise, throw an exception.

Element & negin (Element &x)
 return x = -x;

template<class Int> Element & axpyin (Element &r, const Element &a, const Int &x)
 return r += a x

std::ostream & write (std::ostream &out, const Element &y)
 out << y;

std::istream & read (std::istream &in, Element &x)
 read x from istream in

bool isUnit (const Element &x)
 Test if x is a unit.

Element & gcd (Element &g, const Element &a, const Element &b)
 return g = gcd (a, b)

Element & gcdin (Element &g, const Element &b)
 return g = gcd (g, b)

Element & xgcd (Element &g, Element &s, Element &t, const Element &a, const Element &b)
 g = gcd(a, b) = a*s + b*t. and gcd (s, t) is a unit.

Element & dxgcd (Element &g, Element &s, Element &t, Element &a1, Element &b1, const Element &a, const Element &b)
 g = gcd(a, b) = a*s + b*t. and gcd (s, t) is a unit. s * a1 + t * b1 = a unit.

bool isDivisor (const Element &a, const Element &b)
 Test if a | b.

Element & normal (Element &a, const Element &b)
 a = normalization of b.


The documentation for this class was generated from the following file:
Generated on Thu Feb 8 22:33:05 2007 for linbox by doxygen 1.3.4