taus88.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* boost random/taus88.hpp header file
  2. *
  3. * Copyright Jens Maurer 2000-2001
  4. * Copyright Steven Watanabe 2011
  5. * Distributed under the Boost Software License, Version 1.0. (See
  6. * accompanying file LICENSE_1_0.txt or copy at
  7. * http://www.boost.org/LICENSE_1_0.txt)
  8. *
  9. * See http://www.boost.org/libs/random for documentation.
  10. *
  11. * $Id$
  12. *
  13. */
  14. #ifndef BOOST_RANDOM_TAUS88_HPP
  15. #define BOOST_RANDOM_TAUS88_HPP
  16. #include <boost/random/linear_feedback_shift.hpp>
  17. #include <boost/random/xor_combine.hpp>
  18. namespace boost {
  19. namespace random {
  20. /**
  21. * The specialization taus88 was suggested in
  22. *
  23. * @blockquote
  24. * "Maximally Equidistributed Combined Tausworthe Generators",
  25. * Pierre L'Ecuyer, Mathematics of Computation, Volume 65,
  26. * Number 213, January 1996, Pages 203-213
  27. * @endblockquote
  28. */
  29. typedef xor_combine_engine<
  30. xor_combine_engine<
  31. linear_feedback_shift_engine<uint32_t, 32, 31, 13, 12>, 0,
  32. linear_feedback_shift_engine<uint32_t, 32, 29, 2, 4>, 0>, 0,
  33. linear_feedback_shift_engine<uint32_t, 32, 28, 3, 17>, 0> taus88;
  34. } // namespace random
  35. using random::taus88;
  36. } // namespace boost
  37. #endif // BOOST_RANDOM_TAUS88_HPP