Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /* boost random/mersenne_twister.hpp header file
0002  *
0003  * Copyright Jens Maurer 2000-2001
0004  * Copyright Steven Watanabe 2010
0005  * Distributed under the Boost Software License, Version 1.0. (See
0006  * accompanying file LICENSE_1_0.txt or copy at
0007  * http://www.boost.org/LICENSE_1_0.txt)
0008  *
0009  * See http://www.boost.org for most recent version including documentation.
0010  *
0011  * $Id$
0012  *
0013  */
0014 
0015 #ifndef BOOST_RANDOM_DETAIL_GENERATOR_SEED_SEQ_HPP_INCLUDED
0016 #define BOOST_RANDOM_DETAIL_GENERATOR_SEED_SEQ_HPP_INCLUDED
0017 
0018 namespace boost {
0019 namespace random {
0020 namespace detail {
0021 
0022 template<class Generator>
0023 class generator_seed_seq {
0024 public:
0025     generator_seed_seq(Generator& g) : gen(&g) {}
0026     template<class It>
0027     void generate(It first, It last) {
0028         for(; first != last; ++first) {
0029             *first = (*gen)();
0030         }
0031     }
0032 private:
0033     Generator* gen;
0034 };
0035 
0036 }
0037 }
0038 }
0039 
0040 #endif