3#ifndef _aring_ffpack_hpp_
4#define _aring_ffpack_hpp_
47#pragma GCC diagnostic push
48#pragma GCC diagnostic ignored "-Wconversion"
49#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
50#define bool_constant givaro_bool_constant
51#include <fflas-ffpack/ffpack/ffpack.h>
53#pragma GCC diagnostic pop
83 typedef std::make_signed<UTT>::type
STT;
111 return static_cast<unsigned int>(a);
126 bool p_parens =
false)
const;
133 bool is_unit(
const ElementType f)
const;
134 bool is_zero(
const ElementType f)
const;
143 long result =
static_cast<long>(f);
170 bool is_equal(
const ElementType f,
const ElementType g)
const;
171 int compare_elems(
const ElementType f,
const ElementType g)
const;
185 void copy(ElementType &
result,
const ElementType a)
const;
212 void negate(ElementType &
result,
const ElementType a)
const;
214 void invert(ElementType &
result,
const ElementType a)
const;
218 void add(ElementType &
result,
const ElementType a,
const ElementType b)
const;
222 const ElementType b)
const;
226 const ElementType b)
const;
230 const ElementType b)
const;
235 const ElementType b)
const;
237 void power(ElementType &
result,
const ElementType a,
const STT n)
const;
243 void syzygy(
const ElementType a,
246 ElementType &y)
const;
251 void swap(ElementType &a, ElementType &b)
const;
274 if (std::is_same<Givaro::Modular<double>,
FieldType>::value)
276 return FieldType::getMaxModulus() / 2;
278 return FieldType::getMaxModulus();
Shared base of the aring framework (namespace M2) that unifies the engine's coefficient rings.
Append-only GC-backed byte buffer used throughout the engine for text output.
bool set_from_mpq(ElementType &result, mpq_srcptr a) const
std::vector< elem > ElementContainerType
void divide(ElementType &result, const ElementType a, const ElementType b) const
test doc
void subtract_multiple(ElementType &result, const ElementType a, const ElementType b) const
void add(ElementType &result, const ElementType a, const ElementType b) const
void invert(ElementType &result, const ElementType a) const
void set_var(ElementType &result, int v) const
void set_from_mpz(ElementType &result, mpz_srcptr a) const
void power(ElementType &result, const ElementType a, const STT n) const
void set_from_long(ElementType &result, long a) const
long coerceToLongInteger(const elem &f) const
ElementType computeGenerator() const
void init_set(ElementType &result, ElementType a) const
bool lift(const Ring *Rg, const ElementType f, ring_elem &result) const
void elem_text_out(buffer &o, const ElementType a, bool p_one=true, bool p_plus=false, bool p_parens=false) const
FieldType::RandIter mFfpackRandomIterator
void subtract(ElementType &result, const ElementType a, const ElementType b) const
const FieldType mFfpackField
std::make_signed< UTT >::type STT
int compare_elems(const ElementType f, const ElementType g) const
static void clear(ElementType &result)
bool is_equal(const ElementType f, const ElementType g) const
void eval(const RingMap *map, const ElementType f, int first_var, ring_elem &result) const
void power_mpz(ElementType &result, const ElementType a, mpz_srcptr n) const
void random(ElementType &result) const
ElementType from_ring_elem_const(const ring_elem &a) const
const FieldType field() const
void init(ElementType &result) const
Givaro::Modular< double > FieldType
void set_zero(ElementType &result) const
const ElementType & getGenerator() const
static const RingID ringID
bool is_unit(const ElementType f) const
void negate(ElementType &result, const ElementType a) const
UTT mDimension
same as extensionDegree
unsigned int computeHashValue(const elem &a) const
ARingZZpFFPACK(UTT charac)
void syzygy(const ElementType a, const ElementType b, ElementType &x, ElementType &y) const
returns x,y s.y. x*a + y*b == 0. if possible, x is set to 1. no need to consider the case a==0 or b==...
void mult(ElementType &result, const ElementType a, const ElementType b) const
void text_out(buffer &o) const
void copy(ElementType &result, const ElementType a) const
static double getMaxModulus()
void unsafeInvert(ElementType &result, const ElementType a) const
FieldType::Element ElementType
void to_ring_elem(ring_elem &result, const ElementType &a) const
bool set_from_BigReal(ElementType &result, gmp_RR a) const
void set(ElementType &result, ElementType a) const
UTT characteristic() const
void from_ring_elem(ElementType &result, const ring_elem &a) const
bool promote(const Ring *Rf, const ring_elem f, ElementType &result) const
bool is_zero(const ElementType f) const
A base class for simple ARings.
Engine-side ring homomorphism: stores, for each source-ring variable, the target-ring element it maps...
VALGRIND_MAKE_MEM_DEFINED & result(result)
ring_elem — the universal value type carried by every Ring* in the engine.