Givaro
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Attributes
ModularBalanced< int64_t > Class Template Referenceabstract

#include <modular-balanced-int64.h>

+ Inheritance diagram for ModularBalanced< int64_t >:
+ Collaboration diagram for ModularBalanced< int64_t >:

Public Types

enum  { size_rep = sizeof(Element) }
 
using Self_t = ModularBalanced< int64_t >
 
typedef ModularRandIter< Self_tRandIter
 
typedef GeneralRingNonZeroRandIter< Self_tNonZeroRandIter
 
typedef int64_t Element
 
typedef ElementElement_ptr
 
typedef const Element ConstElement
 
typedef const ElementConstElement_ptr
 

Public Member Functions

 ModularBalanced ()
 
 ModularBalanced (Element p)
 
 ModularBalanced (const Self_t &F)
 
Element minElement () const override
 
Element maxElement () const override
 
Element residu () const
 
Element size () const
 
Element characteristic () const
 
Element cardinality () const
 
template<class T >
T & characteristic (T &p) const
 
template<class T >
T & cardinality (T &p) const
 
bool isZero (const Element &a) const override
 
bool isOne (const Element &a) const override
 
bool isMOne (const Element &a) const override
 
bool areEqual (const Element &a, const Element &b) const override
 
size_t length (const Element a) const
 
bool operator== (const Self_t &F) const
 
bool operator!= (const Self_t &F) const
 
Self_toperator= (const Self_t &F)
 
Elementinit (Element &a) const
 
Elementinit (Element &r, const float a) const
 
Elementinit (Element &r, const double a) const
 
Elementinit (Element &r, const Integer &a) const
 
template<typename T >
Elementinit (Element &r, const T &a) const
 
Elementassign (Element &r, const Element &a) const
 
template<typename T >
T & convert (T &r, const Element &a) const
 
Elementreduce (Element &r, const Element &a) const
 
Elementreduce (Element &r) const
 
Elementmul (Element &r, const Element &a, const Element &b) const override
 
Elementdiv (Element &r, const Element &a, const Element &b) const override
 
Elementadd (Element &r, const Element &a, const Element &b) const override
 
Elementsub (Element &r, const Element &a, const Element &b) const override
 
Elementneg (Element &r, const Element &a) const override
 
Elementinv (Element &r, const Element &a) const override
 
Elementmulin (Element &r, const Element &a) const override
 
Elementdivin (Element &r, const Element &a) const override
 
Elementaddin (Element &r, const Element &a) const override
 
Elementsubin (Element &r, const Element &a) const override
 
Elementnegin (Element &r) const override
 
Elementinvin (Element &r) const override
 
Elementaxpy (Element &r, const Element &a, const Element &x, const Element &y) const override
 
Elementaxpyin (Element &r, const Element &a, const Element &x) const override
 
Elementaxmy (Element &r, const Element &a, const Element &x, const Element &y) const override
 
Elementaxmyin (Element &r, const Element &a, const Element &x) const override
 
Elementmaxpy (Element &r, const Element &a, const Element &x, const Element &y) const override
 
Elementmaxpyin (Element &r, const Element &a, const Element &x) const override
 
template<class Random >
Elementrandom (const Random &g, Element &r) const
 
template<class Random >
Elementnonzerorandom (const Random &g, Element &a) const
 
std::ostream & write (std::ostream &s) const
 
std::istream & read (std::istream &s, Element &a) const
 
std::ostream & write (std::ostream &s, const Element &a) const
 
virtual int64_t & div (int64_t &r, const int64_t &a, const int64_t &b) const =0
 
virtual int64_t & inv (int64_t &r, const int64_t &a) const =0
 
virtual int64_t & divin (int64_t &r, const int64_t &a) const =0
 
virtual int64_t & invin (int64_t &r) const =0
 
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 areEqual (const Element &a, const Element &b) const =0
 
virtual Elementmul (Element &r, const Element &a, const Element &b) const =0
 
virtual Elementadd (Element &r, const Element &a, const Element &b) const =0
 
virtual Elementsub (Element &r, const Element &a, const Element &b) const =0
 
virtual Elementneg (Element &r, const Element &a) const =0
 
virtual Elementmulin (Element &r, const Element &a) const =0
 
virtual Elementaddin (Element &r, const Element &a) const =0
 
virtual Elementsubin (Element &r, const Element &a) const =0
 
virtual Elementnegin (Element &r) const =0
 
virtual Elementaxpy (Element &r, const Element &a, const Element &x, const Element &y) const =0
 
virtual Elementaxpyin (Element &r, const Element &a, const Element &x) const =0
 
virtual Elementaxmy (Element &r, const Element &a, const Element &x, const Element &y) const =0
 
virtual Elementaxmyin (Element &r, const Element &a, const Element &x) const =0
 
virtual Elementmaxpy (Element &r, const Element &a, const Element &x, const Element &y) const =0
 
virtual Elementmaxpyin (Element &r, const Element &a, const Element &x) const =0
 

Static Public Member Functions

static Element maxCardinality ()
 
static Element minCardinality ()
 

Data Fields

const Element zero = 0
 
const Element one = 1
 
const Element mOne = -1
 

Protected Attributes

Element _p
 
Element _halfp
 
Element _mhalfp
 
double _dinvp
 

Member Typedef Documentation

using Self_t = ModularBalanced<int64_t>
typedef int64_t Element
inherited
typedef Element* Element_ptr
inherited
typedef const Element ConstElement
inherited
typedef const Element* ConstElement_ptr
inherited

Member Enumeration Documentation

anonymous enum
Enumerator
size_rep 

Constructor & Destructor Documentation

ModularBalanced ( )
inline
ModularBalanced ( Element  p)
inline
ModularBalanced ( const Self_t F)
inline

Member Function Documentation

Element minElement ( ) const
inlineoverridevirtual
Element maxElement ( ) const
inlineoverridevirtual
Element residu ( ) const
inline
Element size ( ) const
inline
Element characteristic ( ) const
inline
Element cardinality ( ) const
inline
T& characteristic ( T &  p) const
inline
T& cardinality ( T &  p) const
inline
static Element maxCardinality ( )
inlinestatic
static Element minCardinality ( )
inlinestatic
bool isZero ( const Element a) const
inlineoverride
bool isOne ( const Element a) const
inlineoverride
bool isMOne ( const Element a) const
inlineoverride
bool areEqual ( const Element a,
const Element b 
) const
inlineoverride
size_t length ( const Element  a) const
inline
bool operator== ( const Self_t F) const
inline
bool operator!= ( const Self_t F) const
inline
Self_t& operator= ( const Self_t F)
inline
ModularBalanced< int64_t >::Element & init ( Element a) const
inline
ModularBalanced< int64_t >::Element & init ( Element r,
const float  a 
) const
inline
ModularBalanced< int64_t >::Element & init ( Element r,
const double  a 
) const
inline
ModularBalanced< int64_t >::Element & init ( Element r,
const Integer a 
) const
inline
Element& init ( Element r,
const T &  a 
) const
inline
ModularBalanced< int64_t >::Element & assign ( Element r,
const Element a 
) const
inline
T& convert ( T &  r,
const Element a 
) const
inline
ModularBalanced< int64_t >::Element & reduce ( Element r,
const Element a 
) const
inline
ModularBalanced< int64_t >::Element & reduce ( Element r) const
inline
ModularBalanced< int64_t >::Element & mul ( Element r,
const Element a,
const Element b 
) const
inlineoverride
ModularBalanced< int64_t >::Element & div ( Element r,
const Element a,
const Element b 
) const
inlineoverride
ModularBalanced< int64_t >::Element & add ( Element r,
const Element a,
const Element b 
) const
inlineoverride
ModularBalanced< int64_t >::Element & sub ( Element r,
const Element a,
const Element b 
) const
inlineoverride
ModularBalanced< int64_t >::Element & neg ( Element r,
const Element a 
) const
inlineoverride
ModularBalanced< int64_t >::Element & inv ( Element r,
const Element a 
) const
inlineoverride
ModularBalanced< int64_t >::Element & mulin ( Element r,
const Element a 
) const
inlineoverride
ModularBalanced< int64_t >::Element & divin ( Element r,
const Element a 
) const
inlineoverride
ModularBalanced< int64_t >::Element & addin ( Element r,
const Element a 
) const
inlineoverride
ModularBalanced< int64_t >::Element & subin ( Element r,
const Element a 
) const
inlineoverride
ModularBalanced< int64_t >::Element & negin ( Element r) const
inlineoverride
ModularBalanced< int64_t >::Element & invin ( Element r) const
inlineoverride
ModularBalanced< int64_t >::Element & axpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inlineoverride
ModularBalanced< int64_t >::Element & axpyin ( Element r,
const Element a,
const Element x 
) const
inlineoverride
ModularBalanced< int64_t >::Element & axmy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inlineoverride
ModularBalanced< int64_t >::Element & axmyin ( Element r,
const Element a,
const Element x 
) const
inlineoverride
ModularBalanced< int64_t >::Element & maxpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inlineoverride
ModularBalanced< int64_t >::Element & maxpyin ( Element r,
const Element a,
const Element x 
) const
inlineoverride
Element& random ( const Random &  g,
Element r 
) const
inline
Element& nonzerorandom ( const Random &  g,
Element a 
) const
inline
std::ostream & write ( std::ostream &  s) const
inline
std::istream & read ( std::istream &  s,
Element a 
) const
inline
std::ostream & write ( std::ostream &  s,
const Element a 
) const
inline
virtual int64_t & div ( int64_t &  r,
const int64_t &  a,
const int64_t &  b 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual int64_t & inv ( int64_t &  r,
const int64_t &  a 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual int64_t & divin ( int64_t &  r,
const int64_t &  a 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual int64_t & invin ( int64_t &  r) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual bool isZero ( const Element a) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual bool isOne ( const Element a) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual bool isMOne ( const Element a) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual bool areEqual ( const Element a,
const Element b 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& mul ( Element r,
const Element a,
const Element b 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& add ( Element r,
const Element a,
const Element b 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& sub ( Element r,
const Element a,
const Element b 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& neg ( Element r,
const Element a 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& mulin ( Element r,
const Element a 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& addin ( Element r,
const Element a 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& subin ( Element r,
const Element a 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& negin ( Element r) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& axpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& axpyin ( Element r,
const Element a,
const Element x 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& axmy ( Element r,
const Element a,
const Element x,
const Element y 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& axmyin ( Element r,
const Element a,
const Element x 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& maxpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

virtual Element& maxpyin ( Element r,
const Element a,
const Element x 
) const
pure virtualinherited

Implemented in Modular< int64_t, COMP >.

Field Documentation

const Element zero = 0
const Element one = 1
const Element mOne = -1
Element _p
protected
Element _halfp
protected
Element _mhalfp
protected
double _dinvp
protected

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