|
Public Types |
typedef integer | Element |
Public Methods |
long | compare (const Element &a, const Element &b) const |
Element & | sqrt (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
|
Element & | init (Element &x, const double &y) const |
integer & | convert (integer &x, const Element &y) const |
| x := y. Caution: it is via cast to long. Good candidate for specialization.
|
Element & | init (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) |
Element & | abs (Element &x, const Element &a) |
Element | abs (const Element &a) |
Element & | gcd (Element &g, const Element &a, const Element &b) |
| gcd (g, a, b) return g = gcd (a, b)
|
Element & | gcdin (Element &g, const Element &b) |
| gcding (g, b) return g = gcd (g, b)
|
Element & | xgcd (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.
|
Element & | lcm (Element &c, const Element &a, const Element &b) |
| lcm (c, a, b) c = lcm (a, b)
|
Element & | lcmin (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) |
Element & | quo (Element &q, const Element &a, const Element &b) |
| quo (q, x, y) q = floor (x/y);
|
Element & | rem (Element &r, const Element &a, const Element &b) |
| rem (r, a, b) r = remindar of a / b
|
Element & | quoin (Element &a, const Element &b) |
| quoin (a, b) a = quotient (a, b)
|
Element & | remin (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.
|