This class generates number randomly using a seed, following the original code of R. MartÃ. More...
#include <srandom.h>
Inherits IRealRandom, and IRealRandom.
Public Member Functions | |
SRandom (unsigned long seed) | |
void | setSeed (unsigned long seed) |
virtual double | rand (void) |
unsigned long | getSeed (void) |
SRandom (unsigned long seed) | |
void | setSeed (unsigned long seed) |
virtual double | rand (void) |
unsigned long | getSeed (void) |
This class generates number randomly using a seed, following the original code of R. MartÃ.
Definition at line 38 of file srandom.h.
SRandom::SRandom | ( | unsigned long | seed | ) |
Constructor
seed | seed |
Definition at line 32 of file srandom.cc.
SRandom::SRandom | ( | unsigned long | seed | ) |
unsigned long SRandom::getSeed | ( | void | ) |
unsigned long SRandom::getSeed | ( | void | ) |
Definition at line 66 of file srandom.cc.
virtual double SRandom::rand | ( | void | ) | [virtual] |
Implements IRealRandom.
double SRandom::rand | ( | void | ) | [virtual] |
Implements IRealRandom.
Definition at line 36 of file srandom.cc.
void SRandom::setSeed | ( | unsigned long | seed | ) |
init the seed
seed | (value != 0) |
void SRandom::setSeed | ( | unsigned long | seed | ) |
init the seed
seed | (value != 0) |
Copyright 2008, Daniel Molina Cabrera <danimolina@gmail.com>
This file is part of software Realea
Realea is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Realea is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>.
Copyright 2008, Daniel Molina Cabrera
This file is part of software Realea
Realea is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Realea is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>.
Definition at line 23 of file srandom.cc.