moduli_unsigned_integer_helper< C, M, W > Struct Template Reference

#include <crt_int.hpp>

Inheritance diagram for moduli_unsigned_integer_helper< C, M, W >:
moduli_helper< unsigned char, M, W > moduli_helper< unsigned int, M, W > moduli_helper< unsigned long int, M, W > moduli_helper< unsigned long long int, M, W > moduli_helper< unsigned short int, M, W >

List of all members.

Static Public Member Functions


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.

00129                                     {
00130     static coprime_moduli_sequence<M,W> seq;
00131     v= vector<M, V> ();
00132     C p (1), q; nat i= 0;
00133     while (bit_size (p) < s + 1) {
00134       if (seq [i] == 0) return false;
00135       v << seq [i];
00136       q = p * C (* seq [i]);
00137       if (quo (q, p) != C (* seq [i])) return false; // means overflow!
00138       p = q;
00139       i++;
00140     }
00141     return true; }


The documentation for this struct was generated from the following file:

Generated on 20 Mar 2013 for algebramix by  doxygen 1.6.1