Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:51:12

0001 /* boost random/shuffle_output.hpp header file
0002  *
0003  * Copyright Jens Maurer 2000-2001
0004  * Distributed under the Boost Software License, Version 1.0. (See
0005  * accompanying file LICENSE_1_0.txt or copy at
0006  * http://www.boost.org/LICENSE_1_0.txt)
0007  *
0008  * See http://www.boost.org for most recent version including documentation.
0009  *
0010  * $Id$
0011  *
0012  * Revision history
0013  *  2001-02-18  moved to individual header files
0014  */
0015 
0016 #ifndef BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
0017 #define BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
0018 
0019 #include <boost/random/shuffle_order.hpp>
0020 
0021 namespace boost {
0022 namespace random {
0023 
0024 /// \cond
0025 
0026 template<typename URNG, int k, 
0027          typename URNG::result_type val = 0> 
0028 class shuffle_output : public shuffle_order_engine<URNG, k>
0029 {
0030     typedef shuffle_order_engine<URNG, k> base_t;
0031 public:
0032     typedef typename base_t::result_type result_type;
0033     shuffle_output() {}
0034     template<class T>
0035     explicit shuffle_output(T& arg) : base_t(arg) {}
0036     template<class T>
0037     explicit shuffle_output(const T& arg) : base_t(arg) {}
0038     template<class It>
0039     shuffle_output(It& first, It last) : base_t(first, last) {}
0040     result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
0041     { return (this->base().min)(); }
0042     result_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
0043     { return (this->base().max)(); }
0044 };
0045 
0046 /// \endcond
0047 
0048 }
0049 }
0050 
0051 #endif // BOOST_RANDOM_SHUFFLE_OUTPUT_HPP