edu.indiana.util.distribution
Class DummyDistribution

java.lang.Object
  extended by edu.indiana.util.distribution.DummyDistribution
All Implemented Interfaces:
Distribution, java.io.Serializable, java.lang.Cloneable

public class DummyDistribution
extends java.lang.Object
implements Distribution

A "distribution" that always returns 0. Can be useful as a placeholder.

See Also:
Serialized Form

Constructor Summary
DummyDistribution()
          Creates a new instance of DummyDistribution
 
Method Summary
 java.lang.Object clone()
          Obtain a copy of this distribution.
 int generateIntValue()
          Generate an int value according to this distribution.
 double generateValue()
          Generate a value according to this distribution.
 void setParameters(double[] parameters)
          Set the parameters of this distribution.
 java.lang.String toString()
          Obtain a String representation of this distribution.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DummyDistribution

public DummyDistribution()
Creates a new instance of DummyDistribution

Method Detail

generateValue

public double generateValue()
Generate a value according to this distribution.

Specified by:
generateValue in interface Distribution

setParameters

public void setParameters(double[] parameters)
Set the parameters of this distribution.

Specified by:
setParameters in interface Distribution

toString

public java.lang.String toString()
Obtain a String representation of this distribution.

Specified by:
toString in interface Distribution
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Obtain a copy of this distribution.

Specified by:
clone in interface Distribution
Overrides:
clone in class java.lang.Object

generateIntValue

public int generateIntValue()
Description copied from interface: Distribution
Generate an int value according to this distribution.

Specified by:
generateIntValue in interface Distribution