|
FflasFfpack
|
#include <unparametric.h>
Public Types | |
| typedef K | Element |
| The field's element type. | |
Public Member Functions | |
Field Object Basics. | |
| UnparametricField (long int q=0, size_t e=1) | |
| Builds this field to have characteristic q and cardinality qe. | |
| UnparametricField (const UnparametricField &F) | |
| construct this field as copy of F. | |
| ~UnparametricField () | |
| Builds this field to have characteristic q and cardinality qe. | |
| const UnparametricField & | operator= (const UnparametricField &F) const |
| Builds this field to have characteristic q and cardinality qe. | |
Data Object Management. | |
first argument is set and the value is also returned. | |
| Element & | init (Element &x) const |
| x := y. Caution: it is via cast to long. Good candidate for specialization. | |
| template<typename Src > | |
| Element & | init (Element &x, const Src &s) const |
| x := y. Caution: it is via cast to long. Good candidate for specialization. | |
| template<typename T > | |
| T & | convert (T &x, const Element &y) const |
| x := y. Caution: it is via cast to long. Good candidate for specialization. --dpritcha | |
| Element & | assign (Element &x, const Element &y) const |
| x := y. Caution: it is via cast to long. Good candidate for specialization. | |
| unsigned long & | cardinality (unsigned long &c) const |
| x := y. Caution: it is via cast to long. Good candidate for specialization. | |
| unsigned long & | characteristic (unsigned long &c) const |
| x := y. Caution: it is via cast to long. Good candidate for specialization. | |
| unsigned long | cardinality () const |
| x := y. Caution: it is via cast to long. Good candidate for specialization. | |
| unsigned long | characteristic () const |
| x := y. Caution: it is via cast to long. Good candidate for specialization. | |
Comparison Predicates | |
| bool | areEqual (const Element &x, const Element &y) const |
| x == y | |
| bool | isZero (const Element &x) const |
| x == 0 | |
| bool | isOne (const Element &x) const |
| x == 1 | |
Arithmetic Operations | |
The first argument is set and is also the return value. | |
| Element & | add (Element &x, const Element &y, const Element &z) const |
| x := y + z | |
| Element & | sub (Element &x, const Element &y, const Element &z) const |
| x := y - z | |
| Element & | mul (Element &x, const Element &y, const Element &z) const |
| x := y*z | |
| Element & | div (Element &x, const Element &y, const Element &z) const |
| x := y/z | |
| Element & | neg (Element &x, const Element &y) const |
| x := -y | |
| Element & | inv (Element &x, const Element &y) const |
| x := 1/y | |
| Element & | axpy (Element &z, const Element &a, const Element &x, const Element &y) const |
| z := a*x + y | |
Inplace Arithmetic Operations | |
The first argument is modified and the result is the return value. | |
| Element & | addin (Element &x, const Element &y) const |
| x := x + y | |
| Element & | subin (Element &x, const Element &y) const |
| x := x - y | |
| Element & | mulin (Element &x, const Element &y) const |
| x := x*y | |
| Element & | divin (Element &x, const Element &y) const |
| x := x/y | |
| Element & | negin (Element &x) const |
| x := -x | |
| Element & | invin (Element &x) const |
| x := 1/x | |
| Element & | axpyin (Element &y, const Element &a, const Element &x) const |
| y := a*x + y | |
Input/Output Operations | |
| std::ostream & | write (std::ostream &os) const |
| Print field. | |
| std::istream & | read (std::istream &is) const |
| Read field. | |
| std::ostream & | write (std::ostream &os, const Element &x) const |
| Print field element. | |
| std::istream & | read (std::istream &is, Element &x) const |
| Read field element. | |
Protected Attributes | |
| long int | _p |
| long int | _card |
| typedef K Element |
The field's element type.
Type K must provide a default constructor, a copy constructor, a destructor, and an assignment operator.
| UnparametricField | ( | long int | q = 0, |
| size_t | e = 1 |
||
| ) | [inline] |
Builds this field to have characteristic q and cardinality qe.
This constructor must be defined in a specialization.
| UnparametricField | ( | const UnparametricField< K > & | F | ) | [inline] |
construct this field as copy of F.
| ~UnparametricField | ( | ) | [inline] |
Builds this field to have characteristic q and cardinality qe.
This constructor must be defined in a specialization.
| const UnparametricField& operator= | ( | const UnparametricField< K > & | F | ) | const [inline] |
Builds this field to have characteristic q and cardinality qe.
This constructor must be defined in a specialization.
x := y. Caution: it is via cast to long. Good candidate for specialization.
x := y. Caution: it is via cast to long. Good candidate for specialization.
| T& convert | ( | T & | x, |
| const Element & | y | ||
| ) | const [inline] |
x := y. Caution: it is via cast to long. Good candidate for specialization. --dpritcha
x := y. Caution: it is via cast to long. Good candidate for specialization.
| unsigned long& cardinality | ( | unsigned long & | c | ) | const [inline] |
x := y. Caution: it is via cast to long. Good candidate for specialization.
| unsigned long& characteristic | ( | unsigned long & | c | ) | const [inline] |
x := y. Caution: it is via cast to long. Good candidate for specialization.
| unsigned long cardinality | ( | ) | const [inline] |
x := y. Caution: it is via cast to long. Good candidate for specialization.
| unsigned long characteristic | ( | ) | const [inline] |
x := y. Caution: it is via cast to long. Good candidate for specialization.
| bool isZero | ( | const Element & | x | ) | const [inline] |
x == 0
| bool isOne | ( | const Element & | x | ) | const [inline] |
x == 1
| Element& axpy | ( | Element & | z, |
| const Element & | a, | ||
| const Element & | x, | ||
| const Element & | y | ||
| ) | const [inline] |
z := a*x + y
| std::ostream& write | ( | std::ostream & | os | ) | const [inline] |
Print field.
| os | output stream to which field is written. |
| std::istream& read | ( | std::istream & | is | ) | const [inline] |
Read field.
| is | input stream from which field is read. |
| std::ostream& write | ( | std::ostream & | os, |
| const Element & | x | ||
| ) | const [inline] |
Print field element.
| os | output stream to which field element is written. |
| x | field element. |
| std::istream& read | ( | std::istream & | is, |
| Element & | x | ||
| ) | const [inline] |
Read field element.
| is | input stream from which field element is read. |
| x | field element. |
long int _p [protected] |
long int _card [protected] |
1.7.4