Documentation of 'umontreal.iro.lecuyer.charts.ContinuousDistChart' Java class
ContinuousDistChart
umontreal.iro.lecuyer.charts

Class ContinuousDistChart



  • public class ContinuousDistChart
    extends java.lang.Object
    This class provides tools to plot the density and the cumulative probability of a continuous probability distribution.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void setParam(double a, double b, int m)
      Sets the parameters a, b and m for this object.
      java.lang.String toLatexCdf(int width, int height)
      Exports a chart of the cdf to a LATEX source code using PGF/TikZ.
      java.lang.String toLatexDensity(int width, int height)
      Similar to toLatexCdf, but for the probability density instead of the cdf.
      javax.swing.JFrame viewCdf(int width, int height)
      Displays a chart of the cumulative distribution function (cdf) on the screen using Swing.
      javax.swing.JFrame viewDensity(int width, int height)
      Similar to viewCdf, but for the probability density instead of the cdf.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContinuousDistChart

        public ContinuousDistChart(ContinuousDistribution dist,
                                   double a,
                                   double b,
                                   int m)
        Constructor for a new ContinuousDistChart instance. It will plot the continuous distribution dist over the interval [a, b], using m + 1 equidistant sample points.
        Parameters:
        dist - continuous distribution to plot
        a - lower bound of interval
        b - upper bound of interval
        m - number of steps
    • Method Detail

      • viewCdf

        public javax.swing.JFrame viewCdf(int width,
                                          int height)
        Displays a chart of the cumulative distribution function (cdf) on the screen using Swing. This method creates an application containing a chart panel displaying the chart. The created frame is positioned on-screen, and displayed before it is returned. The width and the height of the chart are measured in pixels.
        Parameters:
        width - frame width in pixels
        height - frame height in pixels
        Returns:
        frame containing the chart
      • viewDensity

        public javax.swing.JFrame viewDensity(int width,
                                              int height)
        Similar to viewCdf, but for the probability density instead of the cdf.
        Parameters:
        width - frame width in pixels
        height - frame height in pixels
        Returns:
        frame containing the chart
      • toLatexCdf

        public java.lang.String toLatexCdf(int width,
                                           int height)
        Exports a chart of the cdf to a LATEX source code using PGF/TikZ. This method constructs and returns a string that can be written to a LATEX document to render the plot. width and height represents the width and the height of the produced chart. These dimensions do not take into account the axes and labels extra space. The width and the height of the chart are measured in centimeters.
        Parameters:
        width - Chart's width in centimeters
        height - Chart's height in centimeters
        Returns:
        LaTeX source code
      • toLatexDensity

        public java.lang.String toLatexDensity(int width,
                                               int height)
        Similar to toLatexCdf, but for the probability density instead of the cdf.
        Parameters:
        width - Chart's width in centimeters
        height - Chart's height in centimeters
        Returns:
        LaTeX source code
      • setParam

        public void setParam(double a,
                             double b,
                             int m)
        Sets the parameters a, b and m for this object.
        Parameters:
        a - lower bound of interval
        b - upper bound of interval
        m - number of points in the plot minus one

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.