Givaro 4.2.1
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

template<class _Element>
typedef _Element Element

◆ Element_ptr

template<class _Element>
typedef Element* Element_ptr

◆ ConstElement

template<class _Element>
typedef const Element ConstElement

◆ ConstElement_ptr

template<class _Element>
typedef const Element* ConstElement_ptr

◆ Self_t

template<class _Element>
typedef ModularExtended<_Element> Self_t

◆ Compute_t

template<class _Element>
using Compute_t = _Element

◆ Residu_t

template<class _Element>
typedef uint64_t Residu_t

◆ is_elt_integral

template<class _Element>
using is_elt_integral = std::false_type

◆ is_elt_floating_point

template<class _Element>
using is_elt_floating_point = std::true_type

◆ RandIter

template<class _Element>
typedef ModularRandIter<Self_t> RandIter

◆ NonZeroRandIter

template<class _Element>
typedef GeneralRingNonZeroRandIter<Self_t> NonZeroRandIter

Member Enumeration Documentation

◆ anonymous enum

template<class _Element>
anonymous enum
Enumerator
size_rep 

Constructor & Destructor Documentation

◆ ModularExtended() [1/2]

template<class _Element>
ModularExtended ( )
default

◆ ModularExtended() [2/2]

template<class _Element>
template<class XXX>
ModularExtended ( const XXX & p)
inline

Member Function Documentation

◆ minElement()

template<class _Element>
Element minElement ( ) const
inline

◆ maxElement()

template<class _Element>
Element maxElement ( ) const
inline

◆ residu()

template<class _Element>
Residu_t residu ( ) const
inline

◆ size()

template<class _Element>
Residu_t size ( ) const
inline

◆ characteristic() [1/2]

template<class _Element>
Residu_t characteristic ( ) const
inline

◆ characteristic() [2/2]

template<class _Element>
template<class T>
T & characteristic ( T & p) const
inline

◆ cardinality() [1/2]

template<class _Element>
Residu_t cardinality ( ) const
inline

◆ cardinality() [2/2]

template<class _Element>
template<class T>
T & cardinality ( T & p) const
inline

◆ maxCardinality()

template<class _Element>
static Residu_t maxCardinality ( )
inlinestatic

◆ minCardinality()

template<class _Element>
static Residu_t minCardinality ( )
inlinestatic

◆ isZero()

template<class _Element>
bool isZero ( const Element & a) const
inline

◆ isOne()

template<class _Element>
bool isOne ( const Element & a) const
inline

◆ isMOne()

template<class _Element>
bool isMOne ( const Element & a) const
inline

◆ isUnit() [1/3]

template<class _Element>
bool isUnit ( const Element & a) const
inline

◆ areEqual()

template<class _Element>
bool areEqual ( const Element & a,
const Element & b ) const
inline

◆ length()

template<class _Element>
size_t length ( const Element a) const
inline

◆ operator==()

template<class _Element>
bool operator== ( const Self_t & F) const
inline

◆ operator!=()

template<class _Element>
bool operator!= ( const Self_t & F) const
inline

◆ operator=()

template<class _Element>
Self_t & operator= ( const Self_t & F)
inline

◆ init() [1/12]

template<class _Element>
Element & init ( Element & x) const
inline

◆ init() [2/12]

template<class _Element>
template<typename T>
Element & init ( Element & r,
T a ) const
inline

◆ assign()

template<class _Element>
Element & assign ( Element & x,
const Element & y ) const
inline

◆ convert()

template<class _Element>
template<typename T>
T & convert ( T & r,
const Element & a ) const
inline

◆ reduce() [1/4]

template<class _Element>
Element & reduce ( Element & x,
const Element & y ) const
inline

◆ reduce() [2/4]

template<class _Element>
Element & reduce ( Element & x) const

◆ mul() [1/3]

template<class _Element>
Element & mul ( Element & r,
const Element & a,
const Element & b ) const

◆ div()

template<class _Element>
Element & div ( Element & r,
const Element & a,
const Element & b ) const
inline

◆ add()

template<class _Element>
Element & add ( Element & r,
const Element & a,
const Element & b ) const
inline

◆ sub()

template<class _Element>
Element & sub ( Element & r,
const Element & a,
const Element & b ) const
inline

◆ neg()

template<class _Element>
Element & neg ( Element & r,
const Element & a ) const
inline

◆ inv()

template<class _Element>
Element & inv ( Element & x,
const Element & y ) const
inline

◆ mulin()

template<class _Element>
Element & mulin ( Element & r,
const Element & a ) const
inline

◆ divin()

template<class _Element>
Element & divin ( Element & r,
const Element & y ) const
inline

◆ addin()

template<class _Element>
Element & addin ( Element & r,
const Element & a ) const
inline

◆ subin()

template<class _Element>
Element & subin ( Element & r,
const Element & a ) const
inline

◆ negin()

template<class _Element>
Element & negin ( Element & r) const
inline

◆ invin()

template<class _Element>
Element & invin ( Element & r) const
inline

◆ axpy()

template<class _Element>
Element & axpy ( Element & r,
const Element & a,
const Element & x,
const Element & y ) const
inline

◆ axpyin()

template<class _Element>
Element & axpyin ( Element & r,
const Element & a,
const Element & x ) const
inline

◆ axmy()

template<class _Element>
Element & axmy ( Element & r,
const Element & a,
const Element & x,
const Element & y ) const
inline

◆ axmyin()

template<class _Element>
Element & axmyin ( Element & r,
const Element & a,
const Element & x ) const
inline

◆ maxpy()

template<class _Element>
Element & maxpy ( Element & r,
const Element & a,
const Element & x,
const Element & y ) const
inline

◆ maxpyin()

template<class _Element>
Element & maxpyin ( Element & r,
const Element & a,
const Element & x ) const
inline

◆ type_string()

template<class _Element>
static const std::string type_string ( )
inlinestatic

◆ random()

template<class _Element>
template<class Random>
Element & random ( const Random & g,
Element & r ) const
inline

◆ nonzerorandom()

template<class _Element>
template<class Random>
Element & nonzerorandom ( const Random & g,
Element & a ) const
inline

◆ read() [1/2]

template<typename _Element>
std::istream & read ( std::istream & s)
inline

◆ write() [1/4]

template<class _Element>
std::ostream & write ( std::ostream & s) const

◆ read() [2/2]

template<typename _Element>
std::istream & read ( std::istream & s,
Element & a ) const
inline

◆ write() [2/4]

template<typename _Element>
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

template<class _Element>
bool is_elt_integral_v = false
staticconstexpr

◆ is_elt_floating_point_v

template<class _Element>
bool is_elt_floating_point_v = true
staticconstexpr

◆ zero

template<class _Element>
const Element zero = 0.0

◆ one

template<class _Element>
const Element one = 1.0

◆ mOne

template<class _Element>
const Element mOne = -1.0

◆ _p

template<class _Element>
Element _p = 0
protected

◆ _invp

template<class _Element>
Element _invp = 0
protected

◆ _negp

template<class _Element>
Element _negp = 0
protected

◆ _lp

template<class _Element>
Residu_t _lp = 0
protected

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