PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/random/shuffle_output.hpp

http://hadesmem.googlecode.com/
C++ Header | 51 lines | 27 code | 8 blank | 16 comment | 0 complexity | 382bb59c415013d1ade5a15f824bb0e0 MD5 | raw file
 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: shuffle_output.hpp 71018 2011-04-05 21:27:52Z steven_watanabe $
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
21namespace boost {
22namespace random {
23
24/// \cond
25
26template<typename URNG, int k, 
27         typename URNG::result_type val = 0> 
28class shuffle_output : public shuffle_order_engine<URNG, k>
29{
30    typedef shuffle_order_engine<URNG, k> base_t;
31    typedef typename base_t::result_type result_type;
32public:
33    shuffle_output() {}
34    template<class T>
35    shuffle_output(T& arg) : base_t(arg) {}
36    template<class T>
37    shuffle_output(const T& arg) : base_t(arg) {}
38    template<class It>
39    shuffle_output(It& first, It last) : base_t(first, last) {}
40    result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
41    { return (this->base().min)(); }
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