random< T, POOL_SIZE > Class Template Reference

#include <_random.h>

List of all members.

Public Types

typedef T value_type
typedef int seed_type

Public Member Functions

 random ()
void seed (const seed_type &x)
void set_range (const value_type &floor, const value_type &ceil)
void set_range (const value_type &ceil)
void add_entropy (value_type entropy)
void add_entropy (const char *entropy)
value_type operator() (void)

Private Attributes

value_type entropy_pool [POOL_SIZE]
int pool_index
value_type mod
value_type offset


Detailed Description

template<class T, int POOL_SIZE = 256>
class random< T, POOL_SIZE >

======================================================================== Extended Template and Library Random Number Generator Class Implementation
Id
_random.h 334 2007-03-16 00:37:48Z dooglus

Copyright (c) 2002 Robert B. Quattlebaum Jr.

This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

=== N O T E S ===========================================================

This is an internal header file, included by other ETL headers. You should not attempt to use it directly.

=========================================================================

Definition at line 82 of file _random.h.


Member Typedef Documentation

template<class T, int POOL_SIZE = 256>
typedef T random< T, POOL_SIZE >::value_type

Definition at line 85 of file _random.h.

template<class T, int POOL_SIZE = 256>
typedef int random< T, POOL_SIZE >::seed_type

Definition at line 86 of file _random.h.


Constructor & Destructor Documentation

template<class T, int POOL_SIZE = 256>
random< T, POOL_SIZE >::random (  )  [inline]

Definition at line 95 of file _random.h.

References random< T, POOL_SIZE >::mod, random< T, POOL_SIZE >::offset, and random< T, POOL_SIZE >::seed().


Member Function Documentation

template<class T, int POOL_SIZE = 256>
void random< T, POOL_SIZE >::seed ( const seed_type x  )  [inline]

Definition at line 101 of file _random.h.

References random< T, POOL_SIZE >::pool_index.

Referenced by random< T, POOL_SIZE >::random().

template<class T, int POOL_SIZE = 256>
void random< T, POOL_SIZE >::set_range ( const value_type floor,
const value_type ceil 
) [inline]

Definition at line 104 of file _random.h.

References random< T, POOL_SIZE >::mod, and random< T, POOL_SIZE >::offset.

template<class T, int POOL_SIZE = 256>
void random< T, POOL_SIZE >::set_range ( const value_type ceil  )  [inline]

Definition at line 107 of file _random.h.

References random< T, POOL_SIZE >::mod.

template<class T, int POOL_SIZE = 256>
void random< T, POOL_SIZE >::add_entropy ( value_type  entropy  )  [inline]

Definition at line 110 of file _random.h.

References random< T, POOL_SIZE >::entropy_pool.

template<class T, int POOL_SIZE = 256>
void random< T, POOL_SIZE >::add_entropy ( const char *  entropy  )  [inline]

Definition at line 117 of file _random.h.

template<class T, int POOL_SIZE = 256>
value_type random< T, POOL_SIZE >::operator() ( void   )  [inline]

Definition at line 121 of file _random.h.

References random< T, POOL_SIZE >::entropy_pool, random< T, POOL_SIZE >::mod, random< T, POOL_SIZE >::offset, and random< T, POOL_SIZE >::pool_index.


Member Data Documentation

template<class T, int POOL_SIZE = 256>
value_type random< T, POOL_SIZE >::entropy_pool[POOL_SIZE] [private]

Definition at line 89 of file _random.h.

Referenced by random< T, POOL_SIZE >::add_entropy(), and random< T, POOL_SIZE >::operator()().

template<class T, int POOL_SIZE = 256>
int random< T, POOL_SIZE >::pool_index [private]

Definition at line 90 of file _random.h.

Referenced by random< T, POOL_SIZE >::operator()(), and random< T, POOL_SIZE >::seed().

template<class T, int POOL_SIZE = 256>
value_type random< T, POOL_SIZE >::mod [private]

Definition at line 92 of file _random.h.

Referenced by random< T, POOL_SIZE >::operator()(), random< T, POOL_SIZE >::random(), and random< T, POOL_SIZE >::set_range().

template<class T, int POOL_SIZE = 256>
value_type random< T, POOL_SIZE >::offset [private]

Definition at line 92 of file _random.h.

Referenced by random< T, POOL_SIZE >::operator()(), random< T, POOL_SIZE >::random(), and random< T, POOL_SIZE >::set_range().


The documentation for this class was generated from the following file:
Generated on Sat Oct 27 11:30:18 2007 for ETL by  doxygen 1.5.3-20071008