]> git.donarmstrong.com Git - rsem.git/blob - boost/random/ranlux.hpp
2faa1cc2dedd7456886c66a26ce25a477ecce1c6
[rsem.git] / boost / random / ranlux.hpp
1 /* boost random/ranlux.hpp header file
2  *
3  * Copyright Jens Maurer 2002
4  * Distributed under the Boost Software License, Version 1.0. (See
5  * accompanying file LICENSE_1_0.txt or copy at
6  * http://www.boost.org/LICENSE_1_0.txt)
7  *
8  * See http://www.boost.org for most recent version including documentation.
9  *
10  * $Id: ranlux.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
11  *
12  * Revision history
13  *  2001-02-18  created
14  */
15
16 #ifndef BOOST_RANDOM_RANLUX_HPP
17 #define BOOST_RANDOM_RANLUX_HPP
18
19 #include <boost/config.hpp>
20 #include <boost/random/subtract_with_carry.hpp>
21 #include <boost/random/discard_block.hpp>
22
23 namespace boost {
24
25 namespace random {
26   typedef subtract_with_carry<int, (1<<24), 10, 24, 0> ranlux_base;
27   typedef subtract_with_carry_01<float, 24, 10, 24> ranlux_base_01;
28   typedef subtract_with_carry_01<double, 48, 10, 24> ranlux64_base_01;
29 }
30
31 namespace random {
32 namespace detail {
33 /**
34  * The ranlux family of generators are described in
35  *
36  *  @blockquote
37  *  "A portable high-quality random number generator for lattice field theory
38  *  calculations", M. Luescher, Computer Physics Communications, 79 (1994)
39  *  pp 100-110. 
40  *  @endblockquote
41  *
42  * The levels are given in
43  * 
44  *  @blockquote
45  *  "RANLUX: A Fortran implementation ofthe high-quality
46  *  pseudorandom number generator of Luescher", F. James,
47  *  Computer Physics Communications 79 (1994) 111-114
48  *  @endblockquote
49  */
50 class ranlux_documentation {};
51 }
52 }
53
54 /** @copydoc boost::random::detail::ranlux_documentation */
55 typedef random::discard_block<random::ranlux_base, 223, 24> ranlux3;
56 /** @copydoc boost::random::detail::ranlux_documentation */
57 typedef random::discard_block<random::ranlux_base, 389, 24> ranlux4;
58
59 /** @copydoc boost::random::detail::ranlux_documentation */
60 typedef random::discard_block<random::ranlux_base_01, 223, 24> ranlux3_01;
61 /** @copydoc boost::random::detail::ranlux_documentation */
62 typedef random::discard_block<random::ranlux_base_01, 389, 24> ranlux4_01;
63
64 /** @copydoc boost::random::detail::ranlux_documentation */
65 typedef random::discard_block<random::ranlux64_base_01, 223, 24> ranlux64_3_01;
66 /** @copydoc boost::random::detail::ranlux_documentation */
67 typedef random::discard_block<random::ranlux64_base_01, 389, 24> ranlux64_4_01;
68
69 #if !defined(BOOST_NO_INT64_T) && !defined(BOOST_NO_INTEGRAL_INT64_T)
70 namespace random {
71   typedef random::subtract_with_carry<int64_t, (int64_t(1)<<48), 10, 24, 0> ranlux64_base;
72 }
73 /** @copydoc boost::random::detail::ranlux_documentation */
74 typedef random::discard_block<random::ranlux64_base, 223, 24> ranlux64_3;
75 /** @copydoc boost::random::detail::ranlux_documentation */
76 typedef random::discard_block<random::ranlux64_base, 389, 24> ranlux64_4;
77 #endif /* !BOOST_NO_INT64_T && !BOOST_NO_INTEGRAL_INT64_T */
78
79 } // namespace boost
80
81 #endif // BOOST_RANDOM_LINEAR_CONGRUENTIAL_HPP