summaryrefslogtreecommitdiff
path: root/boost/random/shuffle_output.hpp
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-10-30 12:57:26 -0700
committerAnas Nashif <anas.nashif@intel.com>2012-10-30 12:57:26 -0700
commit1a78a62555be32868418fe52f8e330c9d0f95d5a (patch)
treed3765a80e7d3b9640ec2e930743630cd6b9fce2b /boost/random/shuffle_output.hpp
downloadboost-1a78a62555be32868418fe52f8e330c9d0f95d5a.tar.gz
boost-1a78a62555be32868418fe52f8e330c9d0f95d5a.tar.bz2
boost-1a78a62555be32868418fe52f8e330c9d0f95d5a.zip
Imported Upstream version 1.49.0upstream/1.49.0
Diffstat (limited to 'boost/random/shuffle_output.hpp')
-rw-r--r--boost/random/shuffle_output.hpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/boost/random/shuffle_output.hpp b/boost/random/shuffle_output.hpp
new file mode 100644
index 0000000000..44b823f573
--- /dev/null
+++ b/boost/random/shuffle_output.hpp
@@ -0,0 +1,51 @@
+/* boost random/shuffle_output.hpp header file
+ *
+ * Copyright Jens Maurer 2000-2001
+ * Distributed under the Boost Software License, Version 1.0. (See
+ * accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * See http://www.boost.org for most recent version including documentation.
+ *
+ * $Id: shuffle_output.hpp 71018 2011-04-05 21:27:52Z steven_watanabe $
+ *
+ * Revision history
+ * 2001-02-18 moved to individual header files
+ */
+
+#ifndef BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
+#define BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
+
+#include <boost/random/shuffle_order.hpp>
+
+namespace boost {
+namespace random {
+
+/// \cond
+
+template<typename URNG, int k,
+ typename URNG::result_type val = 0>
+class shuffle_output : public shuffle_order_engine<URNG, k>
+{
+ typedef shuffle_order_engine<URNG, k> base_t;
+ typedef typename base_t::result_type result_type;
+public:
+ shuffle_output() {}
+ template<class T>
+ shuffle_output(T& arg) : base_t(arg) {}
+ template<class T>
+ shuffle_output(const T& arg) : base_t(arg) {}
+ template<class It>
+ shuffle_output(It& first, It last) : base_t(first, last) {}
+ result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
+ { return (this->base().min)(); }
+ result_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
+ { return (this->base().max)(); }
+};
+
+/// \endcond
+
+}
+}
+
+#endif // BOOST_RANDOM_SHUFFLE_OUTPUT_HPP