pisgah
Class HypergeometricGraphData

java.lang.Object
  |
  +--pisgah.HypergeometricGraphData
All Implemented Interfaces:
PfPlotable

public class HypergeometricGraphData
extends java.lang.Object
implements PfPlotable

Provides data for graphing the pf of a Hypergeometric distribution


Constructor Summary
HypergeometricGraphData(int aN, int aR, int an, int aI0, int aI1)
          constructs HypergeometricGraphData
 
Method Summary
 int[] getBinLabels()
          Gets the integer labels for the bins (may be shifted for Hypergeometric)
 int getHighX()
          Gets the upper bound (inclusive) for the viewport.
 int getHighXInterval()
          Gets the lower bound (inclusive) for the probability interval
 int getLowX()
          Gets the lower bound (inclusive) for the distribution.
 int getLowXInterval()
          Gets the lower bound (inclusive) for the probability interval
 float getMaxProbability()
          Gets the maximum probability for scaling
 float[] getProbability()
          Gets the probability of each value
 java.lang.String getTitleString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HypergeometricGraphData

public HypergeometricGraphData(int aN,
                               int aR,
                               int an,
                               int aI0,
                               int aI1)
constructs HypergeometricGraphData

Parameters:
aN - is the population size (positive integer)
aR - is the "special" population size (positive integer <= N)
an - is the sample size (positive integer <=N)
aI0 - is the left end of the probability interval
aI1 - is the right end of the probability interval
Method Detail

getBinLabels

public int[] getBinLabels()
Gets the integer labels for the bins (may be shifted for Hypergeometric)

Specified by:
getBinLabels in interface PfPlotable
Returns:
The integer labels

getProbability

public float[] getProbability()
Gets the probability of each value

Specified by:
getProbability in interface PfPlotable
Returns:
The array of bin probabilities

getMaxProbability

public float getMaxProbability()
Gets the maximum probability for scaling

Specified by:
getMaxProbability in interface PfPlotable
Returns:
The maximum probability

getLowX

public int getLowX()
Gets the lower bound (inclusive) for the distribution.

Specified by:
getLowX in interface PfPlotable
Returns:
The lower bound, max(n+r-N,0).

getHighX

public int getHighX()
Gets the upper bound (inclusive) for the viewport.

Specified by:
getHighX in interface PfPlotable
Returns:
The upper bound, r.

getLowXInterval

public int getLowXInterval()
Gets the lower bound (inclusive) for the probability interval

Specified by:
getLowXInterval in interface PfPlotable
Returns:
The lower bound x1

getHighXInterval

public int getHighXInterval()
Description copied from interface: PfPlotable
Gets the lower bound (inclusive) for the probability interval

Specified by:
getHighXInterval in interface PfPlotable
Returns:
The upper bound x2

getTitleString

public java.lang.String getTitleString()
Specified by:
getTitleString in interface PfPlotable