Package statechum.analysis.learning.rpnicore

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


    Assert.assertNull(result.findVertex(testA));
    Assert.assertNull(result.findVertex(testB));
    Assert.assertNotNull(result.findVertex(nameC));
    Assert.assertNotNull(result.findVertex(nameD));
    Assert.assertTrue(DeterministicDirectedSparseGraph.deepEquals(newStateC,result.findVertex(nameC)));
    Assert.assertTrue(DeterministicDirectedSparseGraph.deepEquals(newStateD,result.findVertex(nameD)));

    // The last check: ensure that disconnected states are or are not key pairs.
    // This chunk of code simply returns GD, the checking is performed by the caller of this method.
    GD<List<CmpVertex>,List<CmpVertex>,LearnerGraphNDCachedData,LearnerGraphNDCachedData> gd = new GD<List<CmpVertex>,List<CmpVertex>,LearnerGraphNDCachedData,LearnerGraphNDCachedData>();
    gd.init(grA, grB, threadNumber,argConfig);gd.identifyKeyPairs();
View Full Code Here


    final String name = "testComputeGD_ND2";
    Configuration configND4 = config.copy();
    Configuration cloneConfig = configND4.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND4, 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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
View Full Code Here

    final String name = "testComputeGD_ND2";
    Configuration configND4 = config.copy();
    Configuration cloneConfig = configND4.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND4, 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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
View Full Code Here

    final String name = "testComputeGD_ND2";
    Configuration configND4 = config.copy();
    Configuration cloneConfig = configND4.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND4, 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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
View Full Code Here

    Configuration configND4 = config.copy();
    Configuration cloneConfig = configND4.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND4, 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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
   
View Full Code Here

    Configuration configND4 = config.copy();
    Configuration cloneConfig = configND4.copy();cloneConfig.setLearnerCloneGraph(true);
    String common = "A-a->B-p->B\nA-a->C-q->C\nA-a->D-r->D";
    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND4, 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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
   
View Full Code Here

    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND4, 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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
   
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 6,0,threadNumber,configND4,converter);
/*
    ChangesDisplay disp = new ChangesDisplay(null);
View Full Code Here

    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND4, 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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
   
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 6,0,threadNumber,configND4,converter);
/*
    ChangesDisplay disp = new ChangesDisplay(null);
View Full Code Here

    LearnerGraphND grA = buildLearnerGraphND("A-a->E-s->E\nA-a->F-v->F\nC-p->S\n"+common,name+"A",configND4, 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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
   
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 6,0,threadNumber,configND4,converter);
/*
    ChangesDisplay disp = new ChangesDisplay(null);
View Full Code Here

    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);
    LearnerGraphND grB = buildLearnerGraphND("A-a->G-u->G\nA-a->H-t->H\nC-q->T\n"+common,name+"B",configND4, 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("B"), grB.findVertex("T"),JUConstants.PAIRCOMPATIBILITY.INCOMPATIBLE);
   
    LearnerGraphND result = checkDiffBetweenND(grA, grB, 6,0,threadNumber,configND4,converter);
/*
    ChangesDisplay disp = new ChangesDisplay(null);
    gd.computeGD(grA, grB, threadNumber, disp,config);System.out.println(disp.toString());*/
 
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.