linbox
Public Member Functions | Static Public Member Functions
PIR_ntl_ZZ_p Class Reference

extend Wrapper of ZZ_p from NTL. More...

#include <PIR-ntl-ZZ_p.h>

+ Inheritance diagram for PIR_ntl_ZZ_p:

Public Member Functions

template<class Element2 >
Element & init (Element &x, const Element2 &y) const
 Init x from y.
 
Element & init (Element &x, const Element &y) const
 Init from a NTL::ZZ_p.
 
Element & init (Element &x, const integer &y) const
 I don't know how to init from integer.
 
integerconvert (integer &x, const Element &y) const
 Convert y to an Element.
 
Element & assign (Element &x, const Element &y) const
 x = y.
 
bool areEqual (const Element &x, const Element &y) const
 Test if x == y.
 
bool isZero (const Element &x) const
 Test if x == 0.
 
bool isOne (const Element &x) const
 Test if x == 1.
 
Element & add (Element &x, const Element &y, const Element &z) const
 return x = y + z
 
Element & sub (Element &x, const Element &y, const Element &z) const
 return x = y - z
 
template<class Int >
Element & mul (Element &x, const Element &y, const Int &z) const
 return x = y * z
 
Element & div (Element &x, const Element &y, const Element &z) const
 If exists a, such that a * z =y, return x = one of them. More...
 
Element & inv (Element &x, const Element &y) const
 If y is a unit, return x = 1 / y, otherwsie, throw an exception.
 
Element & neg (Element &x, const Element &y) const
 return x = -y;
 
template<class Int >
const Element & axpy (Element &r, const Element &a, const Int &x, const Element &y) const
 return r = a x + y
 
Element & addin (Element &x, const Element &y) const
 return x += y;
 
Element & subin (Element &x, const Element &y) const
 return x -= y;
 
template<class Int >
Element & mulin (Element &x, const Int &y) const
 return x *= y;
 
const Element & divin (Element &x, const Element &y) const
 If y divides x, return x /= y, otherwise throw an exception.
 
Element & invin (Element &x) const
 If x is a unit, x = 1 / x, otherwise, throw an exception.
 
Element & negin (Element &x) const
 return x = -x;
 
template<class Int >
Element & axpyin (Element &r, const Element &a, const Int &x) const
 return r += a x
 
Element & init (Element &x, const NTL::ZZ &y) const
 Specialization for NTL::ZZ. More...
 
NTL::ZZ & convert (NTL::ZZ &x, const Element &y) const
 Specialization for NTL::ZZ. More...
 
std::ostream & write (std::ostream &os, const Element &x) const
 Print field. More...
 

Static Public Member Functions

static std::ostream & write (std::ostream &out, const Element &y)
 out << y;
 
static bool isUnit (const Element &x)
 some PIR function More...
 
static Element & gcd (Element &g, const Element &a, const Element &b)
 return g = gcd (a, b)
 
static Element & gcdin (Element &g, const Element &b)
 return g = gcd (g, b)
 
static Element & xgcd (Element &g, Element &s, Element &t, const Element &a, const Element &b)
 g = gcd(a, b) = a*s + b*t. More...
 
static 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. More...
 
static bool isDivisor (const Element &a, const Element &b)
 Test if a | b.
 
static Element & normal (Element &a, const Element &b)
 a = normalization of b.
 

Detailed Description

extend Wrapper of ZZ_p from NTL.

Add PIR functions

Member Function Documentation

Element& div ( Element &  x,
const Element &  y,
const Element &  z 
) const
inline

If exists a, such that a * z =y, return x = one of them.

Otherwise, throw an exception

static bool isUnit ( const Element &  x)
inlinestatic

some PIR function

Test if x is a unit.

static Element& xgcd ( Element &  g,
Element &  s,
Element &  t,
const Element &  a,
const Element &  b 
)
inlinestatic

g = gcd(a, b) = a*s + b*t.

and gcd (s, t) is a unit.

static Element& dxgcd ( Element &  g,
Element &  s,
Element &  t,
Element &  a1,
Element &  b1,
const Element &  a,
const Element &  b 
)
inlinestatic

g = gcd(a, b) = a*s + b*t.

and gcd (s, t) is a unit. s * a1 + t * b1 = a unit.

Element& init ( Element &  x,
const NTL::ZZ &  y 
) const
inlineinherited

Specialization for NTL::ZZ.

Returns
reference to field element.
Parameters
xfield element to contain output (reference returned)
yNTL::ZZ.
NTL::ZZ& convert ( NTL::ZZ &  x,
const Element &  y 
) const
inlineinherited

Specialization for NTL::ZZ.

Returns
reference to NTL::ZZ
Parameters
xNTL::ZZ to contain output (reference returned).
yconstant reference to field element.
std::ostream& write ( std::ostream &  os,
const Element &  x 
) const
inlineinherited

Print field.

Returns
output stream to which field is written.
Parameters
osoutput stream to which field is written.
x

The documentation for this class was generated from the following file: