IMP  2.0.1
The Integrative Modeling Platform
base/random.h
Go to the documentation of this file.
1 /**
2  * \file IMP/base/random.h \brief Random number generators used by IMP.
3  *
4  * Copyright 2007-2013 IMP Inventors. All rights reserved.
5  *
6  */
7 
8 #ifndef IMPBASE_RANDOM_H
9 #define IMPBASE_RANDOM_H
10 
11 #include <IMP/base/base_config.h>
12 #include <boost/random.hpp>
13 
14 IMPBASE_BEGIN_NAMESPACE
15 
16 typedef ::boost::rand48 RandomNumberGenerator;
17 //! A shared random number generator
18 /** The random number generator is seeded based of of the current time. To
19  provide a better seed or use a constant seed call
20  random_number_generator.seed(x) with a 32 bit int or a 64 bit unsigned int.
21 
22  This generator can be used by the
23 \external{http://www.boost.org/doc/libs/1_39_0/libs/random/index.html, Boost.Random}
24  distributions.
25  */
26 extern IMPBASEEXPORT RandomNumberGenerator random_number_generator;
27 
28 
29 /** Return the initial random seed.
30  */
31 IMPBASEEXPORT boost::uint64_t get_random_seed();
32 
33 IMPBASE_END_NAMESPACE
34 
35 #endif /* IMPBASE_RANDOM_H */