Chris@16
|
1 /* boost random/shuffle_output.hpp header file
|
Chris@16
|
2 *
|
Chris@16
|
3 * Copyright Jens Maurer 2000-2001
|
Chris@16
|
4 * Distributed under the Boost Software License, Version 1.0. (See
|
Chris@16
|
5 * accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
6 * http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
7 *
|
Chris@16
|
8 * See http://www.boost.org for most recent version including documentation.
|
Chris@16
|
9 *
|
Chris@101
|
10 * $Id$
|
Chris@16
|
11 *
|
Chris@16
|
12 * Revision history
|
Chris@16
|
13 * 2001-02-18 moved to individual header files
|
Chris@16
|
14 */
|
Chris@16
|
15
|
Chris@16
|
16 #ifndef BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
|
Chris@16
|
17 #define BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
|
Chris@16
|
18
|
Chris@16
|
19 #include <boost/random/shuffle_order.hpp>
|
Chris@16
|
20
|
Chris@16
|
21 namespace boost {
|
Chris@16
|
22 namespace random {
|
Chris@16
|
23
|
Chris@16
|
24 /// \cond
|
Chris@16
|
25
|
Chris@16
|
26 template<typename URNG, int k,
|
Chris@16
|
27 typename URNG::result_type val = 0>
|
Chris@16
|
28 class shuffle_output : public shuffle_order_engine<URNG, k>
|
Chris@16
|
29 {
|
Chris@16
|
30 typedef shuffle_order_engine<URNG, k> base_t;
|
Chris@101
|
31 public:
|
Chris@16
|
32 typedef typename base_t::result_type result_type;
|
Chris@16
|
33 shuffle_output() {}
|
Chris@16
|
34 template<class T>
|
Chris@101
|
35 explicit shuffle_output(T& arg) : base_t(arg) {}
|
Chris@16
|
36 template<class T>
|
Chris@101
|
37 explicit shuffle_output(const T& arg) : base_t(arg) {}
|
Chris@16
|
38 template<class It>
|
Chris@16
|
39 shuffle_output(It& first, It last) : base_t(first, last) {}
|
Chris@16
|
40 result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
Chris@16
|
41 { return (this->base().min)(); }
|
Chris@16
|
42 result_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
Chris@16
|
43 { return (this->base().max)(); }
|
Chris@16
|
44 };
|
Chris@16
|
45
|
Chris@16
|
46 /// \endcond
|
Chris@16
|
47
|
Chris@16
|
48 }
|
Chris@16
|
49 }
|
Chris@16
|
50
|
Chris@16
|
51 #endif // BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
|