FflasFfpack
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Protected Attributes
Modular< float > Class Template Reference

#include <modular-float.h>

Public Types

typedef float Element
 
typedef unsigned long FieldInt
 
typedef ModularRandIter< ElementRandIter
 
typedef NonzeroRandIter
< Modular< Element >
, ModularRandIter< Element > > 
NonZeroRandIter
 

Public Member Functions

 Modular ()
 
 Modular (int32_t p, int exp=1)
 
 Modular (Element p)
 
 Modular (unsigned long int p)
 
 Modular (const Modular< Element > &mf)
 
Modular< Element > & assign (const Modular< Element > &F)
 
const Modularoperator= (const Modular< Element > &F)
 
unsigned long & cardinality (unsigned long &c) const
 
unsigned long cardinality () const
 
unsigned long int & characteristic (long unsigned int &c) const
 
unsigned long characteristic () const
 
unsigned long & convert (unsigned long &x, const Element &y) const
 
double & convert (double &x, const Element &y) const
 
Elementconvert (Element &x, const Element &y) const
 
std::ostream & write (std::ostream &os) const
 
std::istream & read (std::istream &is)
 
std::ostream & write (std::ostream &os, const Element &x) const
 
std::istream & read (std::istream &is, Element &x) const
 
Elementinit (Element &x, unsigned long int y) const
 
Elementinit (Element &x, long int y) const
 
Elementinit (Element &x, Element y) const
 
Elementinit (Element &x, double y) const
 
Elementinit (Element &x, int y) const
 
Elementinit (Element &x, unsigned int y) const
 
Elementinit (Element &x) const
 
Elementassign (Element &x, const Element &y) const
 
bool areEqual (const Element &x, const Element &y) const
 
bool isZero (const Element &x) const
 
bool isOne (const Element &x) const
 
Elementadd (Element &x, const Element &y, const Element &z) const
 
Elementsub (Element &x, const Element &y, const Element &z) const
 
Elementmul (Element &x, const Element &y, const Element &z) const
 
Elementdiv (Element &x, const Element &y, const Element &z) const
 
Elementneg (Element &x, const Element &y) const
 
Elementinv (Element &x, const Element &y) const
 
Elementaxpy (Element &r, const Element &a, const Element &x, const Element &y) const
 
Elementaddin (Element &x, const Element &y) const
 
Elementsubin (Element &x, const Element &y) const
 
Elementmulin (Element &x, const Element &y) const
 
Elementdivin (Element &x, const Element &y) const
 
Elementnegin (Element &x) const
 
Elementinvin (Element &x) const
 
Elementaxpyin (Element &r, const Element &a, const Element &x) const
 

Static Public Member Functions

static Element getMaxModulus ()
 

Data Fields

const Element one
 
const Element zero
 
const Element mOne
 

Static Public Attributes

static const bool balanced = false
 

Protected Attributes

Element modulus
 
unsigned long lmodulus
 

Member Typedef Documentation

typedef float Element
typedef unsigned long FieldInt

Constructor & Destructor Documentation

Modular ( )
inline
Modular ( int32_t  p,
int  exp = 1 
)
inline
Modular ( Element  p)
inline
Modular ( unsigned long int  p)
inline
Modular ( const Modular< Element > &  mf)
inline

Member Function Documentation

Modular<Element>& assign ( const Modular< Element > &  F)
inline
const Modular& operator= ( const Modular< Element > &  F)
inline
unsigned long& cardinality ( unsigned long &  c) const
inline
unsigned long cardinality ( ) const
inline
unsigned long int& characteristic ( long unsigned int &  c) const
inline
unsigned long characteristic ( ) const
inline
unsigned long& convert ( unsigned long &  x,
const Element y 
) const
inline
double& convert ( double &  x,
const Element y 
) const
inline
Element& convert ( Element x,
const Element y 
) const
inline
std::ostream& write ( std::ostream &  os) const
inline
std::istream& read ( std::istream &  is)
inline
std::ostream& write ( std::ostream &  os,
const Element x 
) const
inline
std::istream& read ( std::istream &  is,
Element x 
) const
inline
Element& init ( Element x,
unsigned long int  y 
) const
inline
Warning
possibly buggy. use % instead ?
Element& init ( Element x,
long int  y 
) const
inline
Element& init ( Element x,
Element  y 
) const
inline
Element& init ( Element x,
double  y 
) const
inline
Element& init ( Element x,
int  y 
) const
inline
Element& init ( Element x,
unsigned int  y 
) const
inline
Element& init ( Element x) const
inline
Element& assign ( Element x,
const Element y 
) const
inline
bool areEqual ( const Element x,
const Element y 
) const
inline
bool isZero ( const Element x) const
inline
bool isOne ( const Element x) const
inline
Element& add ( Element x,
const Element y,
const Element z 
) const
inline
Element& sub ( Element x,
const Element y,
const Element z 
) const
inline
Element& mul ( Element x,
const Element y,
const Element z 
) const
inline
Element& div ( Element x,
const Element y,
const Element z 
) const
inline
Element& neg ( Element x,
const Element y 
) const
inline
Element& inv ( Element x,
const Element y 
) const
inline
Element& axpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inline
Element& addin ( Element x,
const Element y 
) const
inline
Element& subin ( Element x,
const Element y 
) const
inline
Element& mulin ( Element x,
const Element y 
) const
inline
Element& divin ( Element x,
const Element y 
) const
inline
Element& negin ( Element x) const
inline
Element& invin ( Element x) const
inline
Element& axpyin ( Element r,
const Element a,
const Element x 
) const
inline
static Element getMaxModulus ( )
inlinestatic

Field Documentation

Element modulus
protected
unsigned long lmodulus
protected
const Element one
const Element zero
const Element mOne
const bool balanced = false
static

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