Package org.hipparchus.samples
Class IntegerDistributionComparison
java.lang.Object
org.hipparchus.samples.IntegerDistributionComparison
Displays pdf/cdf for integer distributions.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Main frame for displaying distributions. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Program entry point.
-
Constructor Details
-
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 Details
-
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
Program entry point.- Parameters:
args
- program arguments (unused here)
-