|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.charts.DiscreteDistIntChart
public class DiscreteDistIntChart
This class provides tools to plot the mass function and the cumulative probability of a discrete probability distribution over the integers.
Constructor Summary | |
---|---|
DiscreteDistIntChart(DiscreteDistributionInt dist)
Constructor for a new DiscreteDistIntChart instance used to plot the probabilities of the discrete distribution dist over the integers. |
|
DiscreteDistIntChart(DiscreteDistributionInt dist,
int a,
int b)
Constructor for a new DiscreteDistIntChart instance used to plot the probabilities of the discrete distribution dist over the interval [a, b]. |
Method Summary | |
---|---|
XYLineChart |
getCdf()
Returns the chart of the cdf. |
XYLineChart |
getProb()
Returns the chart of the probability. |
void |
setParam(int a,
int b)
Sets the parameters a and b for this object. |
String |
toLatexCdf(int width,
int height)
Exports a chart of the cumulative probability to a LATEX source code using PGF/TikZ. |
String |
toLatexProb(int width,
int height)
Similar to toLatexCdf , but for the probability instead
of the cdf. |
JFrame |
viewCdf(int width,
int height)
Similar to method viewCdf above. |
JFrame |
viewCdf(int width,
int height,
int a,
int b)
Displays a chart of the cumulative distribution function (cdf) over the interval [a, b] on the screen using Swing. |
JFrame |
viewProb(int width,
int height)
Similar to method viewProb above. |
JFrame |
viewProb(int width,
int height,
int a,
int b)
Displays a chart of the probability mass function over the interval [a, b] on the screen using Swing. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiscreteDistIntChart(DiscreteDistributionInt dist)
dist
- discrete distribution to plotpublic DiscreteDistIntChart(DiscreteDistributionInt dist, int a, int b)
dist
- continuous distribution to plota
- lower bound of intervalb
- upper bound of intervalMethod Detail |
---|
public JFrame viewCdf(int width, int height, int a, int b)
width
- frame width in pixels.height
- frame height in pixels.a
- lower bound of intervalb
- upper bound of interval
public JFrame viewCdf(int width, int height)
viewCdf
above.
If the interval [a, b] for the graph is
not defined, it will be set automatically to
[μ -3σ, μ +3σ],
where μ and σ are the mean and the variance of the distribution.
width
- frame width in pixelsheight
- frame height in pixels
public JFrame viewProb(int width, int height, int a, int b)
width
- frame width in pixels.height
- frame height in pixels.a
- lower bound of intervalb
- upper bound of interval
public JFrame viewProb(int width, int height)
viewProb
above.
If the interval [a, b] for the graph is
not defined, it will be set automatically to
[μ -3σ, μ +3σ],
where μ and σ are the mean and the variance of the distribution.
width
- frame width in pixels.height
- frame height in pixels.
public void setParam(int a, int b)
a
- lower bound of intervalb
- upper bound of intervalpublic String toLatexCdf(int width, int height)
width
- Chart's width in centimetersheight
- Chart's height in centimeters
public String toLatexProb(int width, int height)
toLatexCdf
, but for the probability instead
of the cdf.
width
- Chart's width in centimetersheight
- Chart's height in centimeters
public XYLineChart getCdf()
public XYLineChart getProb()
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |