SSJ
V. labo.

umontreal.iro.lecuyer.charts
Class DiscreteDistIntChart

java.lang.Object
  extended by umontreal.iro.lecuyer.charts.DiscreteDistIntChart

public class DiscreteDistIntChart
extends Object

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)
          .
DiscreteDistIntChart(DiscreteDistributionInt dist, int a, int b)
          .
 
Method Summary
 XYLineChart getCdf()
          .
 XYLineChart getProb()
          .
 void setParam(int a, int b)
          .
 String toLatexCdf(int width, int height)
          .
 String toLatexProb(int width, int height)
          .
 JFrame viewCdf(int width, int height)
          .
 JFrame viewCdf(int width, int height, int a, int b)
          .
 JFrame viewProb(int width, int height)
          .
 JFrame viewProb(int width, int height, int a, int b)
          .
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscreteDistIntChart

public DiscreteDistIntChart(DiscreteDistributionInt dist)
. \begin{tabb}
 Constructor for a new \texttt{DiscreteDistIntChart} instance used ...
 ...ilities of the
 discrete distribution \texttt{dist} over the integers.
 \end{tabb}
distdiscrete distribution to plot


DiscreteDistIntChart

public DiscreteDistIntChart(DiscreteDistributionInt dist,
                            int a,
                            int b)
. \begin{tabb}
 Constructor for a new \texttt{DiscreteDistIntChart} instance used ...
 ...of the
 discrete distribution \texttt{dist} over the interval $[a,b]$.
 \end{tabb}
distcontinuous distribution to plot alower bound of interval bupper bound of interval

Method Detail

viewCdf

public JFrame viewCdf(int width,
                      int height,
                      int a,
                      int b)
. \begin{tabb}
 Displays a chart of the cumulative distribution function (cdf) ove...
 ...t{width} and the \texttt{height} of the chart are measured in pixels.
 \end{tabb}
widthframe width in pixels. heightframe height in pixels. alower bound of interval bupper bound of interval frame containing the chart


viewCdf

public JFrame viewCdf(int width,
                      int height)
. \begin{tabb}
 Similar to method \method{viewCdf}{} above.
 If the interval $[a,b...
 ...mu$\ and $\sigma$\ are the mean and the variance of the distribution.
 \end{tabb}
widthframe width in pixels heightframe height in pixels frame containing the chart


viewProb

public JFrame viewProb(int width,
                       int height,
                       int a,
                       int b)
. \begin{tabb}
 Displays a chart of the probability mass function over the interva...
 ...{width} and
 the \texttt{height} of the chart are measured in pixels.
 \end{tabb}
widthframe width in pixels. heightframe height in pixels. alower bound of interval bupper bound of interval frame containing the chart


viewProb

public JFrame viewProb(int width,
                       int height)
. \begin{tabb}
 Similar to method \method{viewProb}{} above.
 If the interval $[a...
 ...mu$\ and $\sigma$\ are the mean and the variance of the distribution.
 \end{tabb}
widthframe width in pixels. heightframe height in pixels. frame containing the chart


setParam

public void setParam(int a,
                     int b)
. \begin{tabb}
 Sets the parameters $a$\ and $b$\ for this object.
 \end{tabb}
alower bound of interval bupper bound of interval


toLatexCdf

public String toLatexCdf(int width,
                         int height)
. \begin{tabb}
 Exports a chart of the cumulative probability to a \LaTeX\ source ...
 ...h}
 and the \texttt{height} of the chart are measured in centimeters.
 \end{tabb}
widthChart's width in centimeters heightChart's height in centimeters LaTeX source code


toLatexProb

public String toLatexProb(int width,
                          int height)
. \begin{tabb}
 Similar to \method{toLatexCdf}{}, but for the probability instead
 of the cdf.
 \end{tabb}
widthChart's width in centimeters heightChart's height in centimeters LaTeX source code


getCdf

public XYLineChart getCdf()
. \begin{tabb}
 Returns the chart of the cdf.
 \end{tabb}
the chart of the cdf.


getProb

public XYLineChart getProb()
. \begin{tabb}
 Returns the chart of the probability.
 \end{tabb}
the chart of the probability.


SSJ
V. labo.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.