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


Java DefaultStatisticalCategoryDataset类代码示例

本文整理汇总了Java中org.jfree.data.statistics.DefaultStatisticalCategoryDataset的典型用法代码示例。如果您正苦于以下问题:Java DefaultStatisticalCategoryDataset类的具体用法?Java DefaultStatisticalCategoryDataset怎么用?Java DefaultStatisticalCategoryDataset使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getDataset

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {

    final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.CONCURRENT_SCANNER_THREAD_POOL_SIZE_PROPERTY});
    final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
    for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
        final Statistics statistics = entry.getValue();
        final double mean = statistics.getMean().doubleValue();
        final double ci = statistics.getConfidenceInterval95Percent().doubleValue();

        final String[] groups = entry.getKey().split(GROUP_DELIMITER);
        final String pool_size = decoratePoolSize(groups[0]);
        dataset.add(mean, ci, "", pool_size);
    }
    return dataset;
}
 
开发者ID:stacs-srg,项目名称:shabdiz,代码行数:17,代码来源:TimeToReachStatePerThreadPoolSizeAnalyzer.java

示例2: getDataset

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {

    final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.MANAGER_PROPERTY, Constants.KILL_PORTION_PROPERTY});
    final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
    for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
        final Statistics statistics = entry.getValue();
        final double mean = statistics.getMean().doubleValue();
        final double ci = statistics.getConfidenceInterval95Percent().doubleValue();

        final String[] groups = entry.getKey().split(GROUP_DELIMITER);
        final String manager = decorateManagerAsApplicationName(groups[0]);
        final String kill_portion = decorateKillPortion(groups[1]);
        dataset.add(mean, ci, manager, kill_portion);
    }
    return dataset;
}
 
开发者ID:stacs-srg,项目名称:shabdiz,代码行数:18,代码来源:TimeToReachStatePerKillPortionAnalyzer.java

示例3: getDataset

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {

    final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.MANAGER_PROPERTY});
    final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
    for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
        final Statistics statistics = entry.getValue();
        final double mean = statistics.getMean().doubleValue();
        final double ci = statistics.getConfidenceInterval95Percent().doubleValue();
        final String[] groups = entry.getKey().split(GROUP_DELIMITER);
        final String application = decorateManagerAsApplicationName(groups[0]);
        final String strategy = decorateManagerAsDeploymentStrategy(groups[0]);
        dataset.add(mean, ci, application, strategy);
    }
    return dataset;
}
 
开发者ID:stacs-srg,项目名称:shabdiz,代码行数:17,代码来源:TimeToReachStatePerDeploymentStrategyAnalyzer.java

示例4: toJson

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
public static JSONArray toJson(DefaultStatisticalCategoryDataset dataset) throws JSONException {

        final JSONArray json = new JSONArray();

        for (Object row : dataset.getRowKeys()) {

            final String row_st = row.toString();
            for (Object col : dataset.getColumnKeys()) {

                final String col_st = col.toString();
                final double mean = dataset.getMeanValue(row_st, col_st).doubleValue();
                final double ci = dataset.getStdDevValue(row_st, col_st).doubleValue();

                final JSONObject col_value = new JSONObject();
                col_value.put("row", row_st);
                col_value.put("col", col_st);
                col_value.put("mean", format(mean));
                col_value.put("lower", format(mean - ci));
                col_value.put("upper", format(mean + ci));

                json.put(col_value);
            }
        }

        return json;
    }
 
开发者ID:stacs-srg,项目名称:shabdiz,代码行数:27,代码来源:DatasetUtils.java

示例5: getDataset

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {

    final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.SCANNER_INTERVAL_PROPERTY});
    final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
    for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
        final Statistics statistics = entry.getValue();
        final double mean = statistics.getMean().doubleValue();
        final double ci = statistics.getConfidenceInterval95Percent().doubleValue();

        final String[] groups = entry.getKey().split(GROUP_DELIMITER);
        final String pool_size = groups[0];
        dataset.add(mean, ci, "", pool_size);
    }
    return dataset;
}
 
开发者ID:stacs-srg,项目名称:shabdiz,代码行数:17,代码来源:TimeToReachStatePerScannerIntervalAnalyzer.java

示例6: getDataset

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
@Override
public DefaultStatisticalCategoryDataset getDataset() {

    final Map<String, Statistics> stats_by_application = AnalyticsUtil.getPropertyStatistics(duration_property, experiment_properties, NANOSECOND_TO_SECOND, new String[]{Constants.MANAGER_PROPERTY, Constants.NETWORK_SIZE_PROPERTY});
    final DefaultStatisticalCategoryDataset dataset = new DefaultStatisticalCategoryDataset();
    for (Map.Entry<String, Statistics> entry : stats_by_application.entrySet()) {
        final Statistics statistics = entry.getValue();
        final double mean = statistics.getMean().doubleValue();
        final double ci = statistics.getConfidenceInterval95Percent().doubleValue();

        final String[] groups = entry.getKey().split(GROUP_DELIMITER);
        final String manager = decorateManagerAsApplicationName(groups[0]);
        final String network_size = groups[1];
        dataset.add(mean, ci, manager, network_size);
    }
    return dataset;
}
 
开发者ID:stacs-srg,项目名称:shabdiz,代码行数:18,代码来源:TimeToReachStatePerNetworkSizeAnalyzer.java

示例7: testDrawWithNullInfo

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> info object to make sure that 
 * no exceptions are thrown (particularly by code in the renderer).
 */
public void testDrawWithNullInfo() {
    boolean success = false;
    try {
        DefaultStatisticalCategoryDataset dataset 
            = new DefaultStatisticalCategoryDataset();
        dataset.add(1.0, 2.0, "S1", "C1");
        dataset.add(3.0, 4.0, "S1", "C2");
        CategoryPlot plot = new CategoryPlot(dataset, 
                new CategoryAxis("Category"), new NumberAxis("Value"), 
                new StatisticalLineAndShapeRenderer());
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200, 
                null);
        success = true;
    }
    catch (NullPointerException e) {
        e.printStackTrace();
        success = false;
    }
    assertTrue(success);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:26,代码来源:StatisticalLineAndShapeRendererTests.java

示例8: testDrawWithNullInfo

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> info object to make sure that 
 * no exceptions are thrown (particularly by code in the renderer).
 */
public void testDrawWithNullInfo() {
    boolean success = false;
    try {
        DefaultStatisticalCategoryDataset dataset 
            = new DefaultStatisticalCategoryDataset();
        dataset.add(1.0, 2.0, "S1", "C1");
        dataset.add(3.0, 4.0, "S1", "C2");
        CategoryPlot plot = new CategoryPlot(dataset, 
                new CategoryAxis("Category"), new NumberAxis("Value"), 
                new StatisticalBarRenderer());
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200, 
                null);
        success = true;
    }
    catch (NullPointerException e) {
        e.printStackTrace();
        success = false;
    }
    assertTrue(success);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:26,代码来源:StatisticalBarRendererTests.java

示例9: testDrawWithNullInfo

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> info object to make sure that
 * no exceptions are thrown (particularly by code in the renderer).
 */
@Test
public void testDrawWithNullInfo() {
    try {
        DefaultStatisticalCategoryDataset dataset
            = new DefaultStatisticalCategoryDataset();
        dataset.add(1.0, 2.0, "S1", "C1");
        dataset.add(3.0, 4.0, "S1", "C2");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
                new StatisticalLineAndShapeRenderer());
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                null);
    }
    catch (NullPointerException e) {
        fail("No exception should be thrown.");
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:23,代码来源:StatisticalLineAndShapeRendererTest.java

示例10: testDrawWithNullInfo

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> info object to make sure that
 * no exceptions are thrown (particularly by code in the renderer).
 */
@Test
public void testDrawWithNullInfo() {
    try {
        DefaultStatisticalCategoryDataset dataset
                = new DefaultStatisticalCategoryDataset();
        dataset.add(1.0, 2.0, "S1", "C1");
        dataset.add(3.0, 4.0, "S1", "C2");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
                new StatisticalBarRenderer());
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                null);
    }
    catch (NullPointerException e) {
        fail("No exception should be thrown.");
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:23,代码来源:StatisticalBarRendererTest.java

示例11: testDrawWithNullMeanVertical

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> mean value to make sure that
 * no exceptions are thrown (particularly by code in the renderer).  See
 * bug report 1779941.
 */
@Test
public void testDrawWithNullMeanVertical() {
    try {
        DefaultStatisticalCategoryDataset dataset
                = new DefaultStatisticalCategoryDataset();
        dataset.add(1.0, 2.0, "S1", "C1");
        dataset.add(null, new Double(4.0), "S1", "C2");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
                new StatisticalBarRenderer());
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                null);
    }
    catch (NullPointerException e) {
        fail("No exception should be thrown.");
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:24,代码来源:StatisticalBarRendererTest.java

示例12: testDrawWithNullMeanHorizontal

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> mean value to make sure that
 * no exceptions are thrown (particularly by code in the renderer).  See
 * bug report 1779941.
 */
@Test
public void testDrawWithNullMeanHorizontal() {
    try {
        DefaultStatisticalCategoryDataset dataset
                = new DefaultStatisticalCategoryDataset();
        dataset.add(1.0, 2.0, "S1", "C1");
        dataset.add(null, new Double(4.0), "S1", "C2");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
                new StatisticalBarRenderer());
        plot.setOrientation(PlotOrientation.HORIZONTAL);
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                null);
    }
    catch (NullPointerException e) {
        fail("No exception should be thrown.");
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:25,代码来源:StatisticalBarRendererTest.java

示例13: testDrawWithNullDeviationVertical

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> standard deviation to make sure
 * that no exceptions are thrown (particularly by code in the renderer).
 * See bug report 1779941.
 */
@Test
public void testDrawWithNullDeviationVertical() {
    try {
        DefaultStatisticalCategoryDataset dataset
                = new DefaultStatisticalCategoryDataset();
        dataset.add(1.0, 2.0, "S1", "C1");
        dataset.add(new Double(4.0), null, "S1", "C2");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
                new StatisticalBarRenderer());
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                null);
    }
    catch (NullPointerException e) {
        fail("No exception should be thrown.");
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:24,代码来源:StatisticalBarRendererTest.java

示例14: testDrawWithNullDeviationHorizontal

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Draws the chart with a <code>null</code> standard deviation to make sure
 * that no exceptions are thrown (particularly by code in the renderer).
 * See bug report 1779941.
 */
@Test
public void testDrawWithNullDeviationHorizontal() {
    try {
        DefaultStatisticalCategoryDataset dataset
                = new DefaultStatisticalCategoryDataset();
        dataset.add(1.0, 2.0, "S1", "C1");
        dataset.add(new Double(4.0), null, "S1", "C2");
        CategoryPlot plot = new CategoryPlot(dataset,
                new CategoryAxis("Category"), new NumberAxis("Value"),
                new StatisticalBarRenderer());
        plot.setOrientation(PlotOrientation.HORIZONTAL);
        JFreeChart chart = new JFreeChart(plot);
        /* BufferedImage image = */ chart.createBufferedImage(300, 200,
                null);
    }
    catch (NullPointerException e) {
        fail("No exception should be thrown.");
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:25,代码来源:StatisticalBarRendererTest.java

示例15: testIterateToFindRangeBounds_StatisticalCategoryDataset

import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; //导入依赖的package包/类
/**
 * Some checks for the iterateToFindRangeBounds(CategoryDataset...)
 * method.
 */
@Test
public void testIterateToFindRangeBounds_StatisticalCategoryDataset() {
    DefaultStatisticalCategoryDataset dataset
            = new DefaultStatisticalCategoryDataset();
    List visibleSeriesKeys = new ArrayList();
    assertNull(DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, false));
    dataset.add(1.0, 0.5, "R1", "C1");
    visibleSeriesKeys.add("R1");
    assertEquals(new Range(1.0, 1.0),
            DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, false));
    assertEquals(new Range(0.5, 1.5),
            DatasetUtilities.iterateToFindRangeBounds(dataset,
            visibleSeriesKeys, true));
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:21,代码来源:DatasetUtilitiesTest.java


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