moduli_signed_integer_helper< C, M, W > Struct Template Reference

#include <crt_int.hpp>

Inheritance diagram for moduli_signed_integer_helper< C, M, W >:
moduli_helper< int, M, W > moduli_helper< long int, M, W > moduli_helper< long long int, M, W > moduli_helper< short int, M, W > moduli_helper< signed char, M, W >

List of all members.

Static Public Member Functions


Detailed Description

template<typename C, typename M, typename W>
struct mmx::moduli_signed_integer_helper< C, M, W >

Definition at line 145 of file crt_int.hpp.


Member Function Documentation

static bool covering ( vector< M, V > &  v,
nat  s 
) [inline, static]

Definition at line 148 of file crt_int.hpp.

00148                                     {
00149     static coprime_moduli_sequence<M,W> seq;
00150     v= vector<M, V> ();
00151     C p (1), q; nat i= 0;
00152     while (bit_size (p) < s + 2) { // s + 2 is needed for sign decoding!
00153       if (seq [i] == 0) return false;
00154       v << seq [i];
00155       q = p * C (* (seq [i]));
00156       if (quo (q, p) != C (* seq [i])) return false; // means overflow!
00157       p = q;
00158       i++;
00159     }
00160     return true; }


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

Generated on 6 Dec 2012 for algebramix by  doxygen 1.6.1