World Ocean Simulation System (WOSS) library
uw-woss-random-generator.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - federico@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * This software has been developed by Federico Guerra and SIGNET lab,
24 * University of Padova, in collaboration with the NATO Centre for
25 * Maritime Research and Experimentation (http://www.cmre.nato.int ;
26 * E-mail: pao@cmre.nato.int), whose support is gratefully acknowledged.
27 */
28
29
40#ifndef UNDERWATER_WOSS_RANDOM_GENERATOR_H
41#define UNDERWATER_WOSS_RANDOM_GENERATOR_H
42
43
45#include <rng.h>
46#include <tclcl.h>
47
48
50
51
52 public:
53
54
55 WossRandomGenerator( int seed = 0 );
56
57
59
60 WossRandomGenerator& operator=( const WossRandomGenerator& copy );
61
62
63 virtual ~WossRandomGenerator();
64
65
66 virtual WossRandomGenerator* create( int s ) { return new WossRandomGenerator(s); }
67
68 virtual WossRandomGenerator* clone() const { return new WossRandomGenerator(*this); }
69
70
71 virtual double getRand() const;
72
73 virtual int getRandInt() const;
74
75 virtual void initialize();
76
77
78 protected:
79
80
81 RNG* rng;
82
83
84};
85
86
87class WossRandomGeneratorTcl : public WossRandomGenerator, public TclObject {
88
89
90 public:
91
92
94
95
96 virtual int command(int argc, const char*const* argv);
97
98
99};
100
101
102#endif // UNDERWATER_WOSS_RANDOM_GENERATOR_H
103
Definition uw-woss-random-generator.h:87
Definition uw-woss-random-generator.h:49
virtual WossRandomGenerator * clone() const
Definition uw-woss-random-generator.h:68
virtual int getRandInt() const
Definition uw-woss-random-generator.cpp:99
virtual void initialize()
Definition uw-woss-random-generator.cpp:79
virtual double getRand() const
Definition uw-woss-random-generator.cpp:90
woss::RandomGenerator class
Definition random-generator-definitions.h:56
int seed
Definition random-generator-definitions.h:132
Definitions and library for woss::RandomGenerator class.