Givaro 4.2.1
IntSqrtModDom< MyRandIter > Class Template Referenceabstract

Modular square roots. More...

#include <givintsqrootmod.h>

+ Inheritance diagram for IntSqrtModDom< MyRandIter >:

Public Types

typedef IntFactorDom< MyRandIter > Father_t
 
typedef IntFactorDom< MyRandIter >::Rep Rep
 
typedef GivRandom random_generator
 
using Self_t
 
using Parent_t
 
typedef Rep Element
 
typedef RandomIntegerIterator< false, false > RandIter
 
typedef GeneralRingNonZeroRandIter< Self_t > NonZeroRandIter
 
using Residu_t
 
using Residu_t
 
using Element_ptr
 
using Element_ptr
 
using ConstElement_ptr
 
using ConstElement_ptr
 
enum  
 
typedef const Element ConstElement
 

Public Member Functions

 IntSqrtModDom (MyRandIter g=MyRandIter())
 
Repsqrootmod (Rep &x, const Rep &a, const Rep &n) const
 
void Brillhart (Rep &, Rep &, const Rep &) const
 
void sumofsquaresmodprime (Rep &, Rep &, const Rep &, const Rep &) const
 
void sumofsquaresmodprimeDeterministic (Rep &, Rep &, const Rep &, const Rep &) const
 
void sumofsquaresmodprimeMonteCarlo (Rep &, Rep &, const Rep &, const Rep &) const
 
void sumofsquaresmodprimeNoERH (Rep &, Rep &, const Rep &, const Rep &) const
 
void sumofsquaresmodprimewithnonresidue (Rep &, Rep &, const Rep &, const Rep &, const Rep &) const
 
Repsqrootmodprime (Rep &x, const Rep &a, const Rep &p) const
 
Repsqrootmodprimepower (Rep &x, const Rep &a, const Rep &p, const uint64_t k, const Rep &pk) const
 
Repsqrootmodpoweroftwo (Rep &x, const Rep &a, const uint64_t k, const Rep &pk) const
 
Repfactor (Rep &r, const Rep &n, unsigned long loops=0) const
 
Repiffactorprime (Rep &r, const Rep &n, unsigned long loops=0) const
 
Repprimefactor (Rep &r, const Rep &n) const
 
bool set (Container1 &setint, Container2 &setpwd, const Rep &a, unsigned long loops=0) const
 Factors with primes.
 
void set (Container &, const Rep &) const
 
void Erathostene (Container &, const Rep &) const
 
RepErathostene (Rep &, const Rep &p) const
 returns a small factor
 
Container & divisors (Container &L, const Cont2 &Lf, const Cont3 &Le) const
 
Container & divisors (Container &, const Rep &) const
 
RepPollard (const GivRandom &, Rep &, const Rep &n, unsigned long threshold=0) const
 
RepLenstra (const GivRandom &, Rep &, const Rep &n, const Rep &B1=10000000, const unsigned long curves=30) const
 
std::ostream & write (std::ostream &o, const Rep &n) const
 
std::ostream & write (std::ostream &o, Array &, const Rep &n) const
 
std::ostream & write (std::ostream &o) const
 
int isprime (const Rep &n, int r=_GIVARO_ISPRIMETESTS_) const
 
unsigned int isprimepower (Rep &, const Rep &) const
 
unsigned int Miller (GivRandom &g, const Rep &n=_GIVARO_ISPRIMETESTS_) const
 
Reptest_Lehmann (GivRandom &g, Rep &, const Rep &n=_GIVARO_ISPRIMETESTS_) const
 
int Lehmann (GivRandom &g, const Rep &n=_GIVARO_ISPRIMETESTS_) const
 
int isprime_Tabule (const int n) const
 
int isprime_Tabule2 (const int n) const
 
Repnextprime (Rep &, const Rep &, int r=_GIVARO_ISPRIMETESTS_) const
 
Repprevprime (Rep &, const Rep &, int r=_GIVARO_ISPRIMETESTS_) const
 
Repnextprimein (Rep &, int r=_GIVARO_ISPRIMETESTS_) const
 
Repprevprimein (Rep &, int r=_GIVARO_ISPRIMETESTS_) const
 
int local_prime (const Rep &n, int r=_GIVARO_ISPRIMETESTS_) const
 
int operator== (const Self_t &) const
 
bool operator== (const Self_t &F) const
 
int operator!= (const Self_t &) const
 
bool operator!= (const Self_t &F) const
 
XXX & convert (XXX &x, const Rep &a) const
 
T & convert (T &x, const Element &y) const
 
Repmul (Rep &r, const Rep &a, const Rep &b) const
 
Repmulin (Rep &r, const Rep &b) const
 
Repdiv (Rep &r, const Rep &a, const Rep &b) const
 
Repdivin (Rep &r, const Rep &b) const
 
Repmod (Rep &r, const Rep &a, const Rep &b) const
 
Repmodin (Rep &r, const Rep &b) const
 
Repadd (Rep &r, const Rep &a, const Rep &b) const
 
Repaddin (Rep &r, const Rep &b) const
 
Repsub (Rep &r, const Rep &a, const Rep &b) const
 
Repsubin (Rep &r, const Rep &b) const
 
Repdivmod (Rep &q, Rep &r, const Rep &a, const Rep &b) const
 
Repdivexact (Rep &q, const Rep &a, const Rep &b) const
 
Repaxpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
 
Repmaxpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
 
Repmaxpyin (Rep &r, const Rep &a, const Rep &b) const
 
Repaxmy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
 
Repaxpyin (Rep &r, const Rep &a, const Rep &b) const
 
Repaxmyin (Rep &r, const Rep &a, const Rep &b) const
 
Repneg (Rep &r, const Rep &a) const
 
Repnegin (Rep &r) const
 
Elementquo (Element &q, const Element &a, const Element &b) const
 
Elementrem (Element &r, const Element &a, const Element &b) const
 
Elementquoin (Element &a, const Element &b) const
 
Elementremin (Element &a, const Element &b) const
 
void quoRem (Element &q, Element &r, const Element &a, const Element &b) const
 
Elementlogtwo (Element &z, const Element &x) const
 
Repgcd (Rep &g, Rep &u, Rep &v, const Rep &a, const Rep &b) const
 
Repgcd (Rep &g, const Rep &a, const Rep &b) const
 
Repgcdin (Rep &g, const Rep &a) const
 
Replcm (Rep &l, const Rep &a, const Rep &b) const
 
Replcmin (Rep &l, const Rep &a) const
 
Elementdxgcd (Element &g, Element &s, Element &t, Element &u, Element &v, const Element &a, const Element &b) const
 
Repinv (Rep &u, const Rep &a) const
 
Repinv (Rep &u, const Rep &a, const Rep &b) const
 
Repinvin (Rep &u) const
 
Repinvin (Rep &u, const Rep &b) const
 
Repinvmod (Rep &u, const Rep &a, const Rep &b) const
 
Repinvmodin (Rep &u, const Rep &b) const
 
bool ratrecon (Rep &num, Rep &den, const Rep &f, const Rep &m, const Rep &numbound, bool forcereduce=true, bool recurs=true) const
 
bool RationalReconstruction (Rep &, Rep &, const Rep &, const Rep &) const
 
bool RationalReconstruction (Rep &, Rep &, const Rep &, const Rep &, const Rep &, bool=true, bool=true) const
 
bool RationalReconstruction (Rep &, Rep &, const Rep &, const Rep &, const Rep &, const Rep &) const
 
Reppow (Rep &r, const Rep &n, const int64_t l) const
 
Reppow (Rep &r, const Rep &n, const uint64_t l) const
 
Reppow (Rep &r, const Rep &n, const int32_t l) const
 
Reppow (Rep &r, const Rep &n, const uint32_t l) const
 
Repsqrt (Rep &s, const Rep &n) const
 
Repsqrt (Rep &s, Rep &r, const Rep &n) const
 
int64_t logp (const Rep &a, const Rep &p) const
 
Reppowmod (Rep &r, const Rep &n, const int64_t e, const Rep &m) const
 
Reppowmod (Rep &r, const Rep &n, const Rep &e, const Rep &m) const
 
uint64_t length (const Rep &a) const
 
int sign (const Rep &a) const
 
bool isZero (const Rep &a) const
 
virtual bool isZero (const Element &a) const=0
 
bool isOne (const Rep &a) const
 
virtual bool isOne (const Element &a) const=0
 
bool isMOne (const Rep &a) const
 
virtual bool isMOne (const Element &a) const=0
 
bool isUnit (const Rep &x) const
 isUnit
 
virtual bool isUnit (const Element &a) const=0
 
bool isDivisor (const Element &a, const Element &b) const
 isDivisor (a, b) Test if b | a.
 
Elementabs (Element &x, const Element &a) const
 
Element abs (const Element &a) const
 
int32_t compare (const Rep &a, const Rep &b) const
 
bool areEqual (const Rep &a, const Rep &b) const
 
bool areNEqual (const Rep &a, const Rep &b) const
 
bool areAssociates (const Element &x, const Element &y) const
 
bool isgeq (const Rep &a, const Rep &b) const
 
bool isgeq (const int64_t b, const Rep &a) const
 
bool isgeq (const Rep &a, const int64_t b) const
 
bool isleq (const Rep &a, const Rep &b) const
 
bool isleq (const int64_t b, const Rep &a) const
 
bool isleq (const Rep &a, const int64_t b) const
 
bool isgt (const Rep &a, const Rep &b) const
 
bool isgt (const int64_t b, const Rep &a) const
 
bool isgt (const Rep &a, const int64_t b) const
 
bool islt (const Rep &a, const Rep &b) const
 
bool islt (const int64_t b, const Rep &a) const
 
bool islt (const Rep &a, const int64_t b) const
 
Reprandom (GivRandom &, Rep &r, long s=1) const
 
Reprandom (GivRandom &, Rep &r, const Rep &b) const
 
Elementrandom (const Random &g, Element &r) const
 
Repnonzerorandom (GivRandom &, Rep &r, long s=1) const
 
Repnonzerorandom (GivRandom &, Rep &r, const Rep &b) const
 
Elementnonzerorandom (Random &g, Element &a) const
 
std::istream & read (std::istream &i)
 
std::istream & read (std::istream &is, Element &a) const
 
Residu_t residu () const
 
Residu_t residu () const
 
Residu_t size () const
 
Residu_t size () const
 
Residu_t cardinality () const
 
T & cardinality (T &c) const
 
Residu_t cardinality () const
 
T & cardinality (T &c) const
 
Residu_t characteristic () const
 
T & characteristic (T &c) const
 
Residu_t characteristic () const
 
T & characteristic (T &c) const
 
Elementinit (Element &x) const
 
Elementinit (Element &x, const T &s) const
 
Elementinit (Element &x) const
 
Elementinit (Element &x, const T &s) const
 
Elementassign (Element &x, const Element &y) const
 
Elementassign (Element &x, const Element &y) const
 
Elementreduce (Element &x, const Element &y) const
 
Elementreduce (Element &x) const
 
Elementreduce (Element &x, const Element &y) const
 
Elementreduce (Element &x) const
 
Element minElement () const
 
Element minElement () const
 
Element maxElement () const
 
Element maxElement () const
 
Input/Output Operations
std::ostream & write (std::ostream &os, std::string F) const
 Read field.
 
std::ostream & write (std::ostream &os, const Element &x) const
 Print field element.
 
std::istream & read (std::istream &is) const
 Read field.
 
virtual std::istream & read (std::istream &is, Element &x) const
 Read field element.
 
Arithmetic Operations

The first argument is set and is also the return value.

Elementmul (Element &x, const Element &y, const Element &z) const
 x := y*z
 
Elementdiv (Element &x, const Element &y, const Element &z) const
 x := y/z
 
Elementdiv (Element &x, const Element &y, const Element &z) const
 x := y/z
 
Elementmod (Element &x, const Element &y, const Element &z) const
 x := y mod z
 
Elementmod (Element &x, const Element &y, const Element &z) const
 x := y mod z
 
Elementadd (Element &x, const Element &y, const Element &z) const
 x := y + z
 
Elementsub (Element &x, const Element &y, const Element &z) const
 x := y - z
 
Elementaxpy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := a*x + y
 
Elementmaxpy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := y - a*x
 
Elementmaxpyin (Element &z, const Element &a, const Element &x) const
 z := z - a*x
 
Elementaxmy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := a*x - y
 
Elementaxpyin (Element &z, const Element &a, const Element &x) const
 z := a*x + z
 
Elementaxmyin (Element &z, const Element &a, const Element &x) const
 z := a*x - z
 
Elementneg (Element &x, const Element &y) const
 x := -y
 
Elementinv (Element &x, const Element &y) const
 x := 1/y
 
Elementinv (Element &x, const Element &y) const
 x := 1/y
 
Inplace Arithmetic Operations

The first argument is modified and the result is the return value.

Elementmulin (Element &x, const Element &y) const
 x := x*y
 
Elementdivin (Element &x, const Element &y) const
 x := x/y
 
Elementdivin (Element &x, const Element &y) const
 x := x/y
 
Elementmodin (Element &x, const Element &y) const
 x := x mod y
 
Elementmodin (Element &x, const Element &y) const
 x := x mod y
 
Elementaddin (Element &x, const Element &y) const
 x := x + y
 
Elementsubin (Element &x, const Element &y) const
 x := x - y
 
Elementnegin (Element &x) const
 x := -x
 
Elementinvin (Element &x) const
 x := 1/x
 
Comparison Predicates
bool areEqual (const Element &x, const Element &y) const
 x == y
 
Data Object Management.

first argument is set and the value is also returned.

Elementinit (Element &x) const
 
Elementassign (Element &x, const Element &y) const
 

Static Public Member Functions

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

Data Fields

const Element one
 
const Element one
 
const Element zero
 
const Element zero
 
const Element mOne
 
const Element mOne
 

Protected Member Functions

Repsqrootlinear (Rep &x, const Rep &a, const Rep &p, const uint64_t k) const
 
Repsqroottwolinear (Rep &x, const Rep &a, const uint64_t k) const
 
Repsqroothensellift (Rep &x, const Rep &a, const Rep &p, const uint64_t k, const Rep &pk) const
 
Repsqrootonemorelift (Rep &x, const Rep &a, const Rep &p, const uint64_t k, const Rep &pk) const
 
Repsqrootmodtwolift (Rep &x, const Rep &a, const uint64_t k, const Rep &pk) const
 

Protected Attributes

GivRandom _g
 

Detailed Description

template<class MyRandIter = GivRandom>
class Givaro::IntSqrtModDom< MyRandIter >

Modular square roots.

Examples
examples/Integer/ModularSquareRoot.C.

Member Typedef Documentation

◆ Father_t

template<class MyRandIter = GivRandom>
typedef IntFactorDom< MyRandIter > Father_t

◆ Rep

template<class MyRandIter = GivRandom>
typedef IntFactorDom<MyRandIter>::Rep Rep

◆ random_generator

typedef GivRandom random_generator
inherited

◆ Self_t

using Self_t
inherited

◆ Parent_t

using Parent_t
inherited

◆ Element

typedef Rep Element
inherited

◆ RandIter

typedef RandomIntegerIterator<false,false> RandIter
inherited

◆ NonZeroRandIter

typedef GeneralRingNonZeroRandIter<Self_t> NonZeroRandIter
inherited

◆ Residu_t [1/2]

using Residu_t
inherited

◆ Residu_t [2/2]

using Residu_t
inherited

◆ Element_ptr [1/2]

using Element_ptr
inherited

◆ Element_ptr [2/2]

using Element_ptr
inherited

◆ ConstElement_ptr [1/2]

using ConstElement_ptr
inherited

◆ ConstElement_ptr [2/2]

using ConstElement_ptr
inherited

◆ ConstElement

typedef const Element ConstElement
inherited

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Constructor & Destructor Documentation

◆ IntSqrtModDom()

template<class MyRandIter = GivRandom>
IntSqrtModDom ( MyRandIter g = MyRandIter ())
inline

Member Function Documentation

◆ sqrootmod()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqrootmod ( Rep & x,
const Rep & a,
const Rep & n ) const
inline

◆ Brillhart()

template<class MyRandIter>
void Brillhart ( Rep & a,
Rep & b,
const Rep & p ) const
inline

◆ sumofsquaresmodprime()

template<class MyRandIter>
void sumofsquaresmodprime ( Rep & a,
Rep & b,
const Rep & k,
const Rep & p ) const
inline

◆ sumofsquaresmodprimeDeterministic()

template<class MyRandIter>
void sumofsquaresmodprimeDeterministic ( Rep & a,
Rep & b,
const Rep & k,
const Rep & p ) const
inline

◆ sumofsquaresmodprimeMonteCarlo()

template<class MyRandIter>
void sumofsquaresmodprimeMonteCarlo ( Rep & a,
Rep & b,
const Rep & k,
const Rep & p ) const
inline

◆ sumofsquaresmodprimeNoERH()

template<class MyRandIter>
void sumofsquaresmodprimeNoERH ( Rep & a,
Rep & b,
const Rep & k,
const Rep & p ) const
inline

◆ sumofsquaresmodprimewithnonresidue()

template<class MyRandIter>
void sumofsquaresmodprimewithnonresidue ( Rep & a,
Rep & b,
const Rep & k,
const Rep & s,
const Rep & p ) const
inline

◆ sqrootmodprime()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqrootmodprime ( Rep & x,
const Rep & a,
const Rep & p ) const
inline

◆ sqrootmodprimepower()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqrootmodprimepower ( Rep & x,
const Rep & a,
const Rep & p,
const uint64_t k,
const Rep & pk ) const
inline

◆ sqrootmodpoweroftwo()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqrootmodpoweroftwo ( Rep & x,
const Rep & a,
const uint64_t k,
const Rep & pk ) const
inline

◆ sqrootlinear()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqrootlinear ( Rep & x,
const Rep & a,
const Rep & p,
const uint64_t k ) const
inlineprotected

◆ sqroottwolinear()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqroottwolinear ( Rep & x,
const Rep & a,
const uint64_t k ) const
inlineprotected

◆ sqroothensellift()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqroothensellift ( Rep & x,
const Rep & a,
const Rep & p,
const uint64_t k,
const Rep & pk ) const
inlineprotected

◆ sqrootonemorelift()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqrootonemorelift ( Rep & x,
const Rep & a,
const Rep & p,
const uint64_t k,
const Rep & pk ) const
inlineprotected

◆ sqrootmodtwolift()

template<class MyRandIter>
IntSqrtModDom< MyRandIter >::Rep & sqrootmodtwolift ( Rep & x,
const Rep & a,
const uint64_t k,
const Rep & pk ) const
inlineprotected

◆ factor()

Rep & factor ( Rep & r,
const Rep & n,
unsigned long loops = 0 ) const
inlineinherited

◆ iffactorprime()

Rep & iffactorprime ( Rep & r,
const Rep & n,
unsigned long loops = 0 ) const
inlineinherited

◆ primefactor()

Rep & primefactor ( Rep & r,
const Rep & n ) const
inlineinherited

◆ set() [1/2]

bool set ( Container1 & setint,
Container2 & setpwd,
const Rep & a,
unsigned long loops = 0 ) const
inherited

Factors with primes.

◆ set() [2/2]

void set ( Container & Lf,
const Rep & n ) const
inherited

◆ Erathostene() [1/2]

void Erathostene ( Container & Lf,
const Rep & p ) const
inherited

◆ Erathostene() [2/2]

Rep & Erathostene ( Rep & ,
const Rep & p ) const
inherited

returns a small factor

◆ divisors() [1/2]

Container & divisors ( Container & L,
const Cont2 & Lf,
const Cont3 & Le ) const
inherited

◆ divisors() [2/2]

Container & divisors ( Container & L,
const Rep & n ) const
inherited

◆ Pollard()

IntFactorDom< GivRandom >::Rep & Pollard ( const GivRandom & gen,
Rep & g,
const Rep & n,
unsigned long threshold = 0 ) const
inherited

◆ Lenstra()

IntFactorDom< GivRandom >::Rep & Lenstra ( const GivRandom & gen,
Rep & g,
const Rep & n,
const Rep & B1 = 10000000,
const unsigned long curves = 30 ) const
inherited

◆ write() [1/5]

std::ostream & write ( std::ostream & o,
const Rep & n ) const
inherited

◆ write() [2/5]

std::ostream & write ( std::ostream & o,
Array & Lf,
const Rep & n ) const
inherited

◆ write() [3/5]

std::ostream & write ( std::ostream & o) const
inlineinherited

◆ write() [4/5]

std::ostream & write ( std::ostream & os,
std::string F ) const
inlineinherited

Read field.

Returns
input stream from which field is read.
Parameters
isinput stream from which field is read.

◆ write() [5/5]

std::ostream & write ( std::ostream & os,
const Element & x ) const
inlineinherited

Print field element.

Returns
output stream to which field element is written.
Parameters
osoutput stream to which field element is written.
xfield element.

◆ isprime()

int isprime ( const Rep & n,
int r = _GIVARO_ISPRIMETESTS_ ) const
inlineinherited

◆ isprimepower()

unsigned int isprimepower ( Rep & q,
const Rep & u ) const
inherited

◆ Miller()

unsigned int Miller ( GivRandom & g,
const Rep & n = _GIVARO_ISPRIMETESTS_ ) const
inherited

◆ test_Lehmann()

IntPrimeDom::Rep & test_Lehmann ( GivRandom & g,
Rep & r,
const Rep & n = _GIVARO_ISPRIMETESTS_ ) const
inherited

◆ Lehmann()

int Lehmann ( GivRandom & g,
const Rep & n = _GIVARO_ISPRIMETESTS_ ) const
inherited

◆ isprime_Tabule()

int isprime_Tabule ( const int n) const
inherited

◆ isprime_Tabule2()

int isprime_Tabule2 ( const int n) const
inherited

◆ nextprime()

IntPrimeDom::Rep & nextprime ( Rep & ,
const Rep & ,
int r = _GIVARO_ISPRIMETESTS_ ) const
inherited

◆ prevprime()

IntPrimeDom::Rep & prevprime ( Rep & n,
const Rep & p,
int r = _GIVARO_ISPRIMETESTS_ ) const
inherited

◆ nextprimein()

IntPrimeDom::Rep & nextprimein ( Rep & ,
int r = _GIVARO_ISPRIMETESTS_ ) const
inherited

◆ prevprimein()

IntPrimeDom::Rep & prevprimein ( Rep & n,
int r = _GIVARO_ISPRIMETESTS_ ) const
inherited

◆ local_prime()

int local_prime ( const Rep & n,
int r = _GIVARO_ISPRIMETESTS_ ) const
inlineinherited

◆ operator==() [1/2]

int operator== ( const Self_t & ) const
inlineinherited

◆ operator==() [2/2]

bool operator== ( const Self_t & F) const
inlineinherited

◆ operator!=() [1/2]

int operator!= ( const Self_t & ) const
inlineinherited

◆ operator!=() [2/2]

bool operator!= ( const Self_t & F) const
inlineinherited

◆ convert() [1/2]

XXX & convert ( XXX & x,
const Rep & a ) const
inlineinherited

◆ convert() [2/2]

T & convert ( T & x,
const Element & y ) const
inlineinherited

◆ mul() [1/2]

Rep & mul ( Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ mul() [2/2]

Element & mul ( Element & x,
const Element & y,
const Element & z ) const
inlineinherited

x := y*z

◆ mulin() [1/2]

Rep & mulin ( Rep & r,
const Rep & b ) const
inlineinherited

◆ mulin() [2/2]

Element & mulin ( Element & x,
const Element & y ) const
inlineinherited

x := x*y

◆ div() [1/3]

Rep & div ( Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ div() [2/3]

Element & div ( Element & x,
const Element & y,
const Element & z ) const
inlineinherited

x := y/z

◆ div() [3/3]

template<class _Element>
Element & div ( Element & x,
const Element & y,
const Element & z ) const
inlineinherited

x := y/z

◆ divin() [1/3]

Rep & divin ( Rep & r,
const Rep & b ) const
inlineinherited

◆ divin() [2/3]

Element & divin ( Element & x,
const Element & y ) const
inlineinherited

x := x/y

◆ divin() [3/3]

template<class _Element>
Element & divin ( Element & x,
const Element & y ) const
inlineinherited

x := x/y

◆ mod() [1/3]

Rep & mod ( Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ mod() [2/3]

Element & mod ( Element & x,
const Element & y,
const Element & z ) const
inlineinherited

x := y mod z

◆ mod() [3/3]

template<class _Element>
Element & mod ( Element & x,
const Element & y,
const Element & z ) const
inlineinherited

x := y mod z

◆ modin() [1/3]

Rep & modin ( Rep & r,
const Rep & b ) const
inlineinherited

◆ modin() [2/3]

Element & modin ( Element & x,
const Element & y ) const
inlineinherited

x := x mod y

◆ modin() [3/3]

template<class _Element>
Element & modin ( Element & x,
const Element & y ) const
inlineinherited

x := x mod y

◆ add() [1/2]

Rep & add ( Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ add() [2/2]

Element & add ( Element & x,
const Element & y,
const Element & z ) const
inlineinherited

x := y + z

◆ addin() [1/2]

Rep & addin ( Rep & r,
const Rep & b ) const
inlineinherited

◆ addin() [2/2]

Element & addin ( Element & x,
const Element & y ) const
inlineinherited

x := x + y

◆ sub() [1/2]

Rep & sub ( Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ sub() [2/2]

Element & sub ( Element & x,
const Element & y,
const Element & z ) const
inlineinherited

x := y - z

◆ subin() [1/2]

Rep & subin ( Rep & r,
const Rep & b ) const
inlineinherited

◆ subin() [2/2]

Element & subin ( Element & x,
const Element & y ) const
inlineinherited

x := x - y

◆ divmod()

Rep & divmod ( Rep & q,
Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ divexact()

Rep & divexact ( Rep & q,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ axpy() [1/2]

Rep & axpy ( Rep & r,
const Rep & a,
const Rep & b,
const Rep & c ) const
inlineinherited

◆ axpy() [2/2]

Element & axpy ( Element & z,
const Element & a,
const Element & x,
const Element & y ) const
inlineinherited

z := a*x + y

◆ maxpy() [1/2]

Rep & maxpy ( Rep & r,
const Rep & a,
const Rep & b,
const Rep & c ) const
inlineinherited

◆ maxpy() [2/2]

Element & maxpy ( Element & z,
const Element & a,
const Element & x,
const Element & y ) const
inlineinherited

z := y - a*x

◆ maxpyin() [1/2]

Rep & maxpyin ( Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ maxpyin() [2/2]

Element & maxpyin ( Element & z,
const Element & a,
const Element & x ) const
inlineinherited

z := z - a*x

◆ axmy() [1/2]

Rep & axmy ( Rep & r,
const Rep & a,
const Rep & b,
const Rep & c ) const
inlineinherited

◆ axmy() [2/2]

Element & axmy ( Element & z,
const Element & a,
const Element & x,
const Element & y ) const
inlineinherited

z := a*x - y

◆ axpyin() [1/2]

Rep & axpyin ( Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ axpyin() [2/2]

Element & axpyin ( Element & z,
const Element & a,
const Element & x ) const
inlineinherited

z := a*x + z

◆ axmyin() [1/2]

Rep & axmyin ( Rep & r,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ axmyin() [2/2]

Element & axmyin ( Element & z,
const Element & a,
const Element & x ) const
inlineinherited

z := a*x - z

◆ neg() [1/2]

Rep & neg ( Rep & r,
const Rep & a ) const
inlineinherited

◆ neg() [2/2]

Element & neg ( Element & x,
const Element & y ) const
inlineinherited

x := -y

◆ negin() [1/2]

Rep & negin ( Rep & r) const
inlineinherited

◆ negin() [2/2]

Element & negin ( Element & x) const
inlineinherited

x := -x

◆ quo()

Element & quo ( Element & q,
const Element & a,
const Element & b ) const
inlineinherited

◆ rem()

Element & rem ( Element & r,
const Element & a,
const Element & b ) const
inlineinherited

◆ quoin()

Element & quoin ( Element & a,
const Element & b ) const
inlineinherited

◆ remin()

Element & remin ( Element & a,
const Element & b ) const
inlineinherited

◆ quoRem()

void quoRem ( Element & q,
Element & r,
const Element & a,
const Element & b ) const
inlineinherited

◆ logtwo()

Element & logtwo ( Element & z,
const Element & x ) const
inlineinherited

◆ gcd() [1/2]

Rep & gcd ( Rep & g,
Rep & u,
Rep & v,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ gcd() [2/2]

Rep & gcd ( Rep & g,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ gcdin()

Rep & gcdin ( Rep & g,
const Rep & a ) const
inlineinherited

◆ lcm()

Rep & lcm ( Rep & l,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ lcmin()

Rep & lcmin ( Rep & l,
const Rep & a ) const
inlineinherited

◆ dxgcd()

Element & dxgcd ( Element & g,
Element & s,
Element & t,
Element & u,
Element & v,
const Element & a,
const Element & b ) const
inlineinherited

◆ inv() [1/4]

Rep & inv ( Rep & u,
const Rep & a ) const
inlineinherited

◆ inv() [2/4]

Rep & inv ( Rep & u,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ inv() [3/4]

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

x := 1/y

◆ inv() [4/4]

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

x := 1/y

◆ invin() [1/3]

Rep & invin ( Rep & u) const
inlineinherited

◆ invin() [2/3]

Rep & invin ( Rep & u,
const Rep & b ) const
inlineinherited

◆ invin() [3/3]

Element & invin ( Element & x) const
inlineinherited

x := 1/x

◆ invmod()

Rep & invmod ( Rep & u,
const Rep & a,
const Rep & b ) const
inlineinherited

◆ invmodin()

Rep & invmodin ( Rep & u,
const Rep & b ) const
inlineinherited

◆ ratrecon()

bool ratrecon ( Rep & num,
Rep & den,
const Rep & f,
const Rep & m,
const Rep & numbound,
bool forcereduce = true,
bool recurs = true ) const
inherited

◆ RationalReconstruction() [1/3]

bool RationalReconstruction ( Rep & ,
Rep & ,
const Rep & ,
const Rep &  ) const
inherited

◆ RationalReconstruction() [2/3]

bool RationalReconstruction ( Rep & ,
Rep & ,
const Rep & ,
const Rep & ,
const Rep & ,
bool = true,
bool = true ) const
inherited

◆ RationalReconstruction() [3/3]

bool RationalReconstruction ( Rep & ,
Rep & ,
const Rep & ,
const Rep & ,
const Rep & ,
const Rep &  ) const
inherited

◆ pow() [1/4]

Rep & pow ( Rep & r,
const Rep & n,
const int64_t l ) const
inlineinherited

◆ pow() [2/4]

Rep & pow ( Rep & r,
const Rep & n,
const uint64_t l ) const
inlineinherited

◆ pow() [3/4]

Rep & pow ( Rep & r,
const Rep & n,
const int32_t l ) const
inlineinherited

◆ pow() [4/4]

Rep & pow ( Rep & r,
const Rep & n,
const uint32_t l ) const
inlineinherited

◆ sqrt() [1/2]

Rep & sqrt ( Rep & s,
const Rep & n ) const
inlineinherited

◆ sqrt() [2/2]

Rep & sqrt ( Rep & s,
Rep & r,
const Rep & n ) const
inlineinherited

◆ logp()

int64_t logp ( const Rep & a,
const Rep & p ) const
inlineinherited

◆ powmod() [1/2]

Rep & powmod ( Rep & r,
const Rep & n,
const int64_t e,
const Rep & m ) const
inlineinherited

◆ powmod() [2/2]

Rep & powmod ( Rep & r,
const Rep & n,
const Rep & e,
const Rep & m ) const
inlineinherited

◆ length()

uint64_t length ( const Rep & a) const
inlineinherited

◆ sign()

int sign ( const Rep & a) const
inlineinherited

◆ isZero() [1/2]

bool isZero ( const Rep & a) const
inlineinherited

◆ isZero() [2/2]

virtual bool isZero ( const Element & a) const
pure virtualinherited

◆ isOne() [1/2]

bool isOne ( const Rep & a) const
inlineinherited

◆ isOne() [2/2]

virtual bool isOne ( const Element & a) const
pure virtualinherited

◆ isMOne() [1/2]

bool isMOne ( const Rep & a) const
inlineinherited

◆ isMOne() [2/2]

virtual bool isMOne ( const Element & a) const
pure virtualinherited

◆ isUnit() [1/2]

bool isUnit ( const Rep & x) const
inlineinherited

isUnit

◆ isUnit() [2/2]

virtual bool isUnit ( const Element & a) const
pure virtualinherited

◆ isDivisor()

bool isDivisor ( const Element & a,
const Element & b ) const
inlineinherited

isDivisor (a, b) Test if b | a.

◆ abs() [1/2]

Element & abs ( Element & x,
const Element & a ) const
inlineinherited

◆ abs() [2/2]

Element abs ( const Element & a) const
inlineinherited

◆ compare()

int32_t compare ( const Rep & a,
const Rep & b ) const
inlineinherited

◆ areEqual() [1/2]

bool areEqual ( const Rep & a,
const Rep & b ) const
inlineinherited

◆ areEqual() [2/2]

bool areEqual ( const Element & x,
const Element & y ) const
inlineinherited

x == y

◆ areNEqual()

bool areNEqual ( const Rep & a,
const Rep & b ) const
inlineinherited

◆ areAssociates()

bool areAssociates ( const Element & x,
const Element & y ) const
inlineinherited

◆ isgeq() [1/3]

bool isgeq ( const Rep & a,
const Rep & b ) const
inlineinherited

◆ isgeq() [2/3]

bool isgeq ( const int64_t b,
const Rep & a ) const
inlineinherited

◆ isgeq() [3/3]

bool isgeq ( const Rep & a,
const int64_t b ) const
inlineinherited

◆ isleq() [1/3]

bool isleq ( const Rep & a,
const Rep & b ) const
inlineinherited

◆ isleq() [2/3]

bool isleq ( const int64_t b,
const Rep & a ) const
inlineinherited

◆ isleq() [3/3]

bool isleq ( const Rep & a,
const int64_t b ) const
inlineinherited

◆ isgt() [1/3]

bool isgt ( const Rep & a,
const Rep & b ) const
inlineinherited

◆ isgt() [2/3]

bool isgt ( const int64_t b,
const Rep & a ) const
inlineinherited

◆ isgt() [3/3]

bool isgt ( const Rep & a,
const int64_t b ) const
inlineinherited

◆ islt() [1/3]

bool islt ( const Rep & a,
const Rep & b ) const
inlineinherited

◆ islt() [2/3]

bool islt ( const int64_t b,
const Rep & a ) const
inlineinherited

◆ islt() [3/3]

bool islt ( const Rep & a,
const int64_t b ) const
inlineinherited

◆ random() [1/3]

Rep & random ( GivRandom & ,
Rep & r,
long s = 1 ) const
inlineinherited

◆ random() [2/3]

Rep & random ( GivRandom & ,
Rep & r,
const Rep & b ) const
inlineinherited

◆ random() [3/3]

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

◆ nonzerorandom() [1/3]

Rep & nonzerorandom ( GivRandom & ,
Rep & r,
long s = 1 ) const
inlineinherited

◆ nonzerorandom() [2/3]

Rep & nonzerorandom ( GivRandom & ,
Rep & r,
const Rep & b ) const
inlineinherited

◆ nonzerorandom() [3/3]

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

◆ read() [1/4]

std::istream & read ( std::istream & i)
inlineinherited

◆ read() [2/4]

std::istream & read ( std::istream & is,
Element & a ) const
inlineinherited

◆ read() [3/4]

std::istream & read ( std::istream & is) const
inlineinherited

Read field.

Returns
input stream from which field is read.
Parameters
isinput stream from which field is read.

◆ read() [4/4]

virtual std::istream & read ( std::istream & is,
Element & x ) const
inlinevirtualinherited

Read field element.

Returns
input stream from which field element is read.
Parameters
isinput stream from which field element is read.
xfield element.

◆ residu() [1/2]

Residu_t residu ( ) const
inlineinherited

◆ residu() [2/2]

Residu_t residu ( ) const
inlineinherited

◆ size() [1/2]

Residu_t size ( ) const
inlineinherited

◆ size() [2/2]

Residu_t size ( ) const
inlineinherited

◆ cardinality() [1/4]

Residu_t cardinality ( ) const
inlineinherited

◆ cardinality() [2/4]

T & cardinality ( T & c) const
inlineinherited

◆ cardinality() [3/4]

Residu_t cardinality ( ) const
inlineinherited

◆ cardinality() [4/4]

T & cardinality ( T & c) const
inlineinherited

◆ characteristic() [1/4]

Residu_t characteristic ( ) const
inlineinherited

◆ characteristic() [2/4]

T & characteristic ( T & c) const
inlineinherited

◆ characteristic() [3/4]

Residu_t characteristic ( ) const
inlineinherited

◆ characteristic() [4/4]

T & characteristic ( T & c) const
inlineinherited

◆ maxCardinality() [1/2]

static Residu_t maxCardinality ( )
inlinestaticinherited

◆ maxCardinality() [2/2]

static Residu_t maxCardinality ( )
inlinestaticinherited

◆ minCardinality() [1/2]

static Residu_t minCardinality ( )
inlinestaticinherited

◆ minCardinality() [2/2]

static Residu_t minCardinality ( )
inlinestaticinherited

◆ init() [1/5]

Element & init ( Element & x) const
inlineinherited

◆ init() [2/5]

Element & init ( Element & x,
const T & s ) const
inlineinherited

◆ init() [3/5]

Element & init ( Element & x) const
inlineinherited

◆ init() [4/5]

Element & init ( Element & x,
const T & s ) const
inlineinherited

◆ init() [5/5]

Element & init ( Element & x) const
inlineinherited

◆ assign() [1/3]

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

◆ assign() [2/3]

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

◆ assign() [3/3]

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

◆ reduce() [1/4]

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

◆ reduce() [2/4]

Element & reduce ( Element & x) const
inlineinherited

◆ reduce() [3/4]

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

◆ reduce() [4/4]

Element & reduce ( Element & x) const
inlineinherited

◆ minElement() [1/2]

Element minElement ( ) const
inlineinherited

◆ minElement() [2/2]

Element minElement ( ) const
inlineinherited

◆ maxElement() [1/2]

Element maxElement ( ) const
inlineinherited

◆ maxElement() [2/2]

Element maxElement ( ) const
inlineinherited

◆ type_string() [1/2]

static const std::string type_string ( )
inlinestaticinherited

◆ type_string() [2/2]

static const std::string type_string ( )
inlinestaticinherited

Field Documentation

◆ _g

GivRandom _g
protectedinherited

◆ one [1/2]

const Element one
inherited

◆ one [2/2]

const Element one
inherited

◆ zero [1/2]

const Element zero
inherited

◆ zero [2/2]

const Element zero
inherited

◆ mOne [1/2]

const Element mOne
inherited

◆ mOne [2/2]

const Element mOne
inherited

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