-
Notifications
You must be signed in to change notification settings - Fork 0
Givaro_interface
Givaro GFqDom<> example:
(usage may possible if
NEED_POLYNOMIAL_REPRESENTATION(prime,exponent)
is zero, otherwise Extension<> field has to be used, which has a
slightly different constructor interface
Problem with NEED_POLYNOMIAL_REPRESENTATION: does not depend on
FieldElementType ->not always correct; this issue is solved in LinBox,
see LinBox::GivaroGfq )
GFqDom
::Residu_t prime,exponent;
std::vector<GFqDom
::Residu_t> irreducible_11_2;
irreducible_11_2.resize(3,1);
irreducible_11_2[0]=6; // 6
irreducible_11_2[1]=9; // + 9*x
irreducible_11_2[2]=1; // + 1*x^2
GFqDom
gfqField( 11, 2, irreducible_11_2);
get characteristic:
gfqField.characteristic();
get cardinality :
gfqField.cardinality();
get multiplicative group generator:
wrong way (does not work as expected) :
GFqDom
::Element gen = gfqField.generator();
correct way:
GFqDom
::Element gen;
gfqField.generator(gen);
'''get mod polynomial representation '''
gfqField.irreducible()
the mod polynomial is coded in a 'long int' (depends on GfqDom template parameter) : if the polynomial is = 'a + b*x + c*x^2 ' then the representation is a + b*char + c*char^2 + ....
construct a field element
It seems that in this field object (GFqDom) elements are represented via the generator exponent. therefore one would construct an element as follows:
el = GFqDom
::Element(generatorExponent);
I didn't figure out what GFqDom::init(elOut,input) exactly does , but 'init()' does not work as i would expect.
The*' convert()*'-Function converts the element (generator exponent) back to a polynomial representation: if the polynomial is 'a+b*x+c*x^2+...' then the polynomial representation is a + b*char + c*char^2 +...)
additive neutral element
gfqField.zero
multiplicative neutral element
gfqField.one
Usage example:
int prime = 11;
GFqDom
gfqBaseField( prime );
Extension<>::Pol_t pdomain( gfqBaseField );
int modPolynomialDegree = 2;
Extension<>::PolElement irreducible_11_2( modPolynomialDegree + 1 );
irreducible_11_2 [ 0 ] = 6; // 6
irreducible_11_2 [ 1 ] = 9; // + 9*11
irreducible_11_2 [ 2 ] = 1; // + 11^2
Extension<> extensionField(pdomain, irreducible_11_2);
-
Home
- Introduction
- Macaulay2 Contribution Guides
- Macaulay2 Workshop Guides
-
Macaulay2 Internals
- Building Macaulay2 from source
- Components of Macaulay2
- Case Studies
- Web servers
- Other
- Frequently Asked Questions
- Road map