public class DiscreteDistIntChart
extends java.lang.Object
| Constructor and Description |
|---|
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].
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.String |
toLatexCdf(int width,
int height)
Exports a chart of the cumulative probability to a LATEX source code using
PGF/TikZ.
|
java.lang.String |
toLatexProb(int width,
int height)
Similar to
toLatexCdf, but for the probability instead
of the cdf. |
javax.swing.JFrame |
viewCdf(int width,
int height)
Similar to method
viewCdf above. |
javax.swing.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.
|
javax.swing.JFrame |
viewProb(int width,
int height)
Similar to method
viewProb above. |
javax.swing.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.
|
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 intervalpublic javax.swing.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 intervalpublic javax.swing.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 pixelspublic javax.swing.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 intervalpublic javax.swing.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 java.lang.String toLatexCdf(int width,
int height)
width - Chart's width in centimetersheight - Chart's height in centimeterspublic java.lang.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 centimeterspublic XYLineChart getCdf()
public XYLineChart getProb()
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.