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 10672 2009-10-28 01:00:50Z ceball $


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
  pi = 3.14159265359
  __package__ = 'topo.numbergen'
  k = 'NumberGenerator'