|
template<typename Int> |
static bool | LatMRG::isPrimitiveElement (const Int &a, const IntFactorization< Int > &fac, const Int &p, long e=1) |
| This file provides static functions to test for the primitivity of an integer or a polynomial in a finite field.
|
template<typename Int> |
static bool | LatMRG::isPrimitive (const NTL::Vec< Int > &aa, const Int &m, const IntFactorization< Int > &fm, const IntFactorization< Int > &fr) |
| Returns true iff the polynomial \(f\) is a primitive polynomial modulo \(m\).
|
template<typename Int> |
static bool | LatMRG::isPrimitive23 (const NTL::Vec< Int > &aa, const Int &m, const IntFactorization< Int > &fr) |
| Similar to isPrimitive above, except that this function only checks for Conditions 2 and 3.
|
template<typename Int> |
static void | LatMRG::setCharacPoly (typename FlexModInt< Int >::PolX &f, const NTL::Vec< Int > &aa) |
| Sets the coefficients of the polynomial f so it corresponds to the characteristic polynomial \(P(z) = z^k - a_1 z^{k-1} - \cdots- a_{k-1} z - a_k\) with coefficients \(c_{k-j} = a_j = \)aa[j].
|
template<typename Int> |
static void | LatMRG::setCharacPoly (typename FlexModInt< Int >::PolX &f, typename FlexModInt< Int >::IntVecP &aaP) |
| In this version, the vector of coefficients is passed directly as an IntVecP, so there is no need to convert it internally (this is more efficient).
|
template<typename Int> |
static void | LatMRG::vecMRGToPoly (typename FlexModInt< Int >::PolX &f, typename FlexModInt< Int >::IntVecP aaP, const NTL::Vec< Int > &xx) |
| Converts the vector state xx of an MRG to its polynomial representation in f.
|
template<typename Int> |
static void | LatMRG::polyToVecMRG (const NTL::Vec< Int > &xx, typename FlexModInt< Int >::IntVecP aaP, typename FlexModInt< Int >::PolX &f) |
| Converts the polynomial representation in f to the vector state xx of an MRG, with xx[j] \(x_{n-k+1+j]\).
|
template<typename Int> |
bool | LatMRG::isPrimitiveElement (const Int &a, const IntFactorization< Int > &fac, const Int &p, long e) |
| Returns in fj the polynomial \(x^j \mod f(x) (\bmod m)\) where \(f(x)\) is the polynomial with coefficients in 'C', modulo 'm'.
|
template<typename Int> |
static void | LatMRG::setCharacPoly (typename FlexModInt< Int >::PolX &f, typename FlexModInt< Int >::IntVecP aaP) |