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

it is forbiden to have char 2 More...

#include <modular-balanced-double.h>

Public Types

typedef double Element
 
typedef unsigned long FieldInt
 
typedef
ModularBalancedRandIter
< double > 
RandIter
 
typedef NonzeroRandIter
< ModularBalanced< double >
, RandIter
NonZeroRandIter
 

Public Member Functions

 ModularBalanced (int32_t p, int exp=1)
 
 ModularBalanced (double p)
 
 ModularBalanced (unsigned long p)
 
 ModularBalanced (long p)
 
 ModularBalanced (const ModularBalanced< double > &mf)
 
ModularBalanced< Element > & assign (const ModularBalanced< Element > &F)
 
const ModularBalanced< double > & operator= (const ModularBalanced< double > &F)
 
FieldIntcardinality (FieldInt &c) const
 
FieldInt cardinality () const
 
unsigned long characteristic () const
 
FieldIntcharacteristic (FieldInt &c) const
 
unsigned long & convert (unsigned long &x, const Element &y) const
 
double & convert (double &x, const Element &y) const
 
float & convert (float &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, const unsigned long &y) const
 
Elementinit (Element &x, const double y) const
 
Elementinit (Element &x) const
 
template<class T >
Elementinit (Element &x, const T y) const
 
Elementassign (Element &x, const Element &y) const
 
bool areEqual (const Element &x, const Element &y) const
 Tests equality. More...
 
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 double getMaxModulus ()
 

Data Fields

const Element one
 
const Element zero
 
const Element mOne
 

Static Public Attributes

static const bool balanced = true
 

Protected Attributes

double modulus
 
double half_mod
 
double mhalf_mod
 
unsigned long lmodulus
 

Detailed Description

template<>
class FFPACK::ModularBalanced< double >

it is forbiden to have char 2

Member Typedef Documentation

typedef double Element
typedef unsigned long FieldInt

Constructor & Destructor Documentation

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

Member Function Documentation

ModularBalanced<Element>& assign ( const ModularBalanced< Element > &  F)
inline
const ModularBalanced<double>& operator= ( const ModularBalanced< double > &  F)
inline
FieldInt& cardinality ( FieldInt c) const
inline
FieldInt cardinality ( ) const
inline
unsigned long characteristic ( ) const
inline
FieldInt& characteristic ( FieldInt c) const
inline
unsigned long& convert ( unsigned long &  x,
const Element y 
) const
inline
double& convert ( double &  x,
const Element y 
) const
inline
float& convert ( float &  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,
const unsigned long &  y 
) const
inline
Element& init ( Element x,
const double  y 
) const
inline
Element& init ( Element x) const
inline
Element& init ( Element x,
const T  y 
) const
inline
Element& assign ( Element x,
const Element y 
) const
inline
bool areEqual ( const Element x,
const Element y 
) const
inline

Tests equality.

Parameters
xelement
yelement
Warning
x and y are supposed to be reduced.
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 double getMaxModulus ( )
inlinestatic

Field Documentation

double modulus
protected
double half_mod
protected
double mhalf_mod
protected
unsigned long lmodulus
protected
const Element one
const Element zero
const Element mOne
const bool balanced = true
static

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