RePast
v. 2.0

uchicago.src.sim.util
Class DistributionFactory

java.lang.Object
  |
  +--uchicago.src.sim.util.DistributionFactory

public class DistributionFactory
extends Object

A class to easily generate statistical distributions for the AgentDistribution class. These distributions are from the colt library. All of the distributions require a set of doubles. For information on these distributions and the parameter lists, see the colt documentation.

Some examples include:

chi-squared : double degrees of freedom pareto: double scale, double shape poisson: double mean uniform: double min, double max

Note: The binomial distribution cannot be created from this Factory.


Constructor Summary
DistributionFactory()
           
 
Method Summary
 cern.jet.random.AbstractDistribution createDistribution(String distClassName, double[] params)
          Creates an Abstract Distribution.
static void main(String[] args)
           
static cern.jet.random.AbstractDistribution staticCreateDistribution(String distClass, double[] params)
          Statically creates an Abstract Distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionFactory

public DistributionFactory()
Method Detail

createDistribution

public cern.jet.random.AbstractDistribution createDistribution(String distClassName,
                                                               double[] params)
                                                        throws IllegalArgumentException
Creates an Abstract Distribution. Possible distributions include Beta, BreitWigner, BreitWignerMeanSquare, ChiSquare, Exponential, ExponentialPower Gamma, Hyperbolic, Logarithmic, Normal, Pareto, ParetoII, Poisson, PossionSlow, StudentT, Uniform, VonMises, Zeta.

IllegalArgumentException

staticCreateDistribution

public static cern.jet.random.AbstractDistribution staticCreateDistribution(String distClass,
                                                                            double[] params)
                                                                     throws IllegalArgumentException
Statically creates an Abstract Distribution. Possible distributions include Beta, BreitWigner, BreitWignerMeanSquare, ChiSquare, Exponential, ExponentialPower, Gamma, Hyperbolic, Logarithmic, Normal, Pareto, ParetoII, Poisson, PossionSlow, StudentT, Uniform, VonMises, Zeta.

IllegalArgumentException

main

public static void main(String[] args)

RePast
v. 2.0

Bug reports and feature requests to RePast