de.unidu.is.statistics
Class Distribution

java.lang.Object
  extended byde.unidu.is.statistics.Distribution
Direct Known Subclasses:
DiscreteDistribution, NormalDistribution

public abstract class Distribution
extends java.lang.Object

An abstract class modelling probabilistic distributions.

This class has to be subclassed for specific distributions.

Since:
2002-04-09
Version:
$Revision: 1.6 $, $Date: 2005/03/14 17:33:15 $
Author:
Henrik Nottelmann

Constructor Summary
Distribution()
           
 
Method Summary
 double[] computeValues(int num)
          Returns an array with actual values based on the underlying distribution in decreasing order (as many values as possible).
abstract  void computeValues(int num, double[] ret)
          Computes actual values based on the underlying distribution when having the specified number of items, and writes them in decreasing order into the specified array (as many values as possible).
 void eliminateZero()
          Eliminates info about the distribution at zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Distribution

public Distribution()
Method Detail

eliminateZero

public void eliminateZero()
Eliminates info about the distribution at zero. This is only useful for discrete distributions with a high peak at zero, as then a plot might look better.

At the moment, this method does nothing. It may to be overridden in subclasses.


computeValues

public double[] computeValues(int num)
Returns an array with actual values based on the underlying distribution in decreasing order (as many values as possible).

Parameters:
num - number of items in total
Returns:
array for the actual values

computeValues

public abstract void computeValues(int num,
                                   double[] ret)
Computes actual values based on the underlying distribution when having the specified number of items, and writes them in decreasing order into the specified array (as many values as possible).

This method has to be overridden in subclasses.

Parameters:
num - number of items in total
ret - array for the actual values