#include <alias.h>
Public Methods | |
| int | size () const |
| Give the size of aliasing array. More... | |
| double | threshold (const int i) const |
| Give the threshold corresponding to the ith aliasing array index. More... | |
| int | col (const int i) const |
| Give the column index corresponding to the ith aliasing array index. More... | |
| int | alias (const int i) const |
| Give the alias index corresponding to the ith aliasing array index. More... | |
| void | init (const int d) |
| Initialization of aliasing tables. More... | |
| void | mk_walker (const int d) |
| Construction of Walker array. More... | |
| void | transpose (const int d) |
| Transposition of Walker array. More... | |
| int | read (const string path) |
| Reading of aliasing data for simulation step. More... | |
| void | write_construct (const string file_name, const int d) |
| Writing of definitive Walker array (stored by column). More... | |
| int | walk (const double rand, const int j, const int n, const int d, const int i) |
| Walker's algorithm for discrete distributions. More... | |
Private Types | |
| typedef AliasStruct | stock |
Private Attributes | |
| vector< stock > | S |
Walker's algorithm is used to generate internal transitions in the simulation kernel.
|
|
Type stock to manipulate AliasStruct in PSI processes. |
|
|
Give the alias index corresponding to the ith aliasing array index.
|
|
|
Give the column index corresponding to the ith aliasing array index.
|
|
|
Initialization of aliasing tables.
|
|
|
Construction of Walker array. This array is built by rows and provides a representetion of the Markov chain to simulate.
|
|
|
Reading of aliasing data for simulation step.
|
|
|
Give the size of aliasing array.
|
|
|
Give the threshold corresponding to the ith aliasing array index.
|
|
|
Transposition of Walker array.
|
|
||||||||||||||||||||||||
|
Walker's algorithm for discrete distributions.
|
|
||||||||||||
|
Writing of definitive Walker array (stored by column).
|
|
|
Storage of aliasing arrays. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002