Givaro 4.2.1
UnparametricOperations< _Element > Class Template Referenceabstract

#include <unparametric-operations.h>

+ Inheritance diagram for UnparametricOperations< _Element >:

Public Types

typedef _Element Element
 
typedef ElementElement_ptr
 
typedef const Element ConstElement
 
typedef const ElementConstElement_ptr
 

Public Member Functions

 UnparametricOperations ()
 
virtual ~UnparametricOperations ()
 
virtual bool isZero (const Element &a) const =0
 
virtual bool isOne (const Element &a) const =0
 
virtual bool isMOne (const Element &a) const =0
 
virtual bool isUnit (const Element &a) const =0
 
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
 
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
 
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
 
Elementmod (Element &x, const Element &y, const Element &z) const
 x := y mod 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
 
Elementaxpyin (Element &z, const Element &a, const Element &x) const
 z := a*x + z
 
Elementaxmy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := a*x - y
 
Elementaxmyin (Element &z, const Element &a, const Element &x) const
 z := a*x - z
 
Elementmaxpy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := y - a*x
 
Elementmaxpyin (Element &z, const Element &a, const Element &x) const
 z := z - a*x
 
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
 
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
 
Elementmodin (Element &x, const Element &y) const
 x := x mod y
 
Elementnegin (Element &x) const
 x := -x
 
Elementinvin (Element &x) const
 x := 1/x
 
Input/Output Operations
std::ostream & write (std::ostream &os) const
 Print field.
 
std::ostream & write (std::ostream &os, std::string F) const
 Read field.
 
std::istream & read (std::istream &is) const
 Read field.
 
std::ostream & write (std::ostream &os, const Element &x) const
 Print field element.
 
virtual std::istream & read (std::istream &is, Element &x) const
 Read field element.
 

Member Typedef Documentation

◆ Element

template<class _Element>
typedef _Element Element

◆ Element_ptr

template<class _Element>
typedef Element* Element_ptr
inherited

◆ ConstElement

template<class _Element>
typedef const Element ConstElement
inherited

◆ ConstElement_ptr

template<class _Element>
typedef const Element* ConstElement_ptr
inherited

Constructor & Destructor Documentation

◆ UnparametricOperations()

template<class _Element>
UnparametricOperations ( )
inline

◆ ~UnparametricOperations()

template<class _Element>
virtual ~UnparametricOperations ( )
inlinevirtual

Member Function Documentation

◆ init()

template<class _Element>
Element & init ( Element & x) const
inlinevirtual

◆ assign()

template<class _Element>
Element & assign ( Element & x,
const Element & y ) const
inlinevirtual

◆ areEqual()

template<class _Element>
bool areEqual ( const Element & x,
const Element & y ) const
inlinevirtual

x == y

Implements RingInterface< _Element >.

◆ add()

template<class _Element>
Element & add ( Element & x,
const Element & y,
const Element & z ) const
inlinevirtual

x := y + z

Implements RingInterface< _Element >.

◆ sub()

template<class _Element>
Element & sub ( Element & x,
const Element & y,
const Element & z ) const
inlinevirtual

x := y - z

Implements RingInterface< _Element >.

◆ mul()

template<class _Element>
Element & mul ( Element & x,
const Element & y,
const Element & z ) const
inlinevirtual

x := y*z

Implements RingInterface< _Element >.

◆ div()

template<class _Element>
Element & div ( Element & x,
const Element & y,
const Element & z ) const
inline

x := y/z

◆ mod()

template<class _Element>
Element & mod ( Element & x,
const Element & y,
const Element & z ) const
inline

x := y mod z

◆ neg()

template<class _Element>
Element & neg ( Element & x,
const Element & y ) const
inlinevirtual

x := -y

Implements RingInterface< _Element >.

◆ inv()

template<class _Element>
Element & inv ( Element & x,
const Element & y ) const
inline

x := 1/y

◆ axpy()

template<class _Element>
Element & axpy ( Element & z,
const Element & a,
const Element & x,
const Element & y ) const
inlinevirtual

z := a*x + y

Implements RingInterface< _Element >.

◆ axpyin()

template<class _Element>
Element & axpyin ( Element & z,
const Element & a,
const Element & x ) const
inlinevirtual

z := a*x + z

Implements RingInterface< _Element >.

◆ axmy()

template<class _Element>
Element & axmy ( Element & z,
const Element & a,
const Element & x,
const Element & y ) const
inlinevirtual

z := a*x - y

Implements RingInterface< _Element >.

◆ axmyin()

template<class _Element>
Element & axmyin ( Element & z,
const Element & a,
const Element & x ) const
inlinevirtual

z := a*x - z

Implements RingInterface< _Element >.

◆ maxpy()

template<class _Element>
Element & maxpy ( Element & z,
const Element & a,
const Element & x,
const Element & y ) const
inlinevirtual

z := y - a*x

Implements RingInterface< _Element >.

◆ maxpyin()

template<class _Element>
Element & maxpyin ( Element & z,
const Element & a,
const Element & x ) const
inlinevirtual

z := z - a*x

Implements RingInterface< _Element >.

◆ addin()

template<class _Element>
Element & addin ( Element & x,
const Element & y ) const
inlinevirtual

x := x + y

Implements RingInterface< _Element >.

◆ subin()

template<class _Element>
Element & subin ( Element & x,
const Element & y ) const
inlinevirtual

x := x - y

Implements RingInterface< _Element >.

◆ mulin()

template<class _Element>
Element & mulin ( Element & x,
const Element & y ) const
inlinevirtual

x := x*y

Implements RingInterface< _Element >.

◆ divin()

template<class _Element>
Element & divin ( Element & x,
const Element & y ) const
inline

x := x/y

◆ modin()

template<class _Element>
Element & modin ( Element & x,
const Element & y ) const
inline

x := x mod y

◆ negin()

template<class _Element>
Element & negin ( Element & x) const
inlinevirtual

x := -x

Implements RingInterface< _Element >.

◆ invin()

template<class _Element>
Element & invin ( Element & x) const
inline

x := 1/x

◆ write() [1/3]

template<class _Element>
std::ostream & write ( std::ostream & os) const
inlinevirtual

Print field.

Returns
output stream to which field is written.
Parameters
osoutput stream to which field is written.

Implements RingInterface< _Element >.

Reimplemented in UnparametricZRing< _Element >, UnparametricZRing< Element >, UnparametricZRing< Element >, UnparametricZRing< Integer >, and UnparametricZRing< Integer >.

◆ write() [2/3]

template<class _Element>
std::ostream & write ( std::ostream & os,
std::string F ) const
inline

Read field.

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

◆ read() [1/2]

template<class _Element>
std::istream & read ( std::istream & is) const
inline

Read field.

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

◆ write() [3/3]

template<class _Element>
std::ostream & write ( std::ostream & os,
const Element & x ) const
inlinevirtual

Print field element.

Returns
output stream to which field element is written.
Parameters
osoutput stream to which field element is written.
xfield element.

Implements RingInterface< _Element >.

Reimplemented in UnparametricZRing< _Element >.

◆ read() [2/2]

template<class _Element>
virtual std::istream & read ( std::istream & is,
Element & x ) const
inlinevirtual

Read field element.

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

Implements RingInterface< _Element >.

Reimplemented in UnparametricZRing< _Element >, UnparametricZRing< Element >, and UnparametricZRing< Element >.

◆ isZero()

template<class _Element>
virtual bool isZero ( const Element & a) const
pure virtualinherited

◆ isOne()

template<class _Element>
virtual bool isOne ( const Element & a) const
pure virtualinherited

◆ isMOne()

template<class _Element>
virtual bool isMOne ( const Element & a) const
pure virtualinherited

◆ isUnit()

template<class _Element>
virtual bool isUnit ( const Element & a) const
pure virtualinherited

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