Givaro
Data Structures | Functions
Givaro Namespace Reference

Arithmetic on GF(p^k), with p a prime number less than 2^15. More...

Data Structures

class  ArrayAllocatort
 ArrayAllocator: class for allocation of arrays. More...
class  Key
 The class Key. More...
class  Integer
 This is the Integer class. More...
class  BaseTimer
 base for class RealTimer; class SysTimer; class UserTimer; More...
class  GIV_randIter
 Random field Element generator. More...
class  Montgomery< Std32 >
 This class implements the standard arithmetic with Modulo Elements. More...
class  RNSsystem
 class RNSsystem. More...
class  RNSsystemFixed
 NO DOC. More...
class  ZpzDom< Std16 >
 This class implement the standard arithmetic with Modulo Elements. More...
class  ZpzDom< Log16 >
 This class implement the standard arithmetic with Modulo Elements. More...
class  ZpzDom< Std32 >
 This class implement the standard arithmetic with Modulo Elements. More...
class  ZpzDom< Unsigned32 >
 This class implement the standard arithmetic with Modulo Elements. More...
class  ZpzDom< Std64 >
 This class implement the standard arithmetic with Modulo Elements. More...
class  ZpzDom< Integer >
 This class implement the standard arithmetic with Modulo Elements. More...
class  VectorDom
 VectorDom<Domain,StorageTag> More...

Functions

int compare (const Integer &a, const Integer &b)
 Compares two integers.
int absCompare (const Integer &a, const Integer &b)
 Compare the norm of two integers.
int absCompare (const Integer &a, const double d)
 Compare the norm of two integers.
int absCompare (const Integer &a, const float d)
 Compare the norm of two integers.
int absCompare (const Integer &a, const unsigned long u)
 Compare the norm of two integers.
int absCompare (const Integer &a, const unsigned u)
 Compare the norm of two integers.
int absCompare (const Integer &a, const long int u)
 Compare the norm of two integers.
int absCompare (const Integer &a, const int u)
 Compare the norm of two integers.

Detailed Description

Arithmetic on GF(p^k), with p a prime number less than 2^15.

Specialized for fast conversions to floating point numbers. Main difference in interface is init/convert.

Bibliography:
[JG Dumas, Q-adic Transform Revisited, ISSAC 2008]
Warning:
k strictly greater than 1
Todo:
use NTL if available ?

Function Documentation

int compare ( const Integer &  a,
const Integer &  b 
)

Compares two integers.

Parameters:
ainteger
binteger
Returns:
1 if $a > b$, 0 if $a = b$ and -1 otherwise.
int absCompare ( const Integer &  a,
const Integer &  b 
)

Compare the norm of two integers.

Parameters:
ainteger
binteger
Returns:
1 if $|a| > |b|$, 0 if $|a| = |b|$ and -1 otherwise.
int absCompare ( const Integer &  a,
const double  d 
)

Compare the norm of two integers.

Parameters:
ainteger
binteger
Returns:
1 if $|a| > |b|$, 0 if $|a| = |b|$ and -1 otherwise.
int absCompare ( const Integer &  a,
const float  d 
)

Compare the norm of two integers.

Parameters:
ainteger
binteger
Returns:
1 if $|a| > |b|$, 0 if $|a| = |b|$ and -1 otherwise.
int absCompare ( const Integer &  a,
const unsigned long  u 
)

Compare the norm of two integers.

Parameters:
ainteger
binteger
Returns:
1 if $|a| > |b|$, 0 if $|a| = |b|$ and -1 otherwise.
int absCompare ( const Integer &  a,
const unsigned  u 
)

Compare the norm of two integers.

Parameters:
ainteger
binteger
Returns:
1 if $|a| > |b|$, 0 if $|a| = |b|$ and -1 otherwise.
int absCompare ( const Integer &  a,
const long int  u 
)

Compare the norm of two integers.

Parameters:
ainteger
binteger
Returns:
1 if $|a| > |b|$, 0 if $|a| = |b|$ and -1 otherwise.
int absCompare ( const Integer &  a,
const int  u 
)

Compare the norm of two integers.

Parameters:
ainteger
binteger
Returns:
1 if $|a| > |b|$, 0 if $|a| = |b|$ and -1 otherwise.