当前位置: 首页>>代码示例>>Java>>正文


Java XYZDataset.getItemCount方法代码示例

本文整理汇总了Java中org.jfree.data.xy.XYZDataset.getItemCount方法的典型用法代码示例。如果您正苦于以下问题:Java XYZDataset.getItemCount方法的具体用法?Java XYZDataset.getItemCount怎么用?Java XYZDataset.getItemCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.data.xy.XYZDataset的用法示例。


在下文中一共展示了XYZDataset.getItemCount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: iterateZBounds

import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
 * Iterates over the data items of the xyz dataset to find
 * the z-dimension bounds.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param includeInterval  include the z-interval (if the dataset has a
 *     z-interval.
 *
 * @return The range (possibly <code>null</code>).
 */
public static Range iterateZBounds(XYZDataset dataset,
        boolean includeInterval) {
    double minimum = Double.POSITIVE_INFINITY;
    double maximum = Double.NEGATIVE_INFINITY;
    int seriesCount = dataset.getSeriesCount();

    for (int series = 0; series < seriesCount; series++) {
        int itemCount = dataset.getItemCount(series);
        for (int item = 0; item < itemCount; item++) {
            double value = dataset.getZValue(series, item);
            if (!Double.isNaN(value)) {
                minimum = Math.min(minimum, value);
                maximum = Math.max(maximum, value);
            }
        }
    }

    if (minimum == Double.POSITIVE_INFINITY) {
        return null;
    }
    else {
        return new Range(minimum, maximum);
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:35,代码来源:DatasetUtilities.java

示例2: iterateZBounds

import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
 * Iterates over the data items of the xyz dataset to find
 * the z-dimension bounds.
 *
 * @param dataset  the dataset ({@code null} not permitted).
 * @param includeInterval  include the z-interval (if the dataset has a
 *     z-interval.
 *
 * @return The range (possibly {@code null}).
 */
public static Range iterateZBounds(XYZDataset dataset,
        boolean includeInterval) {
    double minimum = Double.POSITIVE_INFINITY;
    double maximum = Double.NEGATIVE_INFINITY;
    int seriesCount = dataset.getSeriesCount();

    for (int series = 0; series < seriesCount; series++) {
        int itemCount = dataset.getItemCount(series);
        for (int item = 0; item < itemCount; item++) {
            double value = dataset.getZValue(series, item);
            if (!Double.isNaN(value)) {
                minimum = Math.min(minimum, value);
                maximum = Math.max(maximum, value);
            }
        }
    }

    if (minimum == Double.POSITIVE_INFINITY) {
        return null;
    }
    else {
        return new Range(minimum, maximum);
    }
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:35,代码来源:DatasetUtils.java

示例3: iterateToFindZBounds

import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
 * Returns the range of z-values in the specified dataset for the
 * data items belonging to the visible series and with x-values in the
 * given range.
 *
 * @param dataset  the dataset (<code>null</code> not permitted).
 * @param visibleSeriesKeys  the visible series keys (<code>null</code> not
 *     permitted).
 * @param xRange  the x-range (<code>null</code> not permitted).
 * @param includeInterval  a flag that determines whether or not the
 *     z-interval for the dataset is included (this only applies if the
 *     dataset has an interval, which is currently not supported).
 *
 * @return The y-range (possibly <code>null</code>).
 */
public static Range iterateToFindZBounds(XYZDataset dataset,
        List visibleSeriesKeys, Range xRange, boolean includeInterval) {
    ParamChecks.nullNotPermitted(dataset, "dataset");
    ParamChecks.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys");
    ParamChecks.nullNotPermitted(xRange, "xRange");

    double minimum = Double.POSITIVE_INFINITY;
    double maximum = Double.NEGATIVE_INFINITY;

    Iterator iterator = visibleSeriesKeys.iterator();
    while (iterator.hasNext()) {
        Comparable seriesKey = (Comparable) iterator.next();
        int series = dataset.indexOf(seriesKey);
        int itemCount = dataset.getItemCount(series);
        for (int item = 0; item < itemCount; item++) {
            double x = dataset.getXValue(series, item);
            double z = dataset.getZValue(series, item);
            if (xRange.contains(x)) {
                if (!Double.isNaN(z)) {
                    minimum = Math.min(minimum, z);
                    maximum = Math.max(maximum, z);
                }
            }
        }
    }

    if (minimum == Double.POSITIVE_INFINITY) {
        return null;
    }
    else {
        return new Range(minimum, maximum);
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:49,代码来源:DatasetUtilities.java

示例4: iterateToFindZBounds

import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
 * Returns the range of z-values in the specified dataset for the
 * data items belonging to the visible series and with x-values in the
 * given range.
 *
 * @param dataset  the dataset ({@code null} not permitted).
 * @param visibleSeriesKeys  the visible series keys ({@code null} not
 *     permitted).
 * @param xRange  the x-range ({@code null} not permitted).
 * @param includeInterval  a flag that determines whether or not the
 *     z-interval for the dataset is included (this only applies if the
 *     dataset has an interval, which is currently not supported).
 *
 * @return The y-range (possibly {@code null}).
 */
public static Range iterateToFindZBounds(XYZDataset dataset,
        List visibleSeriesKeys, Range xRange, boolean includeInterval) {
    Args.nullNotPermitted(dataset, "dataset");
    Args.nullNotPermitted(visibleSeriesKeys, "visibleSeriesKeys");
    Args.nullNotPermitted(xRange, "xRange");

    double minimum = Double.POSITIVE_INFINITY;
    double maximum = Double.NEGATIVE_INFINITY;

    Iterator iterator = visibleSeriesKeys.iterator();
    while (iterator.hasNext()) {
        Comparable seriesKey = (Comparable) iterator.next();
        int series = dataset.indexOf(seriesKey);
        int itemCount = dataset.getItemCount(series);
        for (int item = 0; item < itemCount; item++) {
            double x = dataset.getXValue(series, item);
            double z = dataset.getZValue(series, item);
            if (xRange.contains(x)) {
                if (!Double.isNaN(z)) {
                    minimum = Math.min(minimum, z);
                    maximum = Math.max(maximum, z);
                }
            }
        }
    }

    if (minimum == Double.POSITIVE_INFINITY) {
        return null;
    } else {
        return new Range(minimum, maximum);
    }
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:48,代码来源:DatasetUtils.java

示例5: Summary

import org.jfree.data.xy.XYZDataset; //导入方法依赖的package包/类
/**
	 * calculate the statistical summary for the given dataset
	 * @param dataset
	 */
public Summary(XYZDataset dataset){

		seriesCount = dataset.getSeriesCount();
		sampleSize = new int[seriesCount];
		mean = new double[seriesCount];
		median = new double[seriesCount];
		stdDev = new double[seriesCount];
		skew = new double[seriesCount];
		kurt = new double[seriesCount];

		seriesName = new String[seriesCount];
		int count = 0;
		for (int i=0; i<seriesCount; i++){
			int rowCount = dataset.getItemCount(i);
			seriesName[i] = dataset.getSeriesKey(i).toString();
			Double[] values = new Double[rowCount];
			List<Double> valueList = new java.util.ArrayList<Double>();
			for (int j=0; j<rowCount; j++){
				double v = dataset.getXValue(i,j);
				if (!Double.isNaN(v)){
					values[count]=new Double(v);
					valueList.add(new Double(v));
					count++;
				}
			}
			sampleSize[i]= valueList.size();
			mean[i] = Statistics.calculateMean(values, false);
			median[i] = Statistics.calculateMedian(valueList);
			stdDev[i] = Statistics.getStdDev(values);
			skew[i] = Statistics.calculateSkewness(values);
			kurt[i] = Statistics.calculateKurtosis(values);
		}
		return;
	}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:39,代码来源:Summary.java


注:本文中的org.jfree.data.xy.XYZDataset.getItemCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。