SRandom Class Reference
[Real Evolutionary Algorithms Common (Core classes)]

This class generates number randomly using a seed, following the original code of R. Martí. More...

#include <srandom.h>

Inherits IRealRandom, and IRealRandom.

Collaboration diagram for SRandom:
Collaboration graph
[legend]

List of all members.

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)

Detailed Description

This class generates number randomly using a seed, following the original code of R. Martí.

Definition at line 38 of file srandom.h.


Constructor & Destructor Documentation

SRandom::SRandom ( unsigned long  seed  ) 

Constructor

Parameters:
seed seed
See also:
setSeed

Definition at line 32 of file srandom.cc.

Here is the call graph for this function:

SRandom::SRandom ( unsigned long  seed  ) 

Constructor

Parameters:
seed seed
See also:
setSeed

Member Function Documentation

unsigned long SRandom::getSeed ( void   ) 
Returns:
the actual seed
unsigned long SRandom::getSeed ( void   ) 
Returns:
the actual seed

Definition at line 66 of file srandom.cc.

virtual double SRandom::rand ( void   )  [virtual]
Returns:
A random double between 0 and 1

Implements IRealRandom.

double SRandom::rand ( void   )  [virtual]
Returns:
A random double between 0 and 1

Implements IRealRandom.

Definition at line 36 of file srandom.cc.

void SRandom::setSeed ( unsigned long  seed  ) 

init the seed

Parameters:
seed (value != 0)
void SRandom::setSeed ( unsigned long  seed  ) 

init the seed

Parameters:
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.


The documentation for this class was generated from the following files:

Generated on Sun May 9 12:26:14 2010 for Realea by  doxygen 1.6.1