pisgah
Class BetaCalculatorInfo

java.lang.Object
  |
  +--pisgah.BetaCalculatorInfo
All Implemented Interfaces:
CalculatorInfo, Description

public class BetaCalculatorInfo
extends java.lang.Object
implements CalculatorInfo, Description

BetaCalculatorInfo provides beta specific info for Calculator


Constructor Summary
BetaCalculatorInfo()
          Constructor for the BetaCalculatorInfo
BetaCalculatorInfo(double aA, double aB)
          constructor for BetaCalculatorInfo Provides parameters and variables for beta distribution
 
Method Summary
 CalculateAnswer calculate()
          Description of the Method
 CalculateInverseAnswer calculateInverse(int tailChoice)
          Description of the Method
 double getCdf(double x)
          Gets the Cummulative beta probability
 java.lang.String getDescription()
          Gets the Description attribute of the BetaCalculatorInfo object
 java.lang.String getDistributionName()
          Gets the distribution name
 double[] getDoubleInterval()
          Gets the DoubleInterval attribute of the BetaCalculatorInfo object
 double[] getDoubleParameters()
          Gets the DoubleParameters attribute of the BetaCalculatorInfo object
 java.lang.String getHelpPageString()
          Gets the HelpPageString of the BetaCalculatorInfo
 int[] getIntegerInterval()
          Gets the IntegerInterval attribute of the BetaCalculatorInfo object
 int[] getIntegerParameters()
          Gets the IntegerParameters attribute of the BetaCalculatorInfo object
 int getNumberIntegerParameters()
          Gets the NumberIntegerParameters attribute of the BetaCalculatorInfo object
 int getNumberParameters()
          Gets the NumberParameters attribute of the BetaCalculatorInfo object
 java.lang.String[] getParameterName()
          Gets the ParameterName array {"a", "b"}
 java.lang.String getParameters()
          Gets the Parameters description for a Beta distribution
 java.lang.String getTitle()
          Gets the Title attribute for the Beta Calculator
 java.lang.String getValues()
          Gets the Values attribute of the BetaCalculatorInfo object
 boolean isDiscreteDistribution()
          Implements CalculatorInfo method
 void setData(java.lang.String[] integerParameterString, java.lang.String[] doubleParameterString, java.lang.String[] intervalString)
          Sets the attributes of the BetaCalculator
 void setInverseData(java.lang.String[] integerParameterString, java.lang.String[] doubleParameterString, java.lang.String alphaString)
          Sets the attributes of the BetaCalculator for inverse calculations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BetaCalculatorInfo

public BetaCalculatorInfo()
Constructor for the BetaCalculatorInfo


BetaCalculatorInfo

public BetaCalculatorInfo(double aA,
                          double aB)
constructor for BetaCalculatorInfo Provides parameters and variables for beta distribution

Parameters:
aA - the a parameter of the distirbution, > -1
aB - the b parameter of the distribution, > -1
Method Detail

setData

public void setData(java.lang.String[] integerParameterString,
                    java.lang.String[] doubleParameterString,
                    java.lang.String[] intervalString)
             throws InputException
Sets the attributes of the BetaCalculator

Specified by:
setData in interface CalculatorInfo
Parameters:
integerParameterString - not used
doubleParameterString - strings for a, b
intervalString - strings for x_1, x_2
Throws:
InputException - rejects invalid inputs

setInverseData

public void setInverseData(java.lang.String[] integerParameterString,
                           java.lang.String[] doubleParameterString,
                           java.lang.String alphaString)
                    throws InputException
Sets the attributes of the BetaCalculator for inverse calculations

Specified by:
setInverseData in interface CalculatorInfo
Parameters:
integerParameterString - not used
doubleParameterString - String[] for parameters a and b
alphaString - probability for inverse calculation
Throws:
InputException - rejects invalid inputs

getParameterName

public java.lang.String[] getParameterName()
Gets the ParameterName array {"a", "b"}

Specified by:
getParameterName in interface CalculatorInfo
Returns:
The ParameterName value

isDiscreteDistribution

public boolean isDiscreteDistribution()
Implements CalculatorInfo method

Specified by:
isDiscreteDistribution in interface CalculatorInfo
Returns:
The DiscreteDistribution value (false)

getHelpPageString

public java.lang.String getHelpPageString()
Gets the HelpPageString of the BetaCalculatorInfo

Specified by:
getHelpPageString in interface CalculatorInfo
Returns:
The HelpPageString value

getDistributionName

public java.lang.String getDistributionName()
Gets the distribution name

Specified by:
getDistributionName in interface CalculatorInfo
Returns:
The DistributionName value

getNumberParameters

public int getNumberParameters()
Gets the NumberParameters attribute of the BetaCalculatorInfo object

Returns:
The NumberParameters value

getNumberIntegerParameters

public int getNumberIntegerParameters()
Gets the NumberIntegerParameters attribute of the BetaCalculatorInfo object

Specified by:
getNumberIntegerParameters in interface CalculatorInfo
Returns:
The NumberIntegerParameters value

getIntegerParameters

public int[] getIntegerParameters()
Gets the IntegerParameters attribute of the BetaCalculatorInfo object

Specified by:
getIntegerParameters in interface CalculatorInfo
Returns:
(null)

getDoubleParameters

public double[] getDoubleParameters()
Gets the DoubleParameters attribute of the BetaCalculatorInfo object

Specified by:
getDoubleParameters in interface CalculatorInfo
Returns:
values for {a,b}

getIntegerInterval

public int[] getIntegerInterval()
Gets the IntegerInterval attribute of the BetaCalculatorInfo object

Specified by:
getIntegerInterval in interface CalculatorInfo
Returns:
null

getDoubleInterval

public double[] getDoubleInterval()
Gets the DoubleInterval attribute of the BetaCalculatorInfo object

Specified by:
getDoubleInterval in interface CalculatorInfo
Returns:
{x1, x2}

getCdf

public double getCdf(double x)
Gets the Cummulative beta probability

Specified by:
getCdf in interface CalculatorInfo
Parameters:
x - Description of Parameter
Returns:
The Cdf value, by calling Cern code

getTitle

public java.lang.String getTitle()
Gets the Title attribute for the Beta Calculator

Specified by:
getTitle in interface Description
Returns:
"Beta Distribution"

getDescription

public java.lang.String getDescription()
Gets the Description attribute of the BetaCalculatorInfo object

Specified by:
getDescription in interface Description
Returns:
The Description value

getParameters

public java.lang.String getParameters()
Gets the Parameters description for a Beta distribution

Specified by:
getParameters in interface Description
Returns:
" -1 < a \n -1 < b"

getValues

public java.lang.String getValues()
Gets the Values attribute of the BetaCalculatorInfo object

Specified by:
getValues in interface Description
Returns:
The Values value

calculate

public CalculateAnswer calculate()
Description of the Method

Specified by:
calculate in interface CalculatorInfo
Returns:
Description of the Returned Value

calculateInverse

public CalculateInverseAnswer calculateInverse(int tailChoice)
Description of the Method

Specified by:
calculateInverse in interface CalculatorInfo
Parameters:
tailChoice - Description of Parameter
Returns:
Description of the Returned Value