Package statechum.analysis.learning.DrawGraphs

Examples of statechum.analysis.learning.DrawGraphs.RBagPlot


 
  @Test
  public void testAttemptSingleDotBagPlot5()
  {
    final String X="axisX", Y="axisY";
    RBagPlot g=new RBagPlot(X,Y, new File("someName"));
    g.add(0.,1.);
    g.add(1.,1.);
    Assert.assertFalse(g.checkSingleDot());
  }
View Full Code Here


 
  @Test
  public void testBoundaries1()
  {
    final String X="axisX", Y="axisY";
    RGraph<Double> g=new RBagPlot(X,Y, new File("someName"));
    g.setXboundaries(5.5, 34.);
    g.add(5.5,34.);g.add(5.5,34.);g.add(5.5,2.);g.add(7.5,2.);
    Assert.assertEquals(Collections.singletonList("bagplot(c(5.5,5.5,5.5,7.5),c(34.0,34.0,2.0,2.0),xlab=\""+X+"\",ylab=\""+Y+"\")"),g.getDrawingCommand());
  }
View Full Code Here

 
  @Test
  public void testBoundaries2()
  {
    final String X="axisX", Y="axisY";
    RGraph<Double> g=new RBagPlot(X,Y, new File("someName"));
    g.setXboundaries(5.6, 34.);
    g.add(5.5,34.);g.add(5.5,34.);g.add(5.5,2.);g.add(7.5,2.);
    Assert.assertEquals(Collections.singletonList("bagplot(c(7.5),c(2.0),xlab=\""+X+"\",ylab=\""+Y+"\")"),g.getDrawingCommand());
  }
View Full Code Here

 
  @Test
  public void testBoundaries3()
  {
    final String X="axisX", Y="axisY";
    RGraph<Double> g=new RBagPlot(X,Y, new File("someName"));
    g.setYboundaries(5.5, 34.);
    g.add(5.5,34.);g.add(5.5,34.);g.add(5.5,2.);g.add(7.5,2.);
    Assert.assertEquals(Collections.singletonList("bagplot(c(5.5,5.5),c(34.0,34.0),xlab=\""+X+"\",ylab=\""+Y+"\")"),g.getDrawingCommand());
  }
View Full Code Here

 
  @Test
  public void testBoundaries4()
  {
    final String X="axisX", Y="axisY";
    final RGraph<Double> g=new RBagPlot(X,Y, new File("someName"));
    g.setXboundaries(5.5, -34.);
    g.setYboundaries(5.5, -34.);
    g.add(5.5,34.);g.add(5.5,34.);g.add(5.5,2.);g.add(7.5,2.);
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.getDrawingCommand();
    }},IllegalArgumentException.class,"empty");
  }
View Full Code Here

 
  @Test
  public void testComputeDiagonal1()
  {
    final String X="axisX", Y="axisY";
    final RGraph<Double> g=new RBagPlot(X,Y, new File("someName"));
    g.setXboundaries(5.5, -34.);
    g.setYboundaries(5.5, -34.);
    g.add(5.5,34.);g.add(5.5,34.);g.add(5.5,2.);g.add(7.5,2.);
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.getDrawingCommand();
    }},IllegalArgumentException.class,"empty");
   
  }
View Full Code Here

 
  @Test
  public void testComputeDiagonal2()
  {
    final String X="axisX", Y="axisY";
    final RBagPlot g=new RBagPlot(X,Y, new File("someName"));
    g.add(5.5,34.);g.add(5.5,35.);
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.computeDiagonal();
    }},IllegalArgumentException.class,"width is too small");
   
 
View Full Code Here

 
  @Test
  public void testComputeDiagonal3()
  {
    final String X="axisX", Y="axisY";
    final RBagPlot g=new RBagPlot(X,Y, new File("someName"));
    g.add(5.6,35.);g.add(5.5,35.);
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.computeDiagonal();
    }},IllegalArgumentException.class,"height is too small");
   
  }
View Full Code Here

 
  @Test
  public void testComputeDiagonal4()
  {
    final String X="axisX", Y="axisY";
    final RBagPlot g=new RBagPlot(X,Y, new File("someName"));
    g.add(5.5,34.);g.add(5.7,32.);g.add(7.8,31.);
    Assert.assertEquals("abline(23.82608695652174,1.3043478260869565)",g.computeDiagonal());
  }
View Full Code Here

  }
 
  @Test
  public void testGenerateGraphFail1b()
  {
    final RGraph<Double> g=new RBagPlot("axisX", "axisY", new File("someName"));
    checkForCorrectException(new whatToRun() { public @Override void run() {
      g.getDrawingCommand();
    }},IllegalArgumentException.class,"empty");
  }
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.DrawGraphs.RBagPlot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.