Package statechum.analysis.learning.DrawGraphs

Examples of statechum.analysis.learning.DrawGraphs.RBagPlot


 
  @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

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

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

 
  @Test
  public void testGenerateGraph3b()
  {
    final String X="axisX", Y="axisY";
    RGraph<Double> g=new RBagPlot(X,Y, new File("someName"));
    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 testAttemptSingleDotBagPlot1()
  {
    final String X="axisX", Y="axisY";
    RBagPlot g=new RBagPlot(X,Y, new File("someName"));
    g.add(5.5,34.);
    g.add(5.5,34.);
    Assert.assertTrue(g.checkSingleDot());
  }
View Full Code Here

 
  @Test
  public void testAttemptSingleDotBagPlot2()
  {
    final String X="axisX", Y="axisY";
    RBagPlot g=new RBagPlot(X,Y, new File("someName"));
    Assert.assertTrue(g.checkSingleDot());
  }
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.