Givaro
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Protected Attributes
ModularExtended< _Element > Class Template Reference

#include <modular-extended.h>

Public Types

enum  { size_rep = sizeof(Residu_t) }
 
typedef _Element Element
 
typedef ElementElement_ptr
 
typedef const Element ConstElement
 
typedef const ElementConstElement_ptr
 
typedef ModularExtended< _Element > Self_t
 
using Compute_t = _Element
 
typedef uint64_t Residu_t
 
using is_elt_integral = std::false_type
 
using is_elt_floating_point = std::true_type
 
typedef ModularRandIter< Self_tRandIter
 
typedef GeneralRingNonZeroRandIter< Self_tNonZeroRandIter
 

Public Member Functions

 ModularExtended ()=default
 
template<class XXX >
 ModularExtended (const XXX &p)
 
Element minElement () const
 
Element maxElement () const
 
Residu_t residu () const
 
Residu_t size () const
 
Residu_t characteristic () const
 
template<class T >
T & characteristic (T &p) const
 
Residu_t cardinality () 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 &x) const
 
template<typename T >
Elementinit (Element &r, T a) const
 
Elementassign (Element &x, const Element &y) const
 
template<typename T >
T & convert (T &r, const Element &a) const
 
Elementreduce (Element &x, const Element &y) const
 
Elementreduce (Element &x) 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 &x, const Element &y) const
 
Elementmulin (Element &r, const Element &a) const
 
Elementdivin (Element &r, const Element &y) 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 (const Random &g, Element &r) const
 
template<class Random >
Elementnonzerorandom (const Random &g, Element &a) const
 
std::istream & read (std::istream &s)
 
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
 
std::ostream & write (std::ostream &os) const
 
std::ostream & write (std::ostream &os) const
 
ModularExtended< double >::Elementinit (Element &x, const int64_t y) const
 
ModularExtended< double >::Elementinit (Element &x, const uint64_t y) const
 
ModularExtended< double >::Elementinit (Element &x, const Integer &y) const
 
ModularExtended< double >::Elementinit (Element &x, const Element &y) const
 
ModularExtended< float >::Elementinit (typename ModularExtended< float >::Element &r, const double a) const
 
ModularExtended< float >::Elementinit (typename ModularExtended< float >::Element &r, const int32_t a) const
 
ModularExtended< float >::Elementinit (typename ModularExtended< float >::Element &r, const uint32_t a) const
 
ModularExtended< float >::Elementinit (typename ModularExtended< float >::Element &r, const int64_t a) const
 
ModularExtended< float >::Elementinit (typename ModularExtended< float >::Element &r, const uint64_t a) const
 
ModularExtended< float >::Elementinit (typename ModularExtended< float >::Element &r, const Integer &a) const
 
ModularExtended< float >::Elementmul (typename ModularExtended< float >::Element &r, const typename ModularExtended< float >::Element &a, const typename ModularExtended< float >::Element &b) const
 
ModularExtended< double >::Elementmul (typename ModularExtended< double >::Element &r, const typename ModularExtended< double >::Element &a, const typename ModularExtended< double >::Element &b) const
 
ModularExtended< float >::Elementreduce (typename ModularExtended< float >::Element &a) const
 
ModularExtended< double >::Elementreduce (typename ModularExtended< double >::Element &a) const
 
bool isUnit (const Element &a) const
 
bool isUnit (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.0
 
const Element one = 1.0
 
const Element mOne = -1.0
 

Static Public Attributes

static constexpr bool is_elt_integral_v = false
 
static constexpr bool is_elt_floating_point_v = true
 

Protected Attributes

Element _p = 0
 
Element _invp = 0
 
Element _negp = 0
 
Residu_t _lp = 0
 

Member Typedef Documentation

◆ Element

typedef _Element Element

◆ Element_ptr

typedef Element* Element_ptr

◆ ConstElement

typedef const Element ConstElement

◆ ConstElement_ptr

typedef const Element* ConstElement_ptr

◆ Self_t

typedef ModularExtended<_Element> Self_t

◆ Compute_t

using Compute_t = _Element

◆ Residu_t

typedef uint64_t Residu_t

◆ is_elt_integral

using is_elt_integral = std::false_type

◆ is_elt_floating_point

using is_elt_floating_point = std::true_type

◆ RandIter

◆ NonZeroRandIter

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
size_rep 

Constructor & Destructor Documentation

◆ ModularExtended() [1/2]

ModularExtended ( )
default

◆ ModularExtended() [2/2]

ModularExtended ( const XXX &  p)
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

◆ characteristic() [2/2]

T& characteristic ( T &  p) const
inline

◆ cardinality() [1/2]

Residu_t cardinality ( ) 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() [1/3]

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/12]

Element& init ( Element x) const
inline

◆ init() [2/12]

Element& init ( Element r,
a 
) const
inline

◆ assign()

Element& assign ( Element x,
const Element y 
) const
inline

◆ convert()

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

◆ reduce() [1/4]

Element& reduce ( Element x,
const Element y 
) const
inline

◆ reduce() [2/4]

Element& reduce ( Element x) const

◆ mul() [1/3]

Element& mul ( Element r,
const Element a,
const Element b 
) const

◆ div()

Element& div ( Element r,
const Element a,
const Element b 
) const
inline

◆ add()

Element& add ( Element r,
const Element a,
const Element b 
) const
inline

◆ sub()

Element& sub ( Element r,
const Element a,
const Element b 
) const
inline

◆ neg()

Element& neg ( Element r,
const Element a 
) const
inline

◆ inv()

Element& inv ( Element x,
const Element y 
) const
inline

◆ mulin()

Element& mulin ( Element r,
const Element a 
) const
inline

◆ divin()

Element& divin ( Element r,
const Element y 
) const
inline

◆ addin()

Element& addin ( Element r,
const Element a 
) const
inline

◆ subin()

Element& subin ( Element r,
const Element a 
) const
inline

◆ negin()

Element& negin ( Element r) const
inline

◆ invin()

Element& invin ( Element r) const
inline

◆ axpy()

Element& axpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inline

◆ axpyin()

Element& axpyin ( Element r,
const Element a,
const Element x 
) const
inline

◆ axmy()

Element& axmy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inline

◆ axmyin()

Element& axmyin ( Element r,
const Element a,
const Element x 
) const
inline

◆ maxpy()

Element& maxpy ( Element r,
const Element a,
const Element x,
const Element y 
) const
inline

◆ maxpyin()

Element& maxpyin ( Element r,
const Element a,
const Element x 
) const
inline

◆ type_string()

static const std::string type_string ( )
inlinestatic

◆ random()

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

◆ nonzerorandom()

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

◆ read() [1/2]

std::istream & read ( std::istream &  s)
inline

◆ write() [1/4]

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

◆ read() [2/2]

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

◆ write() [2/4]

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

◆ write() [3/4]

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

◆ write() [4/4]

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

◆ init() [3/12]

ModularExtended< double >::Element & init< const int64_t > ( Element x,
const int64_t  y 
) const
inline

◆ init() [4/12]

ModularExtended< double >::Element & init< const uint64_t > ( Element x,
const uint64_t  y 
) const
inline

◆ init() [5/12]

ModularExtended< double >::Element & init< const Integer & > ( Element x,
const Integer y 
) const
inline

◆ init() [6/12]

ModularExtended< double >::Element & init< const typename ModularExtended< double >::Element & > ( Element x,
const Element y 
) const
inline

◆ init() [7/12]

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

◆ init() [8/12]

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

◆ init() [9/12]

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

◆ init() [10/12]

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

◆ init() [11/12]

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

◆ init() [12/12]

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

◆ mul() [2/3]

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

◆ mul() [3/3]

ModularExtended< double >::Element & mul ( typename ModularExtended< double >::Element r,
const typename ModularExtended< double >::Element a,
const typename ModularExtended< double >::Element b 
) const
inline

◆ reduce() [3/4]

ModularExtended< float >::Element & reduce ( typename ModularExtended< float >::Element a) const
inline

◆ reduce() [4/4]

ModularExtended< double >::Element & reduce ( typename ModularExtended< double >::Element a) const
inline

◆ isUnit() [2/3]

bool isUnit ( const Element a) const
inline

◆ isUnit() [3/3]

bool isUnit ( const Element a) const
inline

Field Documentation

◆ is_elt_integral_v

constexpr bool is_elt_integral_v = false
staticconstexpr

◆ is_elt_floating_point_v

constexpr bool is_elt_floating_point_v = true
staticconstexpr

◆ zero

const Element zero = 0.0

◆ one

const Element one = 1.0

◆ mOne

const Element mOne = -1.0

◆ _p

Element _p = 0
protected

◆ _invp

Element _invp = 0
protected

◆ _negp

Element _negp = 0
protected

◆ _lp

Residu_t _lp = 0
protected

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