Bayeux  3.4.1
Core Foundation library for SuperNEMO
random_utils.h
Go to the documentation of this file.
1 /* Author (s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2010-02-16
4  * Last modified: 2014-02-12
5  *
6  * License:
7  *
8  * Copyright 2010-2014 F. Mauger
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 3 of the License, or (at
13  * your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
23  * Boston, MA 02110-1301, USA.
24  *
25  * Description:
26  *
27  * Some useful resources related to random number generation
28  *
29  * History:
30  *
31  */
32 
33 #ifndef MYGSL_RANDOM_UTILS_H
34 #define MYGSL_RANDOM_UTILS_H 1
35 
36 // Third party:
37 // - Boost:
38 #include <boost/cstdint.hpp>
39 
40 namespace mygsl {
41 
45  {
46  public:
47 
48  static const int32_t SEED_INVALID = -1;
49  static const int32_t SEED_AUTO = 0;
50  static const int32_t SEED_TIME = 0;
51  static const int32_t SEED_MAX = 0x7FFFFFFF;
52 
54  static bool is_valid_seed(int32_t);
55 
56  };
57 
58 } // end of namespace mygsl
59 
60 #endif // MYGSL_RANDOM_UTILS_H
61 
62 /* Local Variables: */
63 /* mode: c++ */
64 /* coding: utf-8 */
65 /* End: */
static const int32_t SEED_MAX
Constant that represents the maximum allowed seed value.
Definition: random_utils.h:51
Definition: random_utils.h:44
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
static const int32_t SEED_TIME
Constant that represents a seed that must be initialized from some external 'random' source like the ...
Definition: random_utils.h:50
static bool is_valid_seed(int32_t)
Check if a given seed is valid.
static const int32_t SEED_AUTO
Constant that represents a seed that must be automatically initialized from some external 'random' so...
Definition: random_utils.h:49
static const int32_t SEED_INVALID
Constant that represents an invalid seed value.
Definition: random_utils.h:48