Examples of rebuildStack()


Examples of statechum.analysis.learning.PairOfPaths.rebuildStack()

    Stack<PairScore> stack=new Stack<PairScore>();
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("A")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("C")), gr.findVertex(VertexID.parseID("C")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("C")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("C")),1,2));
    pair1.rebuildStack(gr, stack);
    Assert.assertEquals(1,stack.size());
    PairScore r = stack.pop();
    Assert.assertEquals("A",r.getQ().getStringId());Assert.assertEquals("C",r.getR().getStringId());
  }
 
View Full Code Here

Examples of statechum.analysis.learning.PairOfPaths.rebuildStack()

    Stack<PairScore> stack=new Stack<PairScore>();
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("C")), gr.findVertex(VertexID.parseID("C")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("C")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("C")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("A")),1,2));
    pair1.rebuildStack(gr, stack);
    Assert.assertEquals(1,stack.size());
    PairScore r = stack.pop();
    Assert.assertEquals("A",r.getQ().getStringId());Assert.assertEquals("C",r.getR().getStringId());
 
 
View Full Code Here

Examples of statechum.analysis.learning.PairOfPaths.rebuildStack()

  {
    final LearnerGraph gr = buildLearnerGraph("A-a->A-b->B-c->C", "testWritePairsToXML1",mainConfiguration,converter);
    final PairOfPaths pair1 = new PairOfPaths(gr,new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("C")),1,2));
    final Stack<PairScore> stack=new Stack<PairScore>();
    Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
      pair1.rebuildStack(gr, stack);
    }},IllegalArgumentException.class,"pair not found");
  }
 
  @Test
  public void testRebuildStackFail2()
View Full Code Here

Examples of statechum.analysis.learning.PairOfPaths.rebuildStack()

    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("C")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("C")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("A")),2,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("C")), gr.findVertex(VertexID.parseID("C")),2,2));
    Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
      pair1.rebuildStack(gr, stack);
    }},IllegalArgumentException.class,"pair not found");
  }
 
  @Test
  public void testRebuildStackFail3()
View Full Code Here

Examples of statechum.analysis.learning.PairOfPaths.rebuildStack()

    stack.push(new PairScore(gr.findVertex(VertexID.parseID("B")), gr.findVertex(VertexID.parseID("C")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("B")),1,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("A")),2,2));
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("C")), gr.findVertex(VertexID.parseID("C")),2,2));
    Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
      pair1.rebuildStack(gr, stack);
    }},IllegalArgumentException.class,"pair not found");
  }
 
  @Test
  public void testRebuildStackFail4()
View Full Code Here

Examples of statechum.analysis.learning.PairOfPaths.rebuildStack()

    final LearnerGraph gr = buildLearnerGraph("A-a->A-b->B-c->C", "testWritePairsToXML1",mainConfiguration,converter);
    final PairOfPaths pair1 = new PairOfPaths(gr,new PairScore(gr.findVertex(VertexID.parseID("A")), gr.findVertex(VertexID.parseID("C")),1,2));
    final Stack<PairScore> stack=new Stack<PairScore>();
    stack.push(new PairScore(gr.findVertex(VertexID.parseID("C")), gr.findVertex(VertexID.parseID("C")),2,2));
    Helper.checkForCorrectException(new whatToRun() { public @Override void run() {
      pair1.rebuildStack(gr, stack);
    }},IllegalArgumentException.class,"pair not found");
  }
 
 
  @Test
View Full Code Here

Examples of statechum.analysis.learning.PairOfPaths.rebuildStack()

           
            if(listOfPairsToCheckAgainstIterator != null)
            {
              PairOfPaths pair = listOfPairsToCheckAgainstIterator.next();
              //System.out.println("chosen "+outcome.peek()+", expected "+new PairScore(graph.getVertex(pair.getQ()),graph.getVertex(pair.getR()),0,0));
              pair.rebuildStack(graph, outcome);
            }
          }
         
          return outcome;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.