Parallel Colt 0.7.2

cern.jet.random.tfloat
Class AbstractFloatDistribution

java.lang.Object
  extended by cern.colt.PersistentObject
      extended by cern.jet.random.tfloat.AbstractFloatDistribution
All Implemented Interfaces:
FloatFunction, IntFunction, Serializable, Cloneable
Direct Known Subclasses:
AbstractContinousFloatDistribution

public abstract class AbstractFloatDistribution
extends PersistentObject
implements FloatFunction, IntFunction

Abstract base class for all random distributions. A subclass of this class need to override method nextFloat() and, in rare cases, also nextInt().

Currently all subclasses use a uniform pseudo-random number generation engine and transform its results to the target distribution. Thus, they expect such a uniform engine upon instance construction.

FloatMersenneTwister is recommended as uniform pseudo-random number generation engine, since it is very strong and at the same time quick. makeDefaultGenerator() will conveniently construct and return such a magic thing. You can also, for example, use DRand, a quicker (but much weaker) uniform random number generation engine. Of course, you can also use other strong uniform random number generation engines.

Ressources on the Web:

Check the Web version of the CERN Data Analysis Briefbook . This will clarify the definitions of most distributions.
Also consult the StatSoft Electronic Textbook - the definite web book.

Other useful ressources:

Another site and yet another site describing the definitions of several distributions.
You may want to check out a Glossary of Statistical Terms.
The GNU Scientific Library contains an extensive (but hardly readable) list of definition of distributions.
Use this Web interface to plot all sort of distributions.
Even more ressources: Internet glossary of Statistical Terms, a text book, another text book.
Finally, a good link list Statistics on the Web.

Version:
1.0, 09/24/99
Author:
wolfgang.hoschek@cern.ch
See Also:
cern.jet.random.tfloat.engine, Serialized Form

Field Summary
 
Fields inherited from class cern.colt.PersistentObject
serialVersionUID
 
Method Summary
 float apply(float dummy)
          Equivalent to nextFloat().
 int apply(int dummy)
          Equivalent to nextInt().
 Object clone()
          Returns a deep copy of the receiver; the copy will produce identical sequences.
static FloatRandomEngine makeDefaultGenerator()
          Constructs and returns a new uniform random number generation engine seeded with the current time.
abstract  float nextFloat()
          Returns a random number from the distribution.
 int nextInt()
          Returns a random number from the distribution; returns (int) Math.round(nextFloat()).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

apply

public float apply(float dummy)
Equivalent to nextFloat(). This has the effect that distributions can now be used as function objects, returning a random number upon function evaluation.

Specified by:
apply in interface FloatFunction
Parameters:
dummy - argument passed to the function.
Returns:
the result of the function.

apply

public int apply(int dummy)
Equivalent to nextInt(). This has the effect that distributions can now be used as function objects, returning a random number upon function evaluation.

Specified by:
apply in interface IntFunction
Parameters:
dummy - argument passed to the function.
Returns:
the result of the function.

clone

public Object clone()
Returns a deep copy of the receiver; the copy will produce identical sequences. After this call has returned, the copy and the receiver have equal but separate state.

Overrides:
clone in class PersistentObject
Returns:
a copy of the receiver.

makeDefaultGenerator

public static FloatRandomEngine makeDefaultGenerator()
Constructs and returns a new uniform random number generation engine seeded with the current time. Currently this is FloatMersenneTwister.


nextFloat

public abstract float nextFloat()
Returns a random number from the distribution.


nextInt

public int nextInt()
Returns a random number from the distribution; returns (int) Math.round(nextFloat()). Override this method if necessary.


Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage