#include <cmath>
#include <vector>
#include <algorithm>
#include <functional>
#include "genericalgs.h"
Include dependency graph for vgen.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Compounds | |
| class | ValueGen |
| class | ValueGenContainer |
Functions | |
| template<classT> T | shuffled_rand ( bool initialize, T=0.0) |
| Routine inspired by examples in "Numerical Recipes" with an extra shuffling of random numbers to avoid sequential correlations. More... | |
| double | shuffled_rand ( bool initialize=false) |
| Shortcut for typical usage of shuffled_rand. More... | |
| void | shuffled_rand_reset (long int new_seed) |
| Reset the stream of values returned by shuffled_rand. More... | |
Definition in file vgen.h.
|
|
Shortcut for typical usage of shuffled_rand.
Definition at line 103 of file vgen.h. Referenced by compute_responses(), init_weights(), normal_distribution(), shuffled_rand_reset(), and uniform_distribution(). |
|
||||||
|
Routine inspired by examples in "Numerical Recipes" with an extra shuffling of random numbers to avoid sequential correlations. Used e.g. in generating inputs to avoid potential artifacts. Returns value in open-ended range [0.0, 1.0). There is technically no reason why this routine would need to be a template, since only type double and (possibly) float are likely to be useful. (It relies on drand48, which uses only 48 bits and thus wouldn't be sufficient for a 64-bit type.) However, the Cray T3E compiler (as of PE3.2) got confused in certain obscure cases when this routine was coded as a regular function in a .c file. |
|
|
Reset the stream of values returned by shuffled_rand.
Definition at line 109 of file vgen.h. Referenced by init_weights(), and WorldViews::reset(). |
1.2.1 written by Dimitri van Heesch,
© 1997-2000