Package org.hipparchus.samples
Class RealDistributionComparison
java.lang.Object
org.hipparchus.samples.RealDistributionComparison
Displays pdf/cdf for real distributions.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Main frame for displaying distributions. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCDFSeries
(com.xeiam.xchart.Chart chart, RealDistribution distribution, String desc, int lowerBound, int upperBound) Add a CDF series.static void
addPDFSeries
(com.xeiam.xchart.Chart chart, RealDistribution 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, RealDistribution... series) Create a component.static void
Program entry point.
-
Method Details
-
addPDFSeries
public static void addPDFSeries(com.xeiam.xchart.Chart chart, RealDistribution 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, RealDistribution 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, RealDistribution... 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)
-