algebramix_doc 0.3
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(), and mmx::value().

                                           {
    // construct probable prime moduli of s bits exactly.
    typedef modulus<C,V> M;
    const nat b= V::template maximum_size_helper<C>::value;
    ASSERT (s <= b, "bitsize overflow");
    if (s < 2 && n > 0) return false;
    integer a (N(v) == 0 ? (integer (1) << (s-1)) : integer (* v[N(v)-1]));
    integer p= probable_next_prime (a);
    if (bit_size (p) > b) return false;
    v << M(as <C> (p));
    return true; }

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