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

PID_integer Class Reference

#include <PID-integer.h>

Inheritance diagram for PID_integer:

UnparametricField< integer > FieldInterface List of all members.

Public Types

typedef integer Element

Public Methods

long compare (const Element &a, const Element &b) const
Elementsqrt (Element &x, const Element &y) const
 sqrt(x,y) x=floor(sqrt(y))

double & convert (double &x, const Element &y) const
 x := y. Caution: it is via cast to long. Good candidate for specialization. --dpritcha

Elementinit (Element &x, const double &y) const
integerconvert (integer &x, const Element &y) const
 x := y. Caution: it is via cast to long. Good candidate for specialization.

Elementinit (Element &x, const integer &y) const
 x := y. Caution: it is via cast to long. Good candidate for specialization.


Static Public Methods

bool isUnit (const Element &x)
Elementabs (Element &x, const Element &a)
Element abs (const Element &a)
Elementgcd (Element &g, const Element &a, const Element &b)
 gcd (g, a, b) return g = gcd (a, b)

Elementgcdin (Element &g, const Element &b)
 gcding (g, b) return g = gcd (g, b)

Elementxgcd (Element &g, Element &s, Element &t, const Element &a, const Element &b)
 xgcd (g, s, t, a, b) g = gcd(a, b) = a*s + b*t. The coefficients s and t are defined according to the standard Euclidean algorithm applied to |a| and |b|, with the signs then adjusted according to the signs of a and b.

Elementlcm (Element &c, const Element &a, const Element &b)
 lcm (c, a, b) c = lcm (a, b)

Elementlcmin (Element &l, const Element &b)
 lcmin (l, b) l = lcm (l, b)

long reconstructRational (Element &a, Element &b, const Element &x, const Element &m, const Element &a_bound, const Element &b_bound)
Elementquo (Element &q, const Element &a, const Element &b)
 quo (q, x, y) q = floor (x/y);

Elementrem (Element &r, const Element &a, const Element &b)
 rem (r, a, b) r = remindar of a / b

Elementquoin (Element &a, const Element &b)
 quoin (a, b) a = quotient (a, b)

Elementremin (Element &a, const Element &b)
 quoin (a, b) a = quotient (a, b)

void quoRem (Element &q, Element &r, const Element &a, const Element &b)
 quoRem (q, r, a, b) q = [a/b], r = a - b*q |r| < |b|, and if r != 0, sign(r) = sign(b)

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


Member Typedef Documentation

typedef integer Element
 

The field's element type. Type K must provide a default constructor, a copy constructor, a destructor, and an assignment operator.

Reimplemented from UnparametricField< integer >.


Member Function Documentation

Element abs const Element   a [inline, static]
 

Element& abs Element   x,
const Element   a
[inline, static]
 

long compare const Element   a,
const Element   b
const [inline]
 

compare two elements, a and b return 1, if a > b return 0, if a = b; return -1. if a < b

integer& convert integer   x,
const Element   y
const [inline]
 

x := y. Caution: it is via cast to long. Good candidate for specialization.

Reimplemented from UnparametricField< integer >.

double& convert double &    x,
const Element   y
const [inline]
 

x := y. Caution: it is via cast to long. Good candidate for specialization. --dpritcha

Reimplemented from UnparametricField< integer >.

Element& gcd Element   g,
const Element   a,
const Element   b
[inline, static]
 

gcd (g, a, b) return g = gcd (a, b)

Element& gcdin Element   g,
const Element   b
[inline, static]
 

gcding (g, b) return g = gcd (g, b)

Element& init Element   x,
const integer   y
const [inline]
 

x := y. Caution: it is via cast to long. Good candidate for specialization.

Reimplemented from UnparametricField< integer >.

Element& init Element   x,
const double &    y
const [inline]
 

bool isDivisor const Element   a,
const Element   b
[inline, static]
 

isDivisor (a, b) Test if b | a.

bool isUnit const Element   x [inline, static]
 

Element& lcm Element   c,
const Element   a,
const Element   b
[inline, static]
 

lcm (c, a, b) c = lcm (a, b)

Element& lcmin Element   l,
const Element   b
[inline, static]
 

lcmin (l, b) l = lcm (l, b)

Element& quo Element   q,
const Element   a,
const Element   b
[inline, static]
 

quo (q, x, y) q = floor (x/y);

Element& quoin Element   a,
const Element   b
[inline, static]
 

quoin (a, b) a = quotient (a, b)

void quoRem Element   q,
Element   r,
const Element   a,
const Element   b
[inline, static]
 

quoRem (q, r, a, b) q = [a/b], r = a - b*q |r| < |b|, and if r != 0, sign(r) = sign(b)

long reconstructRational Element   a,
Element   b,
const Element   x,
const Element   m,
const Element   a_bound,
const Element   b_bound
[inline, static]
 

Element& rem Element   r,
const Element   a,
const Element   b
[inline, static]
 

rem (r, a, b) r = remindar of a / b

Element& remin Element   a,
const Element   b
[inline, static]
 

quoin (a, b) a = quotient (a, b)

Element& sqrt Element   x,
const Element   y
const [inline]
 

sqrt(x,y) x=floor(sqrt(y))

Element& xgcd Element   g,
Element   s,
Element   t,
const Element   a,
const Element   b
[inline, static]
 

xgcd (g, s, t, a, b) g = gcd(a, b) = a*s + b*t. The coefficients s and t are defined according to the standard Euclidean algorithm applied to |a| and |b|, with the signs then adjusted according to the signs of a and b.


Generated on Mon Jun 20 09:16:55 2005 for linbox by doxygen1.2.18