Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages   Examples  

Randint Class Reference
[Integer distributions]

Inherits Idist.


Detailed Description

Uniform distributed discrete random numbers

Author:
Ralf Gerstenberger

Note:
Randint from ODEM

supports Report

Randint provides a series of uniform distributed integer random numbers in the interval [a, b). The parameters a and b are set in the constructor.

Since:
1.0


Public Member Functions

 Randint (DistContext *c, Label title, int ra, int rb)
 Construction.

virtual int sample ()
 Get next random number.

int getA ()
 Get parameter a.

int getB ()
 Get parameter b.

int getUses ()
 Get number of uses.

virtual void reset ()
 Reset statistics.

virtual void report (Report *r)
 Generate report.


Protected Attributes

int a
int b
int uses


Constructor & Destructor Documentation

Randint DistContext c,
Label  title,
int  ra,
int  rb
 

Construction.

Parameters:
title Label of the generator
c pointer to DistContext object
ra lower bound - a
rb upper bound - b
The parameter a and b define the interval [a, b) of the uniform distributed random numbers generated by Randint.


Generated on Mon Aug 11 10:36:07 2003 for ODEMx by doxygen1.3