Examples of addToCompatibility()


Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND5, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
   
    grA.addToCompatibility(grA.findVertex("D"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND5, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND5, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND5, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND5,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
    Assert.assertTrue(result.pairCompatibility.compatibility.get(result.findVertex("T")).get(result.findVertex("D")) == JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

    Configuration configND6 = config.copy();
    Configuration cloneConfig = configND6.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D\nU-a->U-b->R";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND6, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
    grA.addToCompatibility(grA.findVertex("D"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND6, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

    Configuration cloneConfig = configND6.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D\nU-a->U-b->R";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND6, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
    grA.addToCompatibility(grA.findVertex("D"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND6, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D\nU-a->U-b->R";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND6, converter);
    grA.findVertex("F").setColour(JUConstants.RED);grA.findVertex("B").setColour(JUConstants.AMBER);grA.findVertex("B").setDepth(3);
    grA.addToCompatibility(grA.findVertex("D"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND6, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND6, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND6,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

    grA.addToCompatibility(grA.findVertex("U"), grA.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND6, converter);
    VertexID origID = VertexID.parseID("test orig");
    grB.findVertex("B").setColour(JUConstants.GRAY);grB.findVertex("B").setOrigState(origID);grB.findVertex("B").setDepth(3);
    grB.addToCompatibility(grB.findVertex("D"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    grB.addToCompatibility(grB.findVertex("U"), grB.findVertex("R"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
 
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 8,0,threadNumber,configND6,converter);
    Assert.assertEquals(JUConstants.GRAY,result.findVertex("B").getColour());
    Assert.assertEquals(origID,result.findVertex("B").getOrigState());
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

      }

      @Override
      public void removeFromCompatibility(CmpVertex a, CmpVertex b, JUConstants.PAIRCOMPATIBILITY value) {
        super.removeFromCompatibility(a,b,value);
        removed.addToCompatibility(a, b, value);
      }

      @Override
      public void addRelabelling(VertID a, VertID b) {
        graphToPatch.addRelabelling(a, b);
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LearnerGraphND.addToCompatibility()

  public final void testWriteAndLoad5()
  {
    LearnerGraphND graph = buildLearnerGraphND("A-a->B-a-#C\nA-d-#D\nA-c->A\nA-a->S-a->S","testWriteAndLoad5",Configuration.getDefaultConfiguration(), converter);
    graph.findVertex("B").setDepth(5);graph.findVertex("D").setColour(JUConstants.AMBER);
   
    graph.addToCompatibility(graph.findVertex("A"), graph.findVertex("B"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    ChangesRecorder patcher = new ChangesRecorder(null);
    patcher.addTransition(graph.findVertex("B"), AbstractLearnerGraph.generateNewLabel("c", cloneConfig), graph.findVertex("B"));
    patcher.removeTransition(graph.findVertex("A"), label_a, graph.findVertex("B"));
    patcher.removeFromCompatibility(graph.findVertex("B"), graph.findVertex("A"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
    patcher.addToCompatibility(graph.findVertex("B"), graph.findVertex("S"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
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.