decoding
provides some finite fields and finite rings. However
these implementations are not optimized. For efficiency it is
strongly recommanded to use external library like GMP or MPFQ.
To implement your own finite fields or rings or to wrap external
libraries see decoding-rings
(3).
The following finite fields and rings are provided by decoding
.
If the wanted ring is implemented by decoding/rings/wanted_ring.c
you must do
#include <decoding/rings/wanted_ring.c>
#include <decoding/algos.c>
to use it. All the proposed rings are in the include/decoding/rings
directory.
GF5.c
Implements GF(5). It is an example of implementation of a finite
field and contains the documentation on the making of finite rings
for decoding
. See decoding-rings
(3) for details.
gfp_word.c
Implement all prime fields (Z/pZ
) whose characteristic holds
within a machine word. Use PRIME
to indicate the mudulus of
the finite fields.
#define PRIME 101
#include <decoding/rings/gfp_word.h>
#include <decoding/algos.c>
In the example above, the name of the finite field will be
gf101
. You can of course use several prime fields in the
same program.
#define PRIME 7
#include <decoding/rings/gfp_word.h>
#include <decoding/algos.c>
#define PRIME 11
#include <decoding/rings/gfp_word.h>
#include <decoding/algos.c>
It will then generate the code for the two finite fields GF(7) and GF(11). You will then have two types.
gf7
corresponding to GF(7).
gf11
corresponding to GF(11).
Written by Guillaume Quintin (coincoin169g@gmail.com).
decoding-rings
(3),
MPFQ(http://mpfq.gforge.inria.fr/),
GMP(http://gmplib.org/)