Java 类org.jfree.data.xy.DefaultXYZDataset 实例源码

项目:parabuild-ci    文件:DefaultXYZDatasetTests.java   
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {

    DefaultXYZDataset d1 = new DefaultXYZDataset();
    DefaultXYZDataset d2 = new DefaultXYZDataset();
    assertTrue(d1.equals(d2));
    assertTrue(d2.equals(d1));

    double[] x1 = new double[] {1.0, 2.0, 3.0};
    double[] y1 = new double[] {4.0, 5.0, 6.0};
    double[] z1 = new double[] {7.0, 8.0, 9.0};
    double[][] data1 = new double[][] {x1, y1, z1};
    double[] x2 = new double[] {1.0, 2.0, 3.0};
    double[] y2 = new double[] {4.0, 5.0, 6.0};
    double[] z2 = new double[] {7.0, 8.0, 9.0};
    double[][] data2 = new double[][] {x2, y2, z2};
    d1.addSeries("S1", data1);
    assertFalse(d1.equals(d2));
    d2.addSeries("S1", data2);
    assertTrue(d1.equals(d2));
}
项目:parabuild-ci    文件:DefaultXYZDatasetTests.java   
/**
 * Some tests for the addSeries() method.
 */
public void testAddSeries() {
    DefaultXYZDataset d = new DefaultXYZDataset();
    d.addSeries("S1", new double[][] {{1.0}, {2.0}, {3.0}});
    assertEquals(1, d.getSeriesCount());
    assertEquals("S1", d.getSeriesKey(0));

    // check that adding a series will overwrite the old series
    d.addSeries("S1", new double[][] {{11.0}, {12.0}, {13.0}});
    assertEquals(1, d.getSeriesCount());
    assertEquals(12.0, d.getYValue(0, 0), EPSILON);

    // check null key
    boolean pass = false;
    try
    {
      d.addSeries(null, new double[][] {{1.0}, {2.0}, {3.0}});
    }
    catch (IllegalArgumentException e)
    {
      pass = true;
    }
    assertTrue(pass);
}
项目:parabuild-ci    文件:DefaultXYZDatasetTests.java   
/**
 * Creates a sample dataset for testing.
 * 
 * @return A sample dataset.
 */
public DefaultXYZDataset createSampleDataset1() {
    DefaultXYZDataset d = new DefaultXYZDataset();
    double[] x1 = new double[] {1.0, 2.0, 3.0};
    double[] y1 = new double[] {4.0, 5.0, 6.0};
    double[] z1 = new double[] {7.0, 8.0, 9.0};
    double[][] data1 = new double[][] {x1, y1, z1};
    d.addSeries("S1", data1);

    double[] x2 = new double[] {1.0, 2.0, 3.0};
    double[] y2 = new double[] {4.0, 5.0, 6.0};
    double[] z2 = new double[] {7.0, 8.0, 9.0};
    double[][] data2 = new double[][] {x2, y2, z2};
    d.addSeries("S2", data2);
    return d;
}
项目:jasperreports    文件:ConvertChartContext.java   
private XYZDataset createXyzDataset()
{
    if (sampleXyzDataset == null)
    {
        DefaultXYZDataset dataset = new DefaultXYZDataset(); 

        dataset.addSeries(
            "First", 
            new double[][]{ 
                {2.1, 2.3, 2.3, 2.2, 2.2, 1.8, 1.8, 1.9, 2.3, 3.8}, 
                {14.1, 11.1, 10.0, 8.8, 8.7, 8.4, 5.4, 4.1, 4.1, 25}, 
                {2.4, 2.7, 2.7, 2.2, 2.2, 2.2, 2.1, 2.2, 1.6, 4}
                }
            );

        sampleXyzDataset = dataset;
    }

    return sampleXyzDataset;
}
项目:nabs    文件:DefaultXYZDatasetTests.java   
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {

    DefaultXYZDataset d1 = new DefaultXYZDataset();
    DefaultXYZDataset d2 = new DefaultXYZDataset();
    assertTrue(d1.equals(d2));
    assertTrue(d2.equals(d1));

    double[] x1 = new double[] {1.0, 2.0, 3.0};
    double[] y1 = new double[] {4.0, 5.0, 6.0};
    double[] z1 = new double[] {7.0, 8.0, 9.0};
    double[][] data1 = new double[][] {x1, y1, z1};
    double[] x2 = new double[] {1.0, 2.0, 3.0};
    double[] y2 = new double[] {4.0, 5.0, 6.0};
    double[] z2 = new double[] {7.0, 8.0, 9.0};
    double[][] data2 = new double[][] {x2, y2, z2};
    d1.addSeries("S1", data1);
    assertFalse(d1.equals(d2));
    d2.addSeries("S1", data2);
    assertTrue(d1.equals(d2));
}
项目:nabs    文件:DefaultXYZDatasetTests.java   
/**
 * Some tests for the addSeries() method.
 */
public void testAddSeries() {
    DefaultXYZDataset d = new DefaultXYZDataset();
    d.addSeries("S1", new double[][] {{1.0}, {2.0}, {3.0}});
    assertEquals(1, d.getSeriesCount());
    assertEquals("S1", d.getSeriesKey(0));

    // check that adding a series will overwrite the old series
    d.addSeries("S1", new double[][] {{11.0}, {12.0}, {13.0}});
    assertEquals(1, d.getSeriesCount());
    assertEquals(12.0, d.getYValue(0, 0), EPSILON);

    // check null key
    boolean pass = false;
    try
    {
      d.addSeries(null, new double[][] {{1.0}, {2.0}, {3.0}});
    }
    catch (IllegalArgumentException e)
    {
      pass = true;
    }
    assertTrue(pass);
}
项目:nabs    文件:DefaultXYZDatasetTests.java   
/**
 * Creates a sample dataset for testing.
 * 
 * @return A sample dataset.
 */
public DefaultXYZDataset createSampleDataset1() {
    DefaultXYZDataset d = new DefaultXYZDataset();
    double[] x1 = new double[] {1.0, 2.0, 3.0};
    double[] y1 = new double[] {4.0, 5.0, 6.0};
    double[] z1 = new double[] {7.0, 8.0, 9.0};
    double[][] data1 = new double[][] {x1, y1, z1};
    d.addSeries("S1", data1);

    double[] x2 = new double[] {1.0, 2.0, 3.0};
    double[] y2 = new double[] {4.0, 5.0, 6.0};
    double[] z2 = new double[] {7.0, 8.0, 9.0};
    double[][] data2 = new double[][] {x2, y2, z2};
    d.addSeries("S2", data2);
    return d;
}
项目:astor    文件:DefaultXYZDatasetTests.java   
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {

    DefaultXYZDataset d1 = new DefaultXYZDataset();
    DefaultXYZDataset d2 = new DefaultXYZDataset();
    assertTrue(d1.equals(d2));
    assertTrue(d2.equals(d1));

    double[] x1 = new double[] {1.0, 2.0, 3.0};
    double[] y1 = new double[] {4.0, 5.0, 6.0};
    double[] z1 = new double[] {7.0, 8.0, 9.0};
    double[][] data1 = new double[][] {x1, y1, z1};
    double[] x2 = new double[] {1.0, 2.0, 3.0};
    double[] y2 = new double[] {4.0, 5.0, 6.0};
    double[] z2 = new double[] {7.0, 8.0, 9.0};
    double[][] data2 = new double[][] {x2, y2, z2};
    d1.addSeries("S1", data1);
    assertFalse(d1.equals(d2));
    d2.addSeries("S1", data2);
    assertTrue(d1.equals(d2));
}
项目:astor    文件:DefaultXYZDatasetTests.java   
/**
 * Some tests for the addSeries() method.
 */
public void testAddSeries() {
    DefaultXYZDataset d = new DefaultXYZDataset();
    d.addSeries("S1", new double[][] {{1.0}, {2.0}, {3.0}});
    assertEquals(1, d.getSeriesCount());
    assertEquals("S1", d.getSeriesKey(0));

    // check that adding a series will overwrite the old series
    d.addSeries("S1", new double[][] {{11.0}, {12.0}, {13.0}});
    assertEquals(1, d.getSeriesCount());
    assertEquals(12.0, d.getYValue(0, 0), EPSILON);

    // check null key
    boolean pass = false;
    try
    {
      d.addSeries(null, new double[][] {{1.0}, {2.0}, {3.0}});
    }
    catch (IllegalArgumentException e)
    {
      pass = true;
    }
    assertTrue(pass);
}
项目:astor    文件:DefaultXYZDatasetTests.java   
/**
 * Creates a sample dataset for testing.
 *
 * @return A sample dataset.
 */
public DefaultXYZDataset createSampleDataset1() {
    DefaultXYZDataset d = new DefaultXYZDataset();
    double[] x1 = new double[] {1.0, 2.0, 3.0};
    double[] y1 = new double[] {4.0, 5.0, 6.0};
    double[] z1 = new double[] {7.0, 8.0, 9.0};
    double[][] data1 = new double[][] {x1, y1, z1};
    d.addSeries("S1", data1);

    double[] x2 = new double[] {1.0, 2.0, 3.0};
    double[] y2 = new double[] {4.0, 5.0, 6.0};
    double[] z2 = new double[] {7.0, 8.0, 9.0};
    double[][] data2 = new double[][] {x2, y2, z2};
    d.addSeries("S2", data2);
    return d;
}
项目:parabuild-ci    文件:DefaultXYZDatasetTests.java   
/**
 * Some checks for the indexOf(Comparable) method.
 */
public void testIndexOf() {
    DefaultXYZDataset d = createSampleDataset1();
    assertEquals(0, d.indexOf("S1"));
    assertEquals(1, d.indexOf("S2"));
    assertEquals(-1, d.indexOf("Green Eggs and Ham"));
    assertEquals(-1, d.indexOf(null));
}
项目:ccu-historian    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:ccu-historian    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:ccu-historian    文件:XYShapeRendererTest.java   
/**
 * Check if finding the bounds in z-dimension of an XYZDataset works. 
 */
public void testFindZBounds() {
    XYShapeRenderer r = new XYShapeRenderer();
    assertNull(r.findZBounds(null));

    DefaultXYZDataset dataset = new DefaultXYZDataset();
    Range range;

    double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} };
    dataset.addSeries("series1", data1);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(1d, range.getLowerBound(), EPSILON);
    assertEquals(3d, range.getUpperBound(), EPSILON);

    double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} };
    dataset.removeSeries("series1");
    dataset.addSeries("series2", data2);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-3d, range.getLowerBound(), EPSILON);
    assertEquals(-1d, range.getUpperBound(), EPSILON);

    double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} };
    dataset.removeSeries("series2");
    dataset.addSeries("series3", data3);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-1.2d, range.getLowerBound(), EPSILON);
    assertEquals(3.8d, range.getUpperBound(), EPSILON);
}
项目:jfreechart    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:jfreechart    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:jfreechart    文件:XYShapeRendererTest.java   
/**
 * Check if finding the bounds in z-dimension of an XYZDataset works. 
 */
@Test
public void testFindZBounds() {
    XYShapeRenderer r = new XYShapeRenderer();
    assertNull(r.findZBounds(null));

    DefaultXYZDataset dataset = new DefaultXYZDataset();
    Range range;

    double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} };
    dataset.addSeries("series1", data1);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(1d, range.getLowerBound(), EPSILON);
    assertEquals(3d, range.getUpperBound(), EPSILON);

    double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} };
    dataset.removeSeries("series1");
    dataset.addSeries("series2", data2);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-3d, range.getLowerBound(), EPSILON);
    assertEquals(-1d, range.getUpperBound(), EPSILON);

    double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} };
    dataset.removeSeries("series2");
    dataset.addSeries("series3", data3);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-1.2d, range.getLowerBound(), EPSILON);
    assertEquals(3.8d, range.getUpperBound(), EPSILON);
}
项目:aya-lang    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:aya-lang    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:aya-lang    文件:XYShapeRendererTest.java   
/**
 * Check if finding the bounds in z-dimension of an XYZDataset works. 
 */
public void testFindZBounds() {
    XYShapeRenderer r = new XYShapeRenderer();
    assertNull(r.findZBounds(null));

    DefaultXYZDataset dataset = new DefaultXYZDataset();
    Range range;

    double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} };
    dataset.addSeries("series1", data1);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(1d, range.getLowerBound(), EPSILON);
    assertEquals(3d, range.getUpperBound(), EPSILON);

    double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} };
    dataset.removeSeries("series1");
    dataset.addSeries("series2", data2);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-3d, range.getLowerBound(), EPSILON);
    assertEquals(-1d, range.getUpperBound(), EPSILON);

    double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} };
    dataset.removeSeries("series2");
    dataset.addSeries("series3", data3);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-1.2d, range.getLowerBound(), EPSILON);
    assertEquals(3.8d, range.getUpperBound(), EPSILON);
}
项目:PDFReporter-Studio    文件:ConvertChartContext.java   
private XYZDataset createXyzDataset() {
    if (sampleXyzDataset == null) {
        DefaultXYZDataset dataset = new DefaultXYZDataset();

        dataset.addSeries("First", new double[][] { { 2.1, 2.3, 2.3, 2.2, 2.2, 1.8, 1.8, 1.9, 2.3, 3.8 },
                { 14.1, 11.1, 10.0, 8.8, 8.7, 8.4, 5.4, 4.1, 4.1, 25 }, { 2.4, 2.7, 2.7, 2.2, 2.2, 2.2, 2.1, 2.2, 1.6, 4 } });

        sampleXyzDataset = dataset;
    }

    return sampleXyzDataset;
}
项目:nabs    文件:DefaultXYZDatasetTests.java   
/**
 * Some checks for the indexOf(Comparable) method.
 */
public void testIndexOf() {
    DefaultXYZDataset d = createSampleDataset1();
    assertEquals(0, d.indexOf("S1"));
    assertEquals(1, d.indexOf("S2"));
    assertEquals(-1, d.indexOf("Green Eggs and Ham"));
    assertEquals(-1, d.indexOf(null));
}
项目:ECG-Viewer    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:ECG-Viewer    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:ECG-Viewer    文件:XYShapeRendererTest.java   
/**
 * Check if finding the bounds in z-dimension of an XYZDataset works. 
 */
public void testFindZBounds() {
    XYShapeRenderer r = new XYShapeRenderer();
    assertNull(r.findZBounds(null));

    DefaultXYZDataset dataset = new DefaultXYZDataset();
    Range range;

    double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} };
    dataset.addSeries("series1", data1);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(1d, range.getLowerBound(), EPSILON);
    assertEquals(3d, range.getUpperBound(), EPSILON);

    double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} };
    dataset.removeSeries("series1");
    dataset.addSeries("series2", data2);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-3d, range.getLowerBound(), EPSILON);
    assertEquals(-1d, range.getUpperBound(), EPSILON);

    double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} };
    dataset.removeSeries("series2");
    dataset.addSeries("series3", data3);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-1.2d, range.getLowerBound(), EPSILON);
    assertEquals(3.8d, range.getUpperBound(), EPSILON);
}
项目:astor    文件:XYBlockRendererTests.java   
/**
 * A simple test for bug 1766646.
 */
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:astor    文件:XYBlockRendererTests.java   
/**
 * A simple test for bug 1766646.
 */
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:astor    文件:DefaultXYZDatasetTests.java   
/**
 * Some checks for the indexOf(Comparable) method.
 */
public void testIndexOf() {
    DefaultXYZDataset d = createSampleDataset1();
    assertEquals(0, d.indexOf("S1"));
    assertEquals(1, d.indexOf("S2"));
    assertEquals(-1, d.indexOf("Green Eggs and Ham"));
    assertEquals(-1, d.indexOf(null));
}
项目:group-five    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:group-five    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:group-five    文件:XYShapeRendererTest.java   
/**
 * Check if finding the bounds in z-dimension of an XYZDataset works. 
 */
public void testFindZBounds() {
    XYShapeRenderer r = new XYShapeRenderer();
    assertNull(r.findZBounds(null));

    DefaultXYZDataset dataset = new DefaultXYZDataset();
    Range range;

    double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} };
    dataset.addSeries("series1", data1);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(1d, range.getLowerBound(), EPSILON);
    assertEquals(3d, range.getUpperBound(), EPSILON);

    double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} };
    dataset.removeSeries("series1");
    dataset.addSeries("series2", data2);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-3d, range.getLowerBound(), EPSILON);
    assertEquals(-1d, range.getUpperBound(), EPSILON);

    double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} };
    dataset.removeSeries("series2");
    dataset.addSeries("series3", data3);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-1.2d, range.getLowerBound(), EPSILON);
    assertEquals(3.8d, range.getUpperBound(), EPSILON);
}
项目:buffer_bci    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:buffer_bci    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:buffer_bci    文件:XYShapeRendererTest.java   
/**
 * Check if finding the bounds in z-dimension of an XYZDataset works. 
 */
public void testFindZBounds() {
    XYShapeRenderer r = new XYShapeRenderer();
    assertNull(r.findZBounds(null));

    DefaultXYZDataset dataset = new DefaultXYZDataset();
    Range range;

    double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} };
    dataset.addSeries("series1", data1);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(1d, range.getLowerBound(), EPSILON);
    assertEquals(3d, range.getUpperBound(), EPSILON);

    double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} };
    dataset.removeSeries("series1");
    dataset.addSeries("series2", data2);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-3d, range.getLowerBound(), EPSILON);
    assertEquals(-1d, range.getUpperBound(), EPSILON);

    double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} };
    dataset.removeSeries("series2");
    dataset.addSeries("series3", data3);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-1.2d, range.getLowerBound(), EPSILON);
    assertEquals(3.8d, range.getUpperBound(), EPSILON);
}
项目:proyecto-teoria-control-utn-frro    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:proyecto-teoria-control-utn-frro    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:proyecto-teoria-control-utn-frro    文件:XYShapeRendererTest.java   
/**
 * Check if finding the bounds in z-dimension of an XYZDataset works. 
 */
public void testFindZBounds() {
    XYShapeRenderer r = new XYShapeRenderer();
    assertNull(r.findZBounds(null));

    DefaultXYZDataset dataset = new DefaultXYZDataset();
    Range range;

    double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} };
    dataset.addSeries("series1", data1);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(1d, range.getLowerBound(), EPSILON);
    assertEquals(3d, range.getUpperBound(), EPSILON);

    double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} };
    dataset.removeSeries("series1");
    dataset.addSeries("series2", data2);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-3d, range.getLowerBound(), EPSILON);
    assertEquals(-1d, range.getUpperBound(), EPSILON);

    double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} };
    dataset.removeSeries("series2");
    dataset.addSeries("series3", data3);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-1.2d, range.getLowerBound(), EPSILON);
    assertEquals(3.8d, range.getUpperBound(), EPSILON);
}
项目:Memetic-Algorithm-for-TSP    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646A() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findDomainBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findDomainBounds(emptyDataset);
    assertTrue(range == null);
}
项目:Memetic-Algorithm-for-TSP    文件:XYBlockRendererTest.java   
/**
 * A simple test for bug 1766646.
 */
@Test
public void testBug1766646B() {
    XYBlockRenderer r = new XYBlockRenderer();
    Range range = r.findRangeBounds(null);
    assertTrue(range == null);
    DefaultXYZDataset emptyDataset = new DefaultXYZDataset();
    range = r.findRangeBounds(emptyDataset);
    assertTrue(range == null);
}
项目:Memetic-Algorithm-for-TSP    文件:XYShapeRendererTest.java   
/**
 * Check if finding the bounds in z-dimension of an XYZDataset works. 
 */
public void testFindZBounds() {
    XYShapeRenderer r = new XYShapeRenderer();
    assertNull(r.findZBounds(null));

    DefaultXYZDataset dataset = new DefaultXYZDataset();
    Range range;

    double data1[][] = { {1,1,1}, {1,1,1}, {1,2,3} };
    dataset.addSeries("series1", data1);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(1d, range.getLowerBound(), EPSILON);
    assertEquals(3d, range.getUpperBound(), EPSILON);

    double data2[][] = { {1,1,1}, {1,1,1}, {-1,-2,-3} };
    dataset.removeSeries("series1");
    dataset.addSeries("series2", data2);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-3d, range.getLowerBound(), EPSILON);
    assertEquals(-1d, range.getUpperBound(), EPSILON);

    double data3[][] = { {1,1,1}, {1,1,1}, {-1.2,2.9,3.8} };
    dataset.removeSeries("series2");
    dataset.addSeries("series3", data3);
    range = r.findZBounds(dataset);
    assertNotNull(range);
    assertEquals(-1.2d, range.getLowerBound(), EPSILON);
    assertEquals(3.8d, range.getUpperBound(), EPSILON);
}