|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uah.math.distributions.Distribution edu.uah.math.distributions.TriangleDistribution
public class TriangleDistribution
This class models the triangle distribution on a specified interval. If (X, Y) is uniformly distributed on a triangular region, then X and Y have triangular distribuitons.
Field Summary | |
---|---|
static int |
DOWN
|
static int |
UP
|
Fields inherited from class edu.uah.math.distributions.Distribution |
---|
CONTINUOUS, DISCRETE, MIXED |
Constructor Summary | |
---|---|
TriangleDistribution()
This default constructor creates a new triangle distribution on the interval (0, 1) with positive slope. |
|
TriangleDistribution(double a,
double b,
int i)
This general constructor creates a new triangle distribution on a specified interval and with a specified orientation. |
Method Summary | |
---|---|
double |
getCDF(double x)
This method computes the cumulative distribution function. |
double |
getDensity(double x)
This method computes the density. |
double |
getLowerBound()
This method returns the lower bound |
double |
getMaxDensity()
This method computes the maximum value of the density function. |
double |
getMean()
This method computes the mean. |
int |
getOrientation()
This method returns the orientation. |
double |
getUpperBound()
This method returns the upper bound. |
double |
getVariance()
This method computes the variance. |
void |
setLowerBound(double a)
This method sets the lower bound |
void |
setOrientation(int i)
This method sets the orientation. |
void |
setParameters(double a,
double b,
int i)
This method sets the parameters: the minimum value, maximum value, and orientation. |
void |
setUpperBound(double b)
This method sets the upper bound. |
double |
simulate()
This method simulates a value from the distribution. |
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of the parameters. |
Methods inherited from class edu.uah.math.distributions.Distribution |
---|
getDomain, getFailureRate, getMedian, getMGF, getMoment, getMoment, getPGF, getQuantile, getSD, getType, setDomain, setDomain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UP
public static final int DOWN
Constructor Detail |
---|
public TriangleDistribution(double a, double b, int i)
a
- the left endpoint of the domainb
- the right endpoint of the domain
param i the orientation (UP or DOWN)public TriangleDistribution()
Method Detail |
---|
public void setParameters(double a, double b, int i)
a
- the left endpoint of the domainb
- the right endpoint of the domaini
- the orientation (UP or DOWN)public double getDensity(double x)
getDensity
in class Distribution
x
- a number in the domain of the distribution
public double getMaxDensity()
getMaxDensity
in class Distribution
public double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public void setLowerBound(double a)
a
- the lower boundpublic double getLowerBound()
public void setUpperBound(double b)
b
- the upper boundpublic double getUpperBound()
public void setOrientation(int i)
i
- the orientation (UP or DOWN)public int getOrientation()
public double simulate()
simulate
in class Distribution
public double getCDF(double x)
getCDF
in class Distribution
x
- a number in the domain of the distribution
public java.lang.String toString()
toString
in class Distribution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |