FflasFfpack
Public Types | Public Member Functions | Data Fields | Protected Attributes
UnparametricField< T > Class Template Reference

#include <unparametric.h>

+ Inheritance diagram for UnparametricField< T >:

Public Types

typedef UnparametricOperations
< _Element >::Element 
Element
 The field's element type. More...
 

Public Member Functions

 UnparametricField (const UnparametricField &F)
 construct this field as copy of F. More...
 
unsigned long & cardinality (unsigned long &c) const
 
unsigned long & characteristic (unsigned long &c) const
 
unsigned long cardinality () const
 
unsigned long characteristic () const
 
UnparametricField< Elementoperator= (const UnparametricField< Element >)
 
template<typename Src >
Elementinit (Element &x, const Src &s) const
 x := y. Caution: it is via cast to long. Good candidate for specialization. More...
 
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 More...
 
Field Object Basics.
 UnparametricField (long int q=0, size_t e=1)
 Builds this field to have characteristic q and cardinality qe. More...
 
Data Object Management.

first argument is set and the value is also returned.

Elementinit (Element &x) const
 
Elementassign (Element &x, const Element &y) const
 
Comparison Predicates
bool areEqual (const Element &x, const Element &y) const
 x == y More...
 
bool isZero (const Element &x) const
 x == 0 More...
 
bool isOne (const Element &x) const
 x == 1 More...
 
Arithmetic Operations

The first argument is set and is also the return value.

Elementadd (Element &x, const Element &y, const Element &z) const
 x := y + z More...
 
Elementsub (Element &x, const Element &y, const Element &z) const
 x := y - z More...
 
Elementmul (Element &x, const Element &y, const Element &z) const
 x := y*z More...
 
Elementdiv (Element &x, const Element &y, const Element &z) const
 x := y/z More...
 
Elementneg (Element &x, const Element &y) const
 x := -y More...
 
Elementinv (Element &x, const Element &y) const
 x := 1/y More...
 
Elementaxpy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := a*x + y More...
 
Inplace Arithmetic Operations

The first argument is modified and the result is the return value.

Elementaddin (Element &x, const Element &y) const
 x := x + y More...
 
Elementsubin (Element &x, const Element &y) const
 x := x - y More...
 
Elementmulin (Element &x, const Element &y) const
 x := x*y More...
 
Elementdivin (Element &x, const Element &y) const
 x := x/y More...
 
Elementnegin (Element &x) const
 x := -x More...
 
Elementinvin (Element &x) const
 x := 1/x More...
 
Elementaxpyin (Element &y, const Element &a, const Element &x) const
 y := a*x + y More...
 
Input/Output Operations
std::ostream & write (std::ostream &os) const
 Print field. More...
 
std::ostream & write (std::ostream &os, const Element &x) const
 Print field element. More...
 
std::istream & read (std::istream &is) const
 Read field. More...
 
std::istream & read (std::istream &is, Element &x) const
 Read field element. More...
 

Data Fields

const Element one
 
const Element zero
 
const Element mOne
 

Protected Attributes

long int _p
 
long int _card
 

Member Typedef Documentation

The field's element type.

Type K must provide a default constructor, a copy constructor, a destructor, and an assignment operator.

Constructor & Destructor Documentation

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< T > &  F)
inline

construct this field as copy of F.

Member Function Documentation

unsigned long& cardinality ( unsigned long &  c) const
inline
unsigned long& characteristic ( unsigned long &  c) const
inline
unsigned long cardinality ( ) const
inline
unsigned long characteristic ( ) const
inline
UnparametricField<Element> operator= ( const UnparametricField< Element )
inline
Element& init ( Element x,
const Src &  s 
) const
inline

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

Element& init ( Element x) const
inlineinherited
Element& assign ( Element x,
const Element y 
) const
inlineinherited
bool areEqual ( const Element x,
const Element y 
) const
inlineinherited

x == y

bool isZero ( const Element x) const
inlineinherited

x == 0

bool isOne ( const Element x) const
inlineinherited

x == 1

Element& add ( Element x,
const Element y,
const Element z 
) const
inlineinherited

x := y + z

Element& sub ( Element x,
const Element y,
const Element z 
) const
inlineinherited

x := y - z

Element& mul ( Element x,
const Element y,
const Element z 
) const
inlineinherited

x := y*z

Element& div ( Element x,
const Element y,
const Element z 
) const
inlineinherited

x := y/z

Element& neg ( Element x,
const Element y 
) const
inlineinherited

x := -y

Element& inv ( Element x,
const Element y 
) const
inlineinherited

x := 1/y

Element& axpy ( Element z,
const Element a,
const Element x,
const Element y 
) const
inlineinherited

z := a*x + y

Element& addin ( Element x,
const Element y 
) const
inlineinherited

x := x + y

Element& subin ( Element x,
const Element y 
) const
inlineinherited

x := x - y

Element& mulin ( Element x,
const Element y 
) const
inlineinherited

x := x*y

Element& divin ( Element x,
const Element y 
) const
inlineinherited

x := x/y

Element& negin ( Element x) const
inlineinherited

x := -x

Element& invin ( Element x) const
inlineinherited

x := 1/x

Element& axpyin ( Element y,
const Element a,
const Element x 
) const
inlineinherited

y := a*x + y

std::ostream& write ( std::ostream &  os) const
inlineinherited

Print field.

Returns
output stream to which field is written.
Parameters
osoutput stream to which field is written.
std::ostream& write ( std::ostream &  os,
const Element x 
) const
inlineinherited

Print field element.

Returns
output stream to which field element is written.
Parameters
osoutput stream to which field element is written.
xfield element.
std::istream& read ( std::istream &  is) const
inlineinherited

Read field.

Returns
input stream from which field is read.
Parameters
isinput stream from which field is read.
std::istream& read ( std::istream &  is,
Element x 
) const
inlineinherited

Read field element.

Returns
input stream from which field element is read.
Parameters
isinput stream from which field element is read.
xfield element.

Field Documentation

long int _p
protected
long int _card
protected
const Element one
const Element zero
const Element mOne

The documentation for this class was generated from the following files: