@Test public void testIterateToFindRangeBounds2_XYDataset() { List<Comparable> visibleSeriesKeys = new ArrayList<Comparable>(); Range xRange = new Range(0.0, 10.0); XYSeriesCollection dataset = new XYSeriesCollection(); Range r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertNull(r); XYSeries s1 = new XYSeries("A"); dataset.addSeries(s1); visibleSeriesKeys.add("A"); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertNull(r); s1.add(1.0, null); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertNull(r); s1.add(2.0, Double.NaN); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertNull(r); s1.add(3.0, 5.0); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertEquals(new Range(5.0, 5.0), r); s1.add(4.0, 6.0); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertEquals(new Range(5.0, 6.0), r); XYSeries s2 = new XYSeries("B"); dataset.addSeries(s2); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertEquals(new Range(5.0, 6.0), r); visibleSeriesKeys.add("B"); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertEquals(new Range(5.0, 6.0), r); s2.add(5.0, 15.0); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertEquals(new Range(5.0, 15.0), r); s2.add(15.0, 150.0); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, xRange, false); assertEquals(new Range(5.0, 15.0), r); r = DatasetUtilities.iterateToFindRangeBounds(dataset, visibleSeriesKeys, new Range(0.0, 20.0), false); assertEquals(new Range(5.0, 150.0), r); }
public static Range iterateToFindRangeBounds(CategoryDataset dataset, List<Comparable> visibleSeriesKeys, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int columnCount = dataset.getColumnCount(); if (includeInterval && dataset instanceof BoxAndWhiskerCategoryDataset) { BoxAndWhiskerCategoryDataset bx = (BoxAndWhiskerCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); int itemCount = dataset.getColumnCount(); for (int item = 0; item < itemCount; item++) { Number lvalue = bx.getMinRegularValue(series, item); if (lvalue == null) { lvalue = bx.getValue(series, item); } Number uvalue = bx.getMaxRegularValue(series, item); if (uvalue == null) { uvalue = bx.getValue(series, item); } if (lvalue != null) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof IntervalCategoryDataset) { IntervalCategoryDataset icd = (IntervalCategoryDataset) dataset; Number lvalue, uvalue; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { lvalue = icd.getStartValue(series, column); uvalue = icd.getEndValue(series, column); if (lvalue != null && !Double.isNaN(lvalue.doubleValue())) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null && !Double.isNaN(uvalue.doubleValue())) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof MultiValueCategoryDataset) { MultiValueCategoryDataset mvcd = (MultiValueCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { List<Number> values = mvcd.getValues(series, column); for (Number o : values) { double v = o.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } else if (includeInterval && dataset instanceof StatisticalCategoryDataset) { StatisticalCategoryDataset scd = (StatisticalCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number meanN = scd.getMeanValue(series, column); if (meanN != null) { double std = 0.0; Number stdN = scd.getStdDevValue(series, column); if (stdN != null) { std = stdN.doubleValue(); if (Double.isNaN(std)) { std = 0.0; } } double mean = meanN.doubleValue(); if (!Double.isNaN(mean)) { minimum = Math.min(minimum, mean - std); maximum = Math.max(maximum, mean + std); } } } } } else { for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number value = dataset.getValue(series, column); if (value != null) { double v = value.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } }
DatasetUtilities { public static Range iterateToFindRangeBounds(CategoryDataset dataset, List<Comparable> visibleSeriesKeys, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int columnCount = dataset.getColumnCount(); if (includeInterval && dataset instanceof BoxAndWhiskerCategoryDataset) { BoxAndWhiskerCategoryDataset bx = (BoxAndWhiskerCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); int itemCount = dataset.getColumnCount(); for (int item = 0; item < itemCount; item++) { Number lvalue = bx.getMinRegularValue(series, item); if (lvalue == null) { lvalue = bx.getValue(series, item); } Number uvalue = bx.getMaxRegularValue(series, item); if (uvalue == null) { uvalue = bx.getValue(series, item); } if (lvalue != null) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof IntervalCategoryDataset) { IntervalCategoryDataset icd = (IntervalCategoryDataset) dataset; Number lvalue, uvalue; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { lvalue = icd.getStartValue(series, column); uvalue = icd.getEndValue(series, column); if (lvalue != null && !Double.isNaN(lvalue.doubleValue())) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null && !Double.isNaN(uvalue.doubleValue())) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof MultiValueCategoryDataset) { MultiValueCategoryDataset mvcd = (MultiValueCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { List<Number> values = mvcd.getValues(series, column); for (Number o : values) { double v = o.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } else if (includeInterval && dataset instanceof StatisticalCategoryDataset) { StatisticalCategoryDataset scd = (StatisticalCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number meanN = scd.getMeanValue(series, column); if (meanN != null) { double std = 0.0; Number stdN = scd.getStdDevValue(series, column); if (stdN != null) { std = stdN.doubleValue(); if (Double.isNaN(std)) { std = 0.0; } } double mean = meanN.doubleValue(); if (!Double.isNaN(mean)) { minimum = Math.min(minimum, mean - std); maximum = Math.max(maximum, mean + std); } } } } } else { for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number value = dataset.getValue(series, column); if (value != null) { double v = value.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } } }
DatasetUtilities { public static Range iterateToFindRangeBounds(CategoryDataset dataset, List<Comparable> visibleSeriesKeys, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int columnCount = dataset.getColumnCount(); if (includeInterval && dataset instanceof BoxAndWhiskerCategoryDataset) { BoxAndWhiskerCategoryDataset bx = (BoxAndWhiskerCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); int itemCount = dataset.getColumnCount(); for (int item = 0; item < itemCount; item++) { Number lvalue = bx.getMinRegularValue(series, item); if (lvalue == null) { lvalue = bx.getValue(series, item); } Number uvalue = bx.getMaxRegularValue(series, item); if (uvalue == null) { uvalue = bx.getValue(series, item); } if (lvalue != null) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof IntervalCategoryDataset) { IntervalCategoryDataset icd = (IntervalCategoryDataset) dataset; Number lvalue, uvalue; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { lvalue = icd.getStartValue(series, column); uvalue = icd.getEndValue(series, column); if (lvalue != null && !Double.isNaN(lvalue.doubleValue())) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null && !Double.isNaN(uvalue.doubleValue())) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof MultiValueCategoryDataset) { MultiValueCategoryDataset mvcd = (MultiValueCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { List<Number> values = mvcd.getValues(series, column); for (Number o : values) { double v = o.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } else if (includeInterval && dataset instanceof StatisticalCategoryDataset) { StatisticalCategoryDataset scd = (StatisticalCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number meanN = scd.getMeanValue(series, column); if (meanN != null) { double std = 0.0; Number stdN = scd.getStdDevValue(series, column); if (stdN != null) { std = stdN.doubleValue(); if (Double.isNaN(std)) { std = 0.0; } } double mean = meanN.doubleValue(); if (!Double.isNaN(mean)) { minimum = Math.min(minimum, mean - std); maximum = Math.max(maximum, mean + std); } } } } } else { for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number value = dataset.getValue(series, column); if (value != null) { double v = value.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } } private  DatasetUtilities(); }
DatasetUtilities { public static Range iterateToFindRangeBounds(CategoryDataset dataset, List<Comparable> visibleSeriesKeys, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int columnCount = dataset.getColumnCount(); if (includeInterval && dataset instanceof BoxAndWhiskerCategoryDataset) { BoxAndWhiskerCategoryDataset bx = (BoxAndWhiskerCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); int itemCount = dataset.getColumnCount(); for (int item = 0; item < itemCount; item++) { Number lvalue = bx.getMinRegularValue(series, item); if (lvalue == null) { lvalue = bx.getValue(series, item); } Number uvalue = bx.getMaxRegularValue(series, item); if (uvalue == null) { uvalue = bx.getValue(series, item); } if (lvalue != null) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof IntervalCategoryDataset) { IntervalCategoryDataset icd = (IntervalCategoryDataset) dataset; Number lvalue, uvalue; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { lvalue = icd.getStartValue(series, column); uvalue = icd.getEndValue(series, column); if (lvalue != null && !Double.isNaN(lvalue.doubleValue())) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null && !Double.isNaN(uvalue.doubleValue())) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof MultiValueCategoryDataset) { MultiValueCategoryDataset mvcd = (MultiValueCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { List<Number> values = mvcd.getValues(series, column); for (Number o : values) { double v = o.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } else if (includeInterval && dataset instanceof StatisticalCategoryDataset) { StatisticalCategoryDataset scd = (StatisticalCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number meanN = scd.getMeanValue(series, column); if (meanN != null) { double std = 0.0; Number stdN = scd.getStdDevValue(series, column); if (stdN != null) { std = stdN.doubleValue(); if (Double.isNaN(std)) { std = 0.0; } } double mean = meanN.doubleValue(); if (!Double.isNaN(mean)) { minimum = Math.min(minimum, mean - std); maximum = Math.max(maximum, mean + std); } } } } } else { for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number value = dataset.getValue(series, column); if (value != null) { double v = value.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } } private  DatasetUtilities(); static double calculatePieDatasetTotal(PieDataset dataset); static PieDataset createPieDatasetForRow(CategoryDataset dataset,
                                                    Comparable rowKey); static PieDataset createPieDatasetForRow(CategoryDataset dataset,
                                                    int row); static PieDataset createPieDatasetForColumn(CategoryDataset dataset,
                                                       Comparable columnKey); static PieDataset createPieDatasetForColumn(CategoryDataset dataset,
                                                       int column); static PieDataset createConsolidatedPieDataset(PieDataset source,
            Comparable key, double minimumPercent); static PieDataset createConsolidatedPieDataset(PieDataset source,
            Comparable key, double minimumPercent, int minItems); static CategoryDataset createCategoryDataset(String rowKeyPrefix,
            String columnKeyPrefix, double[][] data); static CategoryDataset createCategoryDataset(String rowKeyPrefix,
            String columnKeyPrefix, Number[][] data); static CategoryDataset createCategoryDataset(Comparable[] rowKeys,
            Comparable[] columnKeys, double[][] data); static CategoryDataset createCategoryDataset(Comparable rowKey,
                                                        KeyedValues rowData); static XYDataset sampleFunction2D(Function2D f, double start,
            double end, int samples, Comparable seriesKey); static XYSeries sampleFunction2DToSeries(Function2D f,
            double start, double end, int samples, Comparable seriesKey); static boolean isEmptyOrNull(PieDataset dataset); static boolean isEmptyOrNull(CategoryDataset dataset); static boolean isEmptyOrNull(XYDataset dataset); static Range findDomainBounds(XYDataset dataset); static Range findDomainBounds(XYDataset dataset,
                                         boolean includeInterval); static Range findDomainBounds(XYDataset dataset,
            List<Comparable> visibleSeriesKeys, boolean includeInterval); static Range iterateDomainBounds(XYDataset dataset); static Range iterateDomainBounds(XYDataset dataset,
                                            boolean includeInterval); static Range findRangeBounds(CategoryDataset dataset); static Range findRangeBounds(CategoryDataset dataset,
                                        boolean includeInterval); static Range findRangeBounds(CategoryDataset dataset,
            List<Comparable> visibleSeriesKeys, boolean includeInterval); static Range findRangeBounds(XYDataset dataset); static Range findRangeBounds(XYDataset dataset,
                                        boolean includeInterval); static Range findRangeBounds(XYDataset dataset,
            List<Comparable> visibleSeriesKeys, Range xRange, boolean includeInterval); static Range iterateRangeBounds(CategoryDataset dataset); static Range iterateRangeBounds(CategoryDataset dataset,
            boolean includeInterval); static Range iterateToFindRangeBounds(CategoryDataset dataset,
            List<Comparable> visibleSeriesKeys, boolean includeInterval); static Range iterateRangeBounds(XYDataset dataset); static Range iterateRangeBounds(XYDataset dataset,
            boolean includeInterval); static Range findZBounds(XYZDataset dataset); static Range findZBounds(XYZDataset dataset,
                                        boolean includeInterval); static Range findZBounds(XYZDataset dataset,
            List<Comparable> visibleSeriesKeys, Range xRange, boolean includeInterval); static Range iterateZBounds(XYZDataset dataset); static Range iterateZBounds(XYZDataset dataset,
            boolean includeInterval); static Range iterateToFindDomainBounds(XYDataset dataset,
            List<Comparable> visibleSeriesKeys, boolean includeInterval); static Range iterateToFindRangeBounds(XYDataset dataset,
            List<Comparable> visibleSeriesKeys, Range xRange, boolean includeInterval); static Range iterateToFindZBounds(XYZDataset dataset,
            List<Comparable> visibleSeriesKeys, Range xRange, boolean includeInterval); static Number findMinimumDomainValue(XYDataset dataset); static Number findMaximumDomainValue(XYDataset dataset); static Number findMinimumRangeValue(CategoryDataset dataset); static Number findMinimumRangeValue(XYDataset dataset); static Number findMaximumRangeValue(CategoryDataset dataset); static Number findMaximumRangeValue(XYDataset dataset); static Range findStackedRangeBounds(CategoryDataset dataset); static Range findStackedRangeBounds(CategoryDataset dataset,
            double base); static Range findStackedRangeBounds(CategoryDataset dataset,
                                               KeyToGroupMap map); static Number findMinimumStackedRangeValue(CategoryDataset dataset); static Number findMaximumStackedRangeValue(CategoryDataset dataset); static Range findStackedRangeBounds(TableXYDataset dataset); static Range findStackedRangeBounds(TableXYDataset dataset,
                                               double base); static double calculateStackTotal(TableXYDataset dataset, int item); static Range findCumulativeRangeBounds(CategoryDataset dataset); static double findYValue(XYDataset dataset, int series, double x); static int[] findItemIndicesForX(XYDataset dataset, int series,
            double x); }
DatasetUtilities { public static Range iterateToFindRangeBounds(CategoryDataset dataset, List<Comparable> visibleSeriesKeys, boolean includeInterval) { ParamChecks.nullNotPermitted(dataset, "dataset"); ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys"); double minimum = Double.POSITIVE_INFINITY; double maximum = Double.NEGATIVE_INFINITY; int columnCount = dataset.getColumnCount(); if (includeInterval && dataset instanceof BoxAndWhiskerCategoryDataset) { BoxAndWhiskerCategoryDataset bx = (BoxAndWhiskerCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); int itemCount = dataset.getColumnCount(); for (int item = 0; item < itemCount; item++) { Number lvalue = bx.getMinRegularValue(series, item); if (lvalue == null) { lvalue = bx.getValue(series, item); } Number uvalue = bx.getMaxRegularValue(series, item); if (uvalue == null) { uvalue = bx.getValue(series, item); } if (lvalue != null) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof IntervalCategoryDataset) { IntervalCategoryDataset icd = (IntervalCategoryDataset) dataset; Number lvalue, uvalue; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { lvalue = icd.getStartValue(series, column); uvalue = icd.getEndValue(series, column); if (lvalue != null && !Double.isNaN(lvalue.doubleValue())) { minimum = Math.min(minimum, lvalue.doubleValue()); } if (uvalue != null && !Double.isNaN(uvalue.doubleValue())) { maximum = Math.max(maximum, uvalue.doubleValue()); } } } } else if (includeInterval && dataset instanceof MultiValueCategoryDataset) { MultiValueCategoryDataset mvcd = (MultiValueCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { List<Number> values = mvcd.getValues(series, column); for (Number o : values) { double v = o.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } else if (includeInterval && dataset instanceof StatisticalCategoryDataset) { StatisticalCategoryDataset scd = (StatisticalCategoryDataset) dataset; for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number meanN = scd.getMeanValue(series, column); if (meanN != null) { double std = 0.0; Number stdN = scd.getStdDevValue(series, column); if (stdN != null) { std = stdN.doubleValue(); if (Double.isNaN(std)) { std = 0.0; } } double mean = meanN.doubleValue(); if (!Double.isNaN(mean)) { minimum = Math.min(minimum, mean - std); maximum = Math.max(maximum, mean + std); } } } } } else { for (Comparable seriesKey : visibleSeriesKeys) { int series = dataset.getRowIndex(seriesKey); for (int column = 0; column < columnCount; column++) { Number value = dataset.getValue(series, column); if (value != null) { double v = value.doubleValue(); if (!Double.isNaN(v)) { minimum = Math.min(minimum, v); maximum = Math.max(maximum, v); } } } } } if (minimum == Double.POSITIVE_INFINITY) { return null; } else { return new Range(minimum, maximum); } } private  DatasetUtilities(); static double calculatePieDatasetTotal(PieDataset dataset); static PieDataset createPieDatasetForRow(CategoryDataset dataset,
                                                    Comparable rowKey); static PieDataset createPieDatasetForRow(CategoryDataset dataset,
                                                    int row); static PieDataset createPieDatasetForColumn(CategoryDataset dataset,
                                                       Comparable columnKey); static PieDataset createPieDatasetForColumn(CategoryDataset dataset,
                                                       int column); static PieDataset createConsolidatedPieDataset(PieDataset source,
            Comparable key, double minimumPercent); static PieDataset createConsolidatedPieDataset(PieDataset source,
            Comparable key, double minimumPercent, int minItems); static CategoryDataset createCategoryDataset(String rowKeyPrefix,
            String columnKeyPrefix, double[][] data); static CategoryDataset createCategoryDataset(String rowKeyPrefix,
            String columnKeyPrefix, Number[][] data); static CategoryDataset createCategoryDataset(Comparable[] rowKeys,
            Comparable[] columnKeys, double[][] data); static CategoryDataset createCategoryDataset(Comparable rowKey,
                                                        KeyedValues rowData); static XYDataset sampleFunction2D(Function2D f, double start,
            double end, int samples, Comparable seriesKey); static XYSeries sampleFunction2DToSeries(Function2D f,
            double start, double end, int samples, Comparable seriesKey); static boolean isEmptyOrNull(PieDataset dataset); static boolean isEmptyOrNull(CategoryDataset dataset); static boolean isEmptyOrNull(XYDataset dataset); static Range findDomainBounds(XYDataset dataset); static Range findDomainBounds(XYDataset dataset,
                                         boolean includeInterval); static Range findDomainBounds(XYDataset dataset,
            List<Comparable> visibleSeriesKeys, boolean includeInterval); static Range iterateDomainBounds(XYDataset dataset); static Range iterateDomainBounds(XYDataset dataset,
                                            boolean includeInterval); static Range findRangeBounds(CategoryDataset dataset); static Range findRangeBounds(CategoryDataset dataset,
                                        boolean includeInterval); static Range findRangeBounds(CategoryDataset dataset,
            List<Comparable> visibleSeriesKeys, boolean includeInterval); static Range findRangeBounds(XYDataset dataset); static Range findRangeBounds(XYDataset dataset,
                                        boolean includeInterval); static Range findRangeBounds(XYDataset dataset,
            List<Comparable> visibleSeriesKeys, Range xRange, boolean includeInterval); static Range iterateRangeBounds(CategoryDataset dataset); static Range iterateRangeBounds(CategoryDataset dataset,
            boolean includeInterval); static Range iterateToFindRangeBounds(CategoryDataset dataset,
            List<Comparable> visibleSeriesKeys, boolean includeInterval); static Range iterateRangeBounds(XYDataset dataset); static Range iterateRangeBounds(XYDataset dataset,
            boolean includeInterval); static Range findZBounds(XYZDataset dataset); static Range findZBounds(XYZDataset dataset,
                                        boolean includeInterval); static Range findZBounds(XYZDataset dataset,
            List<Comparable> visibleSeriesKeys, Range xRange, boolean includeInterval); static Range iterateZBounds(XYZDataset dataset); static Range iterateZBounds(XYZDataset dataset,
            boolean includeInterval); static Range iterateToFindDomainBounds(XYDataset dataset,
            List<Comparable> visibleSeriesKeys, boolean includeInterval); static Range iterateToFindRangeBounds(XYDataset dataset,
            List<Comparable> visibleSeriesKeys, Range xRange, boolean includeInterval); static Range iterateToFindZBounds(XYZDataset dataset,
            List<Comparable> visibleSeriesKeys, Range xRange, boolean includeInterval); static Number findMinimumDomainValue(XYDataset dataset); static Number findMaximumDomainValue(XYDataset dataset); static Number findMinimumRangeValue(CategoryDataset dataset); static Number findMinimumRangeValue(XYDataset dataset); static Number findMaximumRangeValue(CategoryDataset dataset); static Number findMaximumRangeValue(XYDataset dataset); static Range findStackedRangeBounds(CategoryDataset dataset); static Range findStackedRangeBounds(CategoryDataset dataset,
            double base); static Range findStackedRangeBounds(CategoryDataset dataset,
                                               KeyToGroupMap map); static Number findMinimumStackedRangeValue(CategoryDataset dataset); static Number findMaximumStackedRangeValue(CategoryDataset dataset); static Range findStackedRangeBounds(TableXYDataset dataset); static Range findStackedRangeBounds(TableXYDataset dataset,
                                               double base); static double calculateStackTotal(TableXYDataset dataset, int item); static Range findCumulativeRangeBounds(CategoryDataset dataset); static double findYValue(XYDataset dataset, int series, double x); static int[] findItemIndicesForX(XYDataset dataset, int series,
            double x);  }