FAAST
0.2.1
|
Data Structures | |
struct | FAAST::zz_p_Algebra |
The infrastructure corresponding to zz_p* types. More... | |
struct | FAAST::ZZ_p_Algebra |
The infrastructure corresponding to ZZ_p* types. More... | |
struct | FAAST::GF2_Algebra |
The infrastructure corresponding to GF2* types. More... |
NTL
provides three different ways of representing modular integers:
zz_p
is a class representing modular integers with word-sized modulus,ZZ_p
is a class representing modular integers with arbitrary sized modulus,GF2
is a class representing integers modulo 2.To each of these types corresponds a whole family of types (ZZ_p_X
, GF2_E
, etc.) representing polynomials with modular coefficients, modular polynomials with modular coefficients, etc. The actual algorithms implementing arithmetics for such types vary and affect remarkably the performances of FAAST. See the NTL
manual for more details.
Infrastructures are collections (struct
's) of types providing genericity over NTL
types. They provide an unique set of names to abstract from the implementation details of the three NTL families ZZ_p*
, zz_p*
and GF2*
. You must provide an Infrastructure as template parameter to the types and most of the functions of FAAST. This parameter tells FAAST which of the three NTL
families it should use to perform modular arithmetics.
Here's an example of how to use the infrastructure FAAST::zz_p_Algebra. First some typedef
's to save typing:
If you are wondering which Infrastructure you should use, then use FAAST::zz_p_Algebra, as it is quite flexible and way faster than FAAST::ZZ_p_Algebra.
If you plan to construct fields with huge characteristics (larger than the largest long
), then you should opt for FAAST::ZZ_p_Algebra; notice however that FAAST does not let you build Artin-Schreier extensions in characteristics greater than the greatest long
, so you will probably miss its most exciting features.
Finally, if you only work in characteristic 2 and care about performance, you should consider compiling NTL
with the gf2x
library and using FAAST::GF2_Algebra as Infrastructure. If you don't use the gf2x
library, then FAAST::GF2_Algebra will only be interesting for moderate field cardinalities, but it will give the pace up to FAAST::zz_p_Algebra for huge fields.