Givaro
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Attributes
ModularBalanced< float > Class Reference

#include <modular-balanced-float.h>

Public Types

enum  { size_rep = sizeof(Element) }
 
using Self_t = ModularBalanced< float >
 
using Element = float
 
using Element_ptr = Element *
 
using ConstElement = const Element
 
using ConstElement_ptr = const Element *
 
using Residu_t = float
 
typedef ModularRandIter< Self_tRandIter
 
typedef GeneralRingNonZeroRandIter< Self_tNonZeroRandIter
 

Public Member Functions

 ModularBalanced ()
 
 ModularBalanced (float p)
 
 ModularBalanced (const Self_t &F)
 
Element minElement () const
 
Element maxElement () const
 
Residu_t residu () const
 
Residu_t size () const
 
Residu_t characteristic () const
 
Residu_t cardinality () const
 
template<class T >
T & characteristic (T &p) const
 
template<class T >
T & cardinality (T &p) const
 
bool isZero (const Element &a) const
 
bool isOne (const Element &a) const
 
bool isMOne (const Element &a) const
 
bool isUnit (const Element &a) const
 
bool areEqual (const Element &a, const Element &b) const
 
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 int32_t a) const
 
Elementinit (Element &r, const uint32_t a) const
 
Elementinit (Element &r, const int64_t a) const
 
Elementinit (Element &r, const uint64_t 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
 
Elementdiv (Element &r, const Element &a, const Element &b) const
 
Elementadd (Element &r, const Element &a, const Element &b) const
 
Elementsub (Element &r, const Element &a, const Element &b) const
 
Elementneg (Element &r, const Element &a) const
 
Elementinv (Element &r, const Element &a) const
 
Elementmulin (Element &r, const Element &a) const
 
Elementdivin (Element &r, const Element &a) const
 
Elementaddin (Element &r, const Element &a) const
 
Elementsubin (Element &r, const Element &a) const
 
Elementnegin (Element &r) const
 
Elementinvin (Element &r) const
 
Elementaxpy (Element &r, const Element &a, const Element &x, const Element &y) const
 
Elementaxpyin (Element &r, const Element &a, const Element &x) const
 
Elementaxmy (Element &r, const Element &a, const Element &x, const Element &y) const
 
Elementaxmyin (Element &r, const Element &a, const Element &x) const
 
Elementmaxpy (Element &r, const Element &a, const Element &x, const Element &y) const
 
Elementmaxpyin (Element &r, const Element &a, const Element &x) const
 
template<class Random >
Elementrandom (Random &g, Element &r) const
 
template<class Random >
Elementnonzerorandom (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
 

Static Public Member Functions

static Residu_t maxCardinality ()
 
static Residu_t minCardinality ()
 
static const std::string type_string ()
 

Data Fields

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

Protected Attributes

Element _p
 
Element _halfp
 
Element _mhalfp
 
uint32_t _up
 

Member Typedef Documentation

◆ Self_t

using Self_t = ModularBalanced<float>

◆ Element

using Element = float

◆ Element_ptr

using Element_ptr = Element*

◆ ConstElement

using ConstElement = const Element

◆ ConstElement_ptr

using ConstElement_ptr = const Element*

◆ Residu_t

using Residu_t = float

◆ RandIter

◆ NonZeroRandIter

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
size_rep 

Constructor & Destructor Documentation

◆ ModularBalanced() [1/3]

ModularBalanced ( )
inline

◆ ModularBalanced() [2/3]

ModularBalanced ( float  p)
inline

◆ ModularBalanced() [3/3]

ModularBalanced ( const Self_t F)
inline

Member Function Documentation

◆ minElement()

Element minElement ( ) const
inline

◆ maxElement()

Element maxElement ( ) const
inline

◆ residu()

Residu_t residu ( ) const
inline

◆ size()

Residu_t size ( ) const
inline

◆ characteristic() [1/2]

Residu_t characteristic ( ) const
inline

◆ cardinality() [1/2]

Residu_t cardinality ( ) const
inline

◆ characteristic() [2/2]

T& characteristic ( T &  p) const
inline

◆ cardinality() [2/2]

T& cardinality ( T &  p) const
inline

◆ maxCardinality()

static Residu_t maxCardinality ( )
inlinestatic

◆ minCardinality()

static Residu_t minCardinality ( )
inlinestatic

◆ isZero()

bool isZero ( const Element a) const
inline

◆ isOne()

bool isOne ( const Element a) const
inline

◆ isMOne()

bool isMOne ( const Element a) const
inline

◆ isUnit()

bool isUnit ( const Element a) const
inline

◆ areEqual()

bool areEqual ( const Element a,
const Element b 
) const
inline

◆ length()

size_t length ( const Element  a) const
inline

◆ operator==()

bool operator== ( const Self_t F) const
inline

◆ operator!=()

bool operator!= ( const Self_t F) const
inline

◆ operator=()

Self_t& operator= ( const Self_t F)
inline

◆ init() [1/9]

ModularBalanced< float >::Element & init ( Element a) const
inline

◆ init() [2/9]

ModularBalanced< float >::Element & init ( Element r,
const float  a 
) const
inline

◆ init() [3/9]

ModularBalanced< float >::Element & init ( Element r,
const double  a 
) const
inline

◆ init() [4/9]

ModularBalanced< float >::Element & init ( Element r,
const int32_t  a 
) const
inline

◆ init() [5/9]

ModularBalanced< float >::Element & init ( Element r,
const uint32_t  a 
) const
inline

◆ init() [6/9]

ModularBalanced< float >::Element & init ( Element r,
const int64_t  a 
) const
inline

◆ init() [7/9]

ModularBalanced< float >::Element & init ( Element r,
const uint64_t  a 
) const
inline

◆ init() [8/9]

ModularBalanced< float >::Element & init ( Element r,
const Integer a 
) const
inline

◆ init() [9/9]

Element& init ( Element r,
const T &  a 
) const
inline

◆ assign()

ModularBalanced< float >::Element & assign ( Element r,
const Element a 
) const
inline

◆ convert()

T& convert ( T &  r,
const Element a 
) const
inline

◆ reduce() [1/2]

ModularBalanced< float >::Element & reduce ( Element r,
const Element a 
) const
inline

◆ reduce() [2/2]

ModularBalanced< float >::Element & reduce ( Element r) const
inline

◆ mul()

ModularBalanced< float >::Element & mul ( Element r,
const Element a,
const Element b 
) const
inline

◆ div()

ModularBalanced< float >::Element & div ( Element r,
const Element a,
const Element b 
) const
inline

◆ add()

ModularBalanced< float >::Element & add ( Element r,
const Element a,
const Element b 
) const
inline

◆ sub()

ModularBalanced< float >::Element & sub ( Element r,
const Element a,
const Element b 
) const
inline

◆ neg()

ModularBalanced< float >::Element & neg ( Element r,
const Element a 
) const
inline

◆ inv()

ModularBalanced< float >::Element & inv ( Element r,
const Element a 
) const
inline

◆ mulin()

ModularBalanced< float >::Element & mulin ( Element r,
const Element a 
) const
inline

◆ divin()

ModularBalanced< float >::Element & divin ( Element r,
const Element a 
) const
inline

◆ addin()

ModularBalanced< float >::Element & addin ( Element r,
const Element a 
) const
inline

◆ subin()

ModularBalanced< float >::Element & subin ( Element r,
const Element a 
) const
inline

◆ negin()

ModularBalanced< float >::Element & negin ( Element r) const
inline

◆ invin()

ModularBalanced< float >::Element & invin ( Element r) const
inline

◆ axpy()

ModularBalanced< float >::Element & axpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inline

◆ axpyin()

ModularBalanced< float >::Element & axpyin ( Element r,
const Element a,
const Element x 
) const
inline

◆ axmy()

ModularBalanced< float >::Element & axmy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inline

◆ axmyin()

ModularBalanced< float >::Element & axmyin ( Element r,
const Element a,
const Element x 
) const
inline

◆ maxpy()

ModularBalanced< float >::Element & maxpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inline

◆ maxpyin()

ModularBalanced< float >::Element & maxpyin ( Element r,
const Element a,
const Element x 
) const
inline

◆ type_string()

static const std::string type_string ( )
inlinestatic

◆ random()

Element& random ( Random &  g,
Element r 
) const
inline

◆ nonzerorandom()

Element& nonzerorandom ( Random &  g,
Element a 
) const
inline

◆ write() [1/2]

std::ostream & write ( std::ostream &  s) const
inline

◆ read()

std::istream & read ( std::istream &  s,
Element a 
) const
inline

◆ write() [2/2]

std::ostream & write ( std::ostream &  s,
const Element a 
) const
inline

Field Documentation

◆ zero

const Element zero = 0.f

◆ one

const Element one = 1.f

◆ mOne

const Element mOne = -1.f

◆ _p

Element _p
protected

◆ _halfp

Element _halfp
protected

◆ _mhalfp

Element _mhalfp
protected

◆ _up

uint32_t _up
protected

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