Macaulay2 Engine
Loading...
Searching...
No Matches

◆ getElement< M2::ARingGFFlint >()

template<>
void getElement< M2::ARingGFFlint > ( const M2::ARingGFFlint & R,
int index,
M2::ARingGFGivaro::ElementType & result )

Definition at line 78 of file ARingGFTest.cpp.

81{
83 R.init(gen);
84 R.getGenerator(gen);
85 if (index >= nelements)
86 R.power(result, gen, rawRandomInt(static_cast<int32_t>(R.cardinality())));
87 else
88 R.power(result, gen, randomVals[index]);
89 R.clear(gen);
90}
static const int nelements
static int randomVals[nelements]
void getGenerator(ElementType &result_gen) const
fq_zech_struct ElementType
void init(ElementType &result) const
void clear(ElementType &result) const
void power(ElementType &result, const ElementType &a, int n) const
VALGRIND_MAKE_MEM_DEFINED & result(result)
int32_t rawRandomInt(int32_t max)
Definition random.cpp:44

References M2::ARingGFFlint::clear(), M2::ARingGFFlint::getGenerator(), M2::ARingGFFlint::init(), nelements, M2::ARingGFFlint::power(), randomVals, rawRandomInt(), and result().