pisgah
Class BinomialGraphData

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

public class BinomialGraphData
extends java.lang.Object
implements PfPlotable

Provides data for graphing the pf of a binomial distribution


Constructor Summary
BinomialGraphData(int aN, double aP, int aI0, int aI1)
          constructs BinomialGraphData
 
Method Summary
 int[] getBinLabels()
          Gets the integer labels for the bins (same as index for binomial)
 int getHighX()
          Gets the upper bound (inclusive) for the distribution.
 int getHighXInterval()
          Gets the upper 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()
          Gets the title string of the binomial graph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinomialGraphData

public BinomialGraphData(int aN,
                         double aP,
                         int aI0,
                         int aI1)
constructs BinomialGraphData

Parameters:
aN - is the integer parameter for the binomial (number of trials)
aP - is the probability of success
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 (same as index for binomial)

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, 0.

getHighX

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

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

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()
Gets the upper bound (inclusive) for the probability interval

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

getTitleString

public java.lang.String getTitleString()
Gets the title string of the binomial graph

Specified by:
getTitleString in interface PfPlotable
Returns:
The title string