QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
seedgenerator.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2004 Ferdinando Ametrano
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file seedgenerator.hpp
21 \brief Random seed generator
22*/
23
24#ifndef quantlib_seed_generator_hpp
25#define quantlib_seed_generator_hpp
26
29
30namespace QuantLib {
31
32 //! Random seed generator
33 /*! Random number generator used for automatic generation of
34 initialization seeds.
35
36 \test correct initialization of the single instance is tested.
37 */
38 class SeedGenerator : public Singleton<SeedGenerator> {
39 friend class Singleton<SeedGenerator>;
40 public:
41 unsigned long get();
42 private:
44 void initialize();
46 };
47
48}
49
50
51#endif
Uniform random number generator.
Random seed generator.
MersenneTwisterUniformRng rng_
Basic support for the singleton pattern.
Definition: singleton.hpp:58
Mersenne Twister uniform random number generator.
Definition: any.hpp:35
basic support for the singleton pattern