Package topo :: Package numbergen :: Module basic
[hide private]
[frames] | no frames]

Module basic

source code

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

$Id: basic.py 9312 2008-09-26 16:34:06Z jbednar $


Version: $Revision: 8985 $

Classes [hide private]
  NumberGenerator
Abstract base class for any object that when called produces a number.
  BinaryOperator
Applies any binary operator to NumberGenerators or numbers to yield a NumberGenerator.
  UnaryOperator
Applies any unary operator to a NumberGenerator to yield another NumberGenerator.
  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
Normally distributed (Gaussian) random number.
  VonMisesRandom
Circularly normal distributed random number.
  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.
  v
Abstract base class for any object that when called produces a number.
Variables [hide private]
  e = 2.71828182846
  k = 'NumberGenerator'