1 16 package org.apache.commons.math.distribution; 17 18 24 public class DistributionFactoryImpl extends DistributionFactory { 25 26 29 public DistributionFactoryImpl() { 30 super(); 31 } 32 33 39 public ChiSquaredDistribution createChiSquareDistribution( 40 final double degreesOfFreedom) { 41 42 return new ChiSquaredDistributionImpl(degreesOfFreedom); 43 } 44 45 52 public GammaDistribution createGammaDistribution( 53 double alpha, double beta) { 54 55 return new GammaDistributionImpl(alpha, beta); 56 } 57 58 64 public TDistribution createTDistribution(double degreesOfFreedom) { 65 return new TDistributionImpl(degreesOfFreedom); 66 } 67 68 75 public FDistribution createFDistribution( 76 double numeratorDegreesOfFreedom, 77 double denominatorDegreesOfFreedom) { 78 return new FDistributionImpl(numeratorDegreesOfFreedom, 79 denominatorDegreesOfFreedom); 80 } 81 82 88 public ExponentialDistribution createExponentialDistribution(double mean) { 89 return new ExponentialDistributionImpl(mean); 90 } 91 92 100 public BinomialDistribution createBinomialDistribution( 101 int numberOfTrials, double probabilityOfSuccess) { 102 return new BinomialDistributionImpl(numberOfTrials, 103 probabilityOfSuccess); 104 } 105 106 115 public HypergeometricDistribution createHypergeometricDistribution( 116 int populationSize, int numberOfSuccesses, int sampleSize) { 117 return new HypergeometricDistributionImpl(populationSize, 118 numberOfSuccesses, sampleSize); 119 } 120 121 129 public NormalDistribution createNormalDistribution(double mean, double sd) { 130 return new NormalDistributionImpl(mean, sd); 131 } 132 133 139 public NormalDistribution createNormalDistribution() { 140 return new NormalDistributionImpl(); 141 } 142 143 153 public PoissonDistribution createPoissonDistribution(double lambda) { 154 return new PoissonDistributionImpl(lambda); 155 } 156 157 } 158 | Popular Tags |