Class IntegerDistributionComparison


  • public class IntegerDistributionComparison
    extends Object
    Displays pdf/cdf for integer distributions.
    • Constructor Detail

      • IntegerDistributionComparison

        public IntegerDistributionComparison()
        Empty constructor.

        This constructor is not strictly necessary, but it prevents spurious javadoc warnings with JDK 18 and later.

        Since:
        3.0
    • Method Detail

      • addPDFSeries

        public static void addPDFSeries​(com.xeiam.xchart.Chart chart,
                                        IntegerDistribution distribution,
                                        String desc,
                                        int lowerBound,
                                        int upperBound)
        Add a PDF series.
        Parameters:
        chart - chart to which series must be added
        distribution - integer distribution to draw
        desc - description
        lowerBound - lower bound
        upperBound - upper bound
      • addCDFSeries

        public static void addCDFSeries​(com.xeiam.xchart.Chart chart,
                                        IntegerDistribution distribution,
                                        String desc,
                                        int lowerBound,
                                        int upperBound)
        Add a CDF series.
        Parameters:
        chart - chart to which series must be added
        distribution - integer distribution to draw
        desc - description
        lowerBound - lower bound
        upperBound - upper bound
      • createChart

        public static com.xeiam.xchart.Chart createChart​(String title,
                                                         int minX,
                                                         int maxX,
                                                         com.xeiam.xchart.StyleManager.LegendPosition position)
        Create a chart.
        Parameters:
        title - chart title
        minX - minimum abscissa
        maxX - maximum abscissa
        position - position of the legend
        Returns:
        created chart
      • createComponent

        public static JComponent createComponent​(String distributionName,
                                                 int minX,
                                                 int maxX,
                                                 String[] seriesText,
                                                 IntegerDistribution... series)
        Create a component.
        Parameters:
        distributionName - name of the distribution
        minX - minimum abscissa
        maxX - maximum abscissa
        seriesText - descriptions of the series
        series - series
        Returns:
        create component
      • main

        public static void main​(String[] args)
        Program entry point.
        Parameters:
        args - program arguments (unused here)