Package org.hipparchus.samples
Class IntegerDistributionComparison
- java.lang.Object
-
- org.hipparchus.samples.IntegerDistributionComparison
-
public class IntegerDistributionComparison extends Object
Displays pdf/cdf for integer distributions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IntegerDistributionComparison.Display
Main frame for displaying distributions.
-
Constructor Summary
Constructors Constructor Description IntegerDistributionComparison()
Empty constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addCDFSeries(com.xeiam.xchart.Chart chart, IntegerDistribution distribution, String desc, int lowerBound, int upperBound)
Add a CDF series.static void
addPDFSeries(com.xeiam.xchart.Chart chart, IntegerDistribution distribution, String desc, int lowerBound, int upperBound)
Add a PDF series.static com.xeiam.xchart.Chart
createChart(String title, int minX, int maxX, com.xeiam.xchart.StyleManager.LegendPosition position)
Create a chart.static JComponent
createComponent(String distributionName, int minX, int maxX, String[] seriesText, IntegerDistribution... series)
Create a component.static void
main(String[] args)
Program entry point.
-
-
-
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 addeddistribution
- integer distribution to drawdesc
- descriptionlowerBound
- lower boundupperBound
- 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 addeddistribution
- integer distribution to drawdesc
- descriptionlowerBound
- lower boundupperBound
- 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 titleminX
- minimum abscissamaxX
- maximum abscissaposition
- 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 distributionminX
- minimum abscissamaxX
- maximum abscissaseriesText
- descriptions of the seriesseries
- series- Returns:
- create component
-
main
public static void main(String[] args)
Program entry point.- Parameters:
args
- program arguments (unused here)
-
-