Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s > Class Template Reference

Instatiations of linear_feedback_shift model a . More...

#include <linear_feedback_shift.hpp>

Public Types

typedef UIntType result_type
 

Public Member Functions

 BOOST_STATIC_CONSTANT (bool, has_fixed_range=false)
 
 BOOST_STATIC_CONSTANT (int, word_size=w)
 
 BOOST_STATIC_CONSTANT (int, exponent1=k)
 
 BOOST_STATIC_CONSTANT (int, exponent2=q)
 
 BOOST_STATIC_CONSTANT (int, step_size=s)
 
 BOOST_STATIC_CONSTANT (UIntType, default_seed=341)
 
 BOOST_STATIC_ASSERT (w > 0)
 
 BOOST_STATIC_ASSERT (q > 0)
 
 BOOST_STATIC_ASSERT (k< w)
 
 BOOST_STATIC_ASSERT (0< 2 *q &&2 *q< k)
 
 BOOST_STATIC_ASSERT (0< s &&s<=k-q)
 
 linear_feedback_shift_engine ()
 Constructs a linear_feedback_shift_engine, using the default seed. More...
 
 BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR (linear_feedback_shift_engine, UIntType, s0)
 Constructs a linear_feedback_shift_engine, seeding it with s0. More...
 
 BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR (linear_feedback_shift_engine, SeedSeq, seq)
 Constructs a linear_feedback_shift_engine, seeding it with seq. More...
 
template<class It >
 linear_feedback_shift_engine (It &first, It last)
 Constructs a linear_feedback_shift_engine, seeding it with values from the range [first, last). More...
 
void seed ()
 Seeds a linear_feedback_shift_engine with the default seed. More...
 
 BOOST_RANDOM_DETAIL_ARITHMETIC_SEED (linear_feedback_shift_engine, UIntType, s0)
 Seeds a linear_feedback_shift_engine with s0. More...
 
 BOOST_RANDOM_DETAIL_SEED_SEQ_SEED (linear_feedback_shift_engine, SeedSeq, seq)
 Seeds a linear_feedback_shift_engine with values produced by seq.generate(). More...
 
template<class It >
void seed (It &first, It last)
 Seeds a linear_feedback_shift_engine with values from the range [first, last). More...
 
result_type operator() ()
 Returns the next value of the generator. More...
 
template<class Iter >
void generate (Iter first, Iter last)
 Fills a range with random values. More...
 
void discard (boost::uintmax_t z)
 Advances the state of the generator by z. More...
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, linear_feedback_shift_engine, x)
 Writes the textual representation of the generator to a std::ostream. More...
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, linear_feedback_shift_engine, x)
 Reads the textual representation of the generator from a std::istream. More...
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (linear_feedback_shift_engine, x, y)
 Returns true if the two generators will produce identical sequences of outputs. More...
 

Static Public Member Functions

static result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
 Returns the smallest value that the generator can produce. More...
 
static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
 Returns the largest value that the generator can produce. More...
 

Detailed Description

template<class UIntType, int w, int k, int q, int s>
class boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >

Instatiations of linear_feedback_shift model a .

It was originally proposed in

"Random numbers generated by linear recurrence modulo two.", Tausworthe, R. C.(1965), Mathematics of Computation 19, 201-209.

Member Typedef Documentation

template<class UIntType, int w, int k, int q, int s>
typedef UIntType boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::result_type

Constructor & Destructor Documentation

template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::linear_feedback_shift_engine ( )
inline
template<class UIntType, int w, int k, int q, int s>
template<class It >
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::linear_feedback_shift_engine ( It &  first,
It  last 
)
inline

Constructs a linear_feedback_shift_engine, seeding it with values from the range [first, last).

References boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::seed().

Member Function Documentation

template<class UIntType, int w, int k, int q, int s>
static result_type min boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_PREVENT_MACRO_SUBSTITUTION ( )
inlinestatic

Returns the smallest value that the generator can produce.

template<class UIntType, int w, int k, int q, int s>
static result_type max boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_PREVENT_MACRO_SUBSTITUTION ( )
inlinestatic

Returns the largest value that the generator can produce.

template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR ( linear_feedback_shift_engine< UIntType, w, k, q, s >  ,
UIntType  ,
s0   
)
inline
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_RANDOM_DETAIL_ARITHMETIC_SEED ( linear_feedback_shift_engine< UIntType, w, k, q, s >  ,
UIntType  ,
s0   
)
inline

Seeds a linear_feedback_shift_engine with s0.

References boost::xpressive::s0.

template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR ( linear_feedback_shift_engine< UIntType, w, k, q, s >  ,
,
 
)
inline

Returns true if the two generators will produce identical sequences of outputs.

References boost::flyweights::x, and boost::polygon::y().

template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR ( is  ,
linear_feedback_shift_engine< UIntType, w, k, q, s >  ,
 
)
inline

Reads the textual representation of the generator from a std::istream.

References boost::flyweights::x.

template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR ( os  ,
linear_feedback_shift_engine< UIntType, w, k, q, s >  ,
 
)
inline

Writes the textual representation of the generator to a std::ostream.

References boost::flyweights::x.

template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR ( linear_feedback_shift_engine< UIntType, w, k, q, s >  ,
SeedSeq  ,
seq   
)
inline
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_RANDOM_DETAIL_SEED_SEQ_SEED ( linear_feedback_shift_engine< UIntType, w, k, q, s >  ,
SeedSeq  ,
seq   
)
inline
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_ASSERT ( ,
 
)
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_ASSERT ( ,
 
)
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_ASSERT ( )
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_ASSERT ( )
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_ASSERT ( )
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_CONSTANT ( bool  ,
has_fixed_range  = false 
)
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_CONSTANT ( int  ,
word_size  = w 
)
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_CONSTANT ( int  ,
exponent1  = k 
)
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_CONSTANT ( int  ,
exponent2  = q 
)
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_CONSTANT ( int  ,
step_size  = s 
)
template<class UIntType, int w, int k, int q, int s>
boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::BOOST_STATIC_CONSTANT ( UIntType  ,
default_seed  = 341 
)
template<class UIntType, int w, int k, int q, int s>
void boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::discard ( boost::uintmax_t  z)
inline

Advances the state of the generator by z.

template<class UIntType, int w, int k, int q, int s>
template<class Iter >
void boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::generate ( Iter  first,
Iter  last 
)
inline

Fills a range with random values.

template<class UIntType, int w, int k, int q, int s>
result_type boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::operator() ( )
inline

Returns the next value of the generator.

References boost::asio::b, and boost::asio::s.

template<class UIntType, int w, int k, int q, int s>
template<class It >
void boost::random::linear_feedback_shift_engine< UIntType, w, k, q, s >::seed ( It &  first,
It  last 
)
inline

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