FflasFfpack
Public Types | Public Member Functions | Data Fields | Protected Types | Protected Attributes
RNSIntegerMod< RNS > Class Template Reference

#include <rns.h>

Public Types

typedef RNS::Element Element
 
typedef RNS::Element_ptr Element_ptr
 
typedef RNS::ConstElement_ptr ConstElement_ptr
 
typedef rnsRandIter< RNS > RandIter
 

Public Member Functions

 RNSIntegerMod (const integer &p, const RNS &myrns)
 
const rns_doublerns () const
 
const RNSInteger< RNS > & delayed () const
 
size_t size () const
 
bool isOne (const Element &x) const
 
bool isMOne (const Element &x) const
 
bool isZero (const Element &x) const
 
integer characteristic (integer &p) const
 
integer cardinality (integer &p) const
 
Elementinit (Element &x) const
 
Elementinit (Element &x, const Givaro::Integer &y) const
 
Elementreduce (Element &x, const Element &y) const
 
Elementreduce (Element &x) const
 
Elementinit (Element &x, const Element &y) const
 
Givaro::Integer convert (Givaro::Integer &x, const Element &y) const
 
Elementassign (Element &x, const Element &y) const
 
Elementadd (Element &x, const Element &y, const Element &z) const
 
Elementsub (Element &x, const Element &y, const Element &z) const
 
Elementneg (Element &x, const Element &y) const
 
Elementmul (Element &x, const Element &y, const Element &z) const
 
Elementaxpyin (Element &x, const Element &y, const Element &z) const
 
Elementinv (Element &x, const Element &y) const
 
bool areEqual (const Element &x, const Element &y) const
 
std::ostream & write (std::ostream &os, const Element &y) const
 
std::ostream & write (std::ostream &os) const
 
void reduce_modp (size_t n, Element_ptr B) const
 
std::ostream & write_matrix (std::ostream &c, double *E, int n, int m, int lda) const
 
void reduce_modp (size_t m, size_t n, Element_ptr B, size_t lda) const
 
void reduce_modp_rnsmajor (size_t n, Element_ptr B) const
 

Data Fields

Element one
 
Element mOne
 
Element zero
 

Protected Types

typedef RNS::BasisElement BasisElement
 
typedef Givaro::Modular< BasisElementModField
 
typedef Givaro::Integer integer
 

Protected Attributes

integer _p
 
std::vector< BasisElement, AlignedAllocator< BasisElement, Alignment::CACHE_LINE > > _Mi_modp_rns
 
std::vector< BasisElement, AlignedAllocator< BasisElement, Alignment::CACHE_LINE > > _iM_modp_rns
 
const RNS * _rns
 
Givaro::Modular< Givaro::Integer > _F
 
RNSInteger< RNS > _RNSdelayed
 

Member Typedef Documentation

typedef RNS::Element Element
typedef RNS::Element_ptr Element_ptr
typedef RNS::ConstElement_ptr ConstElement_ptr
typedef rnsRandIter<RNS> RandIter
typedef RNS::BasisElement BasisElement
protected
typedef Givaro::Modular<BasisElement> ModField
protected
typedef Givaro::Integer integer
protected

Constructor & Destructor Documentation

RNSIntegerMod ( const integer p,
const RNS &  myrns 
)
inline

Member Function Documentation

const rns_double& rns ( ) const
inline
const RNSInteger<RNS>& delayed ( ) const
inline
size_t size ( ) const
inline
bool isOne ( const Element x) const
inline
bool isMOne ( const Element x) const
inline
bool isZero ( const Element x) const
inline
integer characteristic ( integer p) const
inline
integer cardinality ( integer p) const
inline
Element& init ( Element x) const
inline
Element& init ( Element x,
const Givaro::Integer &  y 
) const
inline
Element& reduce ( Element x,
const Element y 
) const
inline
Element& reduce ( Element x) const
inline
Element& init ( Element x,
const Element y 
) const
inline
Givaro::Integer convert ( Givaro::Integer &  x,
const Element y 
) const
inline
Element& assign ( Element x,
const Element y 
) 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& neg ( Element x,
const Element y 
) const
inline
Element& mul ( Element x,
const Element y,
const Element z 
) const
inline
Element& axpyin ( Element x,
const Element y,
const Element z 
) const
inline
Element& inv ( Element x,
const Element y 
) const
inline
bool areEqual ( const Element x,
const Element y 
) const
inline
std::ostream& write ( std::ostream &  os,
const Element y 
) const
inline
std::ostream& write ( std::ostream &  os) const
inline
void reduce_modp ( size_t  n,
Element_ptr  B 
) const
inline
std::ostream& write_matrix ( std::ostream &  c,
double *  E,
int  n,
int  m,
int  lda 
) const
inline
void reduce_modp ( size_t  m,
size_t  n,
Element_ptr  B,
size_t  lda 
) const
inline
void reduce_modp_rnsmajor ( size_t  n,
Element_ptr  B 
) const
inline

Field Documentation

integer _p
protected
std::vector<BasisElement, AlignedAllocator<BasisElement, Alignment::CACHE_LINE> > _Mi_modp_rns
protected
std::vector<BasisElement, AlignedAllocator<BasisElement, Alignment::CACHE_LINE> > _iM_modp_rns
protected
const RNS* _rns
protected
Givaro::Modular<Givaro::Integer> _F
protected
RNSInteger<RNS> _RNSdelayed
protected
Element one
Element mOne
Element zero

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