openModeller  Version 1.5.0
Random Class Reference

#include <Random.hh>

Collaboration diagram for Random:
Collaboration graph

Public Member Functions

 Random ()
 
double get (double min, double max)
 
double get (double max)
 
double get ()
 
double operator() (double min, double max)
 
double operator() (double max)
 
double operator() ()
 
int get (int min, int max)
 
int get (int max)
 
int operator() (int min, int max)
 
int operator() (int max)
 
long get (long min, long max)
 
long get (long max)
 
long operator() (long min, long max)
 
long operator() (long max)
 
double discrete (float range, float dim_interv)
 

Private Member Functions

double random ()
 

Static Private Attributes

static int _initialized = 0
 

Detailed Description

Declaration of Random class.

Author
Mauro E S Munoz
Date
1997-06-18
Id:
Random.hh 5670 2013-02-04 15:43:08Z dbolgheroni

LICENSE INFORMATION

Copyright(c) 2003 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program 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 2 of the License, or (at your option) any later version.

This program 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:

http://www.gnu.org/copyleft/gpl.html Class to generate random numbers

Definition at line 44 of file Random.hh.

Constructor & Destructor Documentation

Random::Random ( )

Definition at line 44 of file Random.cpp.

References _initialized, and initRandom().

Here is the call graph for this function:

Member Function Documentation

double Random::discrete ( float  range,
float  dim_interv 
)

Generate a random number, r, between [-range, range], so that r = -range + k * dim_interv, where k = 0,..,N.

Definition at line 144 of file Random.cpp.

References random().

Here is the call graph for this function:

double Random::get ( double  min,
double  max 
)

Return real numbers between [min, max).

Definition at line 54 of file Random.cpp.

References random().

Referenced by Garp::colonize(), Garp::crossover(), BioclimHistogram::getBioclimRange(), RfAlgorithm::initialize(), LogitRule::initialize(), RangeRule::initialize(), RfAlgorithm::iterate(), GarpRule::mutate(), and Garp::select().

Here is the call graph for this function:

double Random::get ( double  max)

Return real numbers between [0, max).

Definition at line 60 of file Random.cpp.

References random().

Here is the call graph for this function:

double Random::get ( )
inline

Return real numbers between [0, 1).

Definition at line 54 of file Random.hh.

int Random::get ( int  min,
int  max 
)

Return integer numbers between [min, max).

Definition at line 84 of file Random.cpp.

References random().

Here is the call graph for this function:

int Random::get ( int  max)

Return integer numbers between [0, max).

Definition at line 90 of file Random.cpp.

References random().

Here is the call graph for this function:

long Random::get ( long  min,
long  max 
)

Return numbers "long int's" between [min, max).

Definition at line 114 of file Random.cpp.

References random().

Here is the call graph for this function:

long Random::get ( long  max)

Return numbers "long int's" between [0, max).

Definition at line 120 of file Random.cpp.

References random().

Here is the call graph for this function:

double Random::operator() ( double  min,
double  max 
)

Definition at line 69 of file Random.cpp.

References random().

Here is the call graph for this function:

double Random::operator() ( double  max)

Definition at line 75 of file Random.cpp.

References random().

Here is the call graph for this function:

double Random::operator() ( )
inline

Definition at line 58 of file Random.hh.

int Random::operator() ( int  min,
int  max 
)

Definition at line 99 of file Random.cpp.

References random().

Here is the call graph for this function:

int Random::operator() ( int  max)

Definition at line 105 of file Random.cpp.

References random().

Here is the call graph for this function:

long Random::operator() ( long  min,
long  max 
)

Definition at line 129 of file Random.cpp.

References random().

Here is the call graph for this function:

long Random::operator() ( long  max)

Definition at line 135 of file Random.cpp.

References random().

Here is the call graph for this function:

double Random::random ( )
private

Return real numbers in the interval [0, 1).

Definition at line 155 of file Random.cpp.

Referenced by discrete(), get(), and operator()().

Member Data Documentation

int Random::_initialized = 0
staticprivate

Definition at line 88 of file Random.hh.

Referenced by Random().


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