probable_prime_sequence_int< s > Struct Template Reference

#include <crt_int.hpp>

List of all members.

Static Public Member Functions


Detailed Description

template<nat s>
struct mmx::probable_prime_sequence_int< s >

Definition at line 234 of file crt_int.hpp.


Member Function Documentation

static bool extend ( vector< modulus< C, V > > &  v,
nat  n 
) [inline, static]

Definition at line 238 of file crt_int.hpp.

References M, mmx::N(), probable_next_prime(), and mmx::value().

00238                                            {
00239     // construct probable prime moduli of s bits exactly.
00240     typedef modulus<C,V> M;
00241     const nat b= V::template maximum_size_helper<C>::value;
00242     ASSERT (s <= b, "bitsize overflow");
00243     if (s < 2 && n > 0) return false;
00244     integer a (N(v) == 0 ? (integer (1) << (s-1)) : integer (* v[N(v)-1]));
00245     integer p= probable_next_prime (a);
00246     if (bit_size (p) > b) return false;
00247     v << M(as <C> (p));
00248     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