algebramix_doc 0.3
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.

                                    {
    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; // means overflow!
      p = q;
      i++;
    }
    return true; }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines