1 /* boost random/shuffle_output.hpp header file
2  *
3  * Copyright Jens Maurer 2000-2001
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$
11  *
12  * Revision history
13  *  2001-02-18  moved to individual header files
14  */
15 
16 #ifndef BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
17 #define BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
18 
19 #include <boost/random/shuffle_order.hpp>
20 
21 namespace boost {
22 namespace random {
23 
24 /// \cond
25 
26 template<typename URNG, int k,
27          typename URNG::result_type val = 0>
28 class shuffle_output : public shuffle_order_engine<URNG, k>
29 {
30     typedef shuffle_order_engine<URNG, k> base_t;
31 public:
32     typedef typename base_t::result_type result_type;
shuffle_output()33     shuffle_output() {}
34     template<class T>
shuffle_output(T & arg)35     explicit shuffle_output(T& arg) : base_t(arg) {}
36     template<class T>
shuffle_output(const T & arg)37     explicit shuffle_output(const T& arg) : base_t(arg) {}
38     template<class It>
shuffle_output(It & first,It last)39     shuffle_output(It& first, It last) : base_t(first, last) {}
BOOST_PREVENT_MACRO_SUBSTITUTION()40     result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
41     { return (this->base().min)(); }
BOOST_PREVENT_MACRO_SUBSTITUTION()42     result_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
43     { return (this->base().max)(); }
44 };
45 
46 /// \endcond
47 
48 }
49 }
50 
51 #endif // BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
52