Package topo :: Package misc :: Module numbergenerators
[hide private]
[frames] | no frames]

Module numbergenerators

source code

A collection of classes that, when called, generate numbers according to different distributions (e.g. random numbers).

$Id: numbergenerators.py 8003 2008-02-18 15:58:50Z ceball $




Version: $Revision: 8003 $

Classes [hide private]
  RandomDistribution
Python's random module provides the Random class, which can be instantiated to give an object that can be asked to generate numbers from any of several different random distributions (e.g.
  UniformRandom
Specified with lbound and ubound; when called, return a random number in the range [lbound, ubound).
  UniformRandomInt
Specified with lbound and ubound; when called, return a random number in the inclusive range [lbound, ubound].
  Choice
Return a random element from the specified list of choices.
  NormalRandom
Specified with mean mu and standard deviation sigma.
  ExponentialDecay
Function object that provides a value that decays according to an exponential function, based on topo.sim.time().
  BoundedNumber
Function object that silently enforces numeric bounds on values returned by a callable object.