Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

UnparametricField Class Template Reference

#include <unparametric.h>

Inheritance diagram for UnparametricField:

FieldInterface List of all members.

template<class K>
class LinBox::UnparametricField< K >


Public Types

Common Object Interface for a LinBox Field.
typedef K Element
typedef UnparametricRandIter<
K > 
RandIter
 Type of random field element generators.


Public Methods

Field Object Basics.
 UnparametricField (integer q=0, size_t e=1)
 UnparametricField (const UnparametricField &F)
 construct this field as copy of F.

 ~UnparametricField ()
UnparametricField & operator= (const UnparametricField &F)
Data Object Management.
first argument is set and the value is also returned.

Field Object Basics Elementinit (Element &x, const integer &y=0) const
 x := y. Caution: it is via cast to long. Good candidate for specialization.

integerconvert (integer &x, const Element &y) const
 x := y. Caution: it is via cast to long. Good candidate for specialization.

double & convert (double &x, const Element &y) const
 x := y. Caution: it is via cast to long. Good candidate for specialization. --dpritcha

Elementassign (Element &x, const Element &y) const
integercardinality (integer &c) const
 c := cardinality of this field (-1 if infinite).

integercharacteristic (integer &c) const
 c := characteristic of this field (zero or prime).

Comparison Predicates
Data Object Management 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.

Comparison Predicates Elementadd (Element &x, const Element &y, const Element &z) const
 x := y + z

Elementsub (Element &x, const Element &y, const Element &z) const
 x := y - z

Elementmul (Element &x, const Element &y, const Element &z) const
 x := y*z

Elementdiv (Element &x, const Element &y, const Element &z) const
 x := y/z

Elementneg (Element &x, const Element &y) const
 x := -y

Elementinv (Element &x, const Element &y) const
 x := 1/y

Elementaxpy (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.

Arithmetic Operations Elementaddin (Element &x, const Element &y) const
 x := x + y

Elementsubin (Element &x, const Element &y) const
 x := x - y

Elementmulin (Element &x, const Element &y) const
 x := x*y

Elementdivin (Element &x, const Element &y) const
 x := x/y

Elementnegin (Element &x) const
 x := -x

Elementinvin (Element &x) const
 x := 1/x

Elementaxpyin (Element &y, const Element &a, const Element &x) const
 y := a*x + y

Input/Output Operations
Inplace Arithmetic Operations
std::ostream & 
write (std::ostream &os) const
std::istream & read (std::istream &is) const
std::ostream & write (std::ostream &os, const Element &x) const
std::istream & read (std::istream &is, Element &x) const
Implementation-Specific Methods.
These methods are not required of all LinBox fields and are included only for the implementation of this field template.

Common Object Interface UnparametricField (const K &A)
 Default constructor.

const K & operator() (void) const
K & operator() (void)

Protected Attributes

integer _p
integer _card

Member Typedef Documentation

typedef K Element
 

The field's element type. Type K must provide a default constructor, a copy constructor, a destructor, and an assignment operator.

Reimplemented in GivaroRational, Local2_32, PID_double, PID_integer, and PIR_ntl_ZZ_p.

typedef UnparametricRandIter<K> RandIter
 

Type of random field element generators.


Constructor & Destructor Documentation

UnparametricField integer    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]
 

XML constructor Takes in an XML reader and attempts to convert the XML representation over to a valid field. As this class is mostly a wrapper for a particular field type, the XML does little more than encode the cardinality of this field, and perhaps the characteristic

Common Object Interface UnparametricField const K &    A [inline]
 

Default constructor.

Constructor from field object.

Parameters:
A  unparameterized field object


Member Function Documentation

Comparison Predicates Element& add Element   x,
const Element   y,
const Element   z
const [inline]
 

x := y + z

Arithmetic Operations Element& addin Element   x,
const Element   y
const [inline]
 

x := x + y

Data Object Management bool areEqual const Element   x,
const Element   y
const [inline]
 

x == y

Element& assign Element   x,
const Element   y
const [inline]
 

Element& axpy Element   z,
const Element   a,
const Element   x,
const Element   y
const [inline]
 

z := a*x + y

Element& axpyin Element   y,
const Element   a,
const Element   x
const [inline]
 

y := a*x + y

integer& cardinality integer   c const [inline]
 

c := cardinality of this field (-1 if infinite).

integer& characteristic integer   c const [inline]
 

c := characteristic of this field (zero or prime).

double& convert double &    x,
const Element   y
const [inline]
 

x := y. Caution: it is via cast to long. Good candidate for specialization. --dpritcha

Reimplemented in PID_double, and PID_integer.

integer& convert integer   x,
const Element   y
const [inline]
 

x := y. Caution: it is via cast to long. Good candidate for specialization.

Reimplemented in PID_double, and PID_integer.

Element& div Element   x,
const Element   y,
const Element   z
const [inline]
 

x := y/z

Reimplemented in NTL_PID_zz_p.

Element& divin Element   x,
const Element   y
const [inline]
 

x := x/y

Reimplemented in NTL_PID_zz_p.

Field Object Basics Element& init Element   x,
const integer   y = 0
const [inline]
 

x := y. Caution: it is via cast to long. Good candidate for specialization.

Reimplemented in GivaroRational, PID_double, and PID_integer.

Element& inv Element   x,
const Element   y
const [inline]
 

x := 1/y

Element& invin Element   x const [inline]
 

x := 1/x

bool isOne const Element   x const [inline]
 

x == 1

bool isZero const Element   x const [inline]
 

x == 0

Element& mul Element   x,
const Element   y,
const Element   z
const [inline]
 

x := y*z

Element& mulin Element   x,
const Element   y
const [inline]
 

x := x*y

Element& neg Element   x,
const Element   y
const [inline]
 

x := -y

Element& negin Element   x const [inline]
 

x := -x

K& operator() void    [inline]
 

Access operator.

Returns:
reference to field object

const K& operator() void    const [inline]
 

Constant access operator.

Returns:
constant reference to field object

UnparametricField& operator= const UnparametricField< K > &    F [inline]
 

std::istream& read std::istream &    is,
Element   x
const [inline]
 

Read field element.

Returns:
input stream from which field element is read.
Parameters:
is  input stream from which field element is read.
x  field element.

std::istream& read std::istream &    is const [inline]
 

Read field.

Returns:
input stream from which field is read.
Parameters:
is  input stream from which field is read.

Element& sub Element   x,
const Element   y,
const Element   z
const [inline]
 

x := y - z

Element& subin Element   x,
const Element   y
const [inline]
 

x := x - y

std::ostream& write std::ostream &    os,
const Element   x
const [inline]
 

Print field element.

Returns:
output stream to which field element is written.
Parameters:
os  output stream to which field element is written.
x  field element.

Inplace Arithmetic Operations std::ostream& write std::ostream &    os const [inline]
 

Print field.

Returns:
output stream to which field is written.
Parameters:
os  output stream to which field is written.


Member Data Documentation

integer _card [protected]
 

integer _p [protected]
 


Generated on Mon Jun 20 09:16:56 2005 for linbox by doxygen1.2.18