#include <crt_int.hpp>
List of all members.
Static Public Member Functions
- template<typename V > static bool covering (vector< M, V > &v, nat s)
Detailed Description
template<typename C, typename M, typename W>
struct mmx::moduli_unsigned_integer_helper< C, M, W >
Definition at line 126 of file crt_int.hpp.
Member Function Documentation
static bool covering |
( |
vector< M, V > & |
v, |
|
|
nat |
s |
|
) |
| [inline, static] |
Definition at line 129 of file crt_int.hpp.
{
static coprime_moduli_sequence<M,W> seq;
v= vector<M, V> ();
C p (1), q; nat i= 0;
while (bit_size (p) < s + 1) {
if (seq [i] == 0) return false;
v << seq [i];
q = p * C (* seq [i]);
if (quo (q, p) != C (* seq [i])) return false;
p = q;
i++;
}
return true; }
The documentation for this struct was generated from the following file:
- /Users/mourrain/Devel/mmx/algebramix/include/algebramix/crt_int.hpp