Package statechum.DeterministicDirectedSparseGraph

Examples of statechum.DeterministicDirectedSparseGraph.VertexID


  }
 
  @Test
  public void testVertexIDLess1()
  {
    VertexID pA=new VertexID(VertKind.POSITIVE,5), pB=new VertexID(idP5),
      qA = new VertexID(VertKind.POSITIVE,6);
    checkLessHelper(pA,qA);
    checkLessHelper(pB,qA);// now qA has a cached representation of its string value.
    checkLessHelper(pB,qA);
    checkLessHelper(pA,qA);
  }
View Full Code Here


  }
 
  @Test
  public void testVertexIDLess2()
  {
    VertexID pA=new VertexID(idP5), pB=new VertexID(VertKind.POSITIVE,5),
      qA = new VertexID(idP6);
    checkLessHelper(pA,qA);
    checkLessHelper(pB,qA);// now pB has a cached representation of its string value.
    checkLessHelper(pB,qA);
    checkLessHelper(pA,qA);
  }
View Full Code Here

  }
 
  @Test
  public void testVertexIDLess3()
  {
    VertexID pA=new VertexID(VertKind.POSITIVE,5), pB=new VertexID(VertKind.POSITIVE,10),
      qA = new VertexID(VertKind.POSITIVE,6);
    checkLessHelper(pA,qA);
    checkLessHelper(pA,pB);
    checkLessHelper(qA,pB);
   
    Assert.assertTrue("P10".compareTo("P5") < 0);
   
    Assert.assertTrue(pB.compareTo(new VertexID(idP5)) > 0);
   
    checkLessHelper(pA,qA);
    checkLessHelper(pA,pB);
    checkLessHelper(qA,pB);
  }
View Full Code Here

    Assert.assertEquals(expected, new LearnerGraph(g,config).wmethod.computeAlphabet());
    Assert.assertEquals(expected, DeterministicDirectedSparseGraph.computeAlphabet(g));       

    LearnerGraph clone = new LearnerGraph(g,config).copy(config);
    Assert.assertFalse( clone.paths.completeGraph(
        new VertexID("REJECT")));
    Assert.assertFalse(DeterministicDirectedSparseGraph.completeGraph(g,"REJECT"));
  }
View Full Code Here

  {
    DirectedSparseGraph g = buildGraph(originalGraph, testName);
    Assert.assertEquals(whetherToBeCompleted,DeterministicDirectedSparseGraph.completeGraph(g,"REJECT"));checkM(g, expectedOutcome,config);   
    LearnerGraph fsm = new LearnerGraph(buildGraph(originalGraph, testName),config);
    Assert.assertEquals(whetherToBeCompleted,fsm.paths.completeGraph(
        new VertexID("REJECT")));
    WMethod.checkM(fsm, new LearnerGraph(buildGraph(expectedOutcome,testName),config));       
  }
View Full Code Here

  /** Checks that passing a name of an existing state causes an exception to be thrown. */
  @Test(expected=IllegalArgumentException.class)
  public void complete_fail()
  {
    new LearnerGraph(buildGraph("A-a->A-b->B-c->B", "complete_fail"),config).paths.completeGraph(
        new VertexID("B"));
  }
View Full Code Here

  @Test
  public void testFindVertex4b()
  {
    Vertex v =  DeterministicDirectedSparseGraph.findVertex(JUConstants.INITIAL, true, buildGraph("A-a->A-b->B-c->B-a->C\nQ-d->S", "testFindVertex4b"));
    Assert.assertEquals(new VertexID("A"), v.getUserDatum(JUConstants.LABEL));
  }
View Full Code Here

  }

  @Test
  public void testFindVertex5()
  {
    Vertex v =  DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("A"), buildGraph("A-a->A-b->B-c->B-a->C\nQ-d->S", "testFindVertex5"));
    Assert.assertEquals(new VertexID("A"), v.getUserDatum(JUConstants.LABEL));
  }
View Full Code Here

  }
 
  @Test
  public void testFindVertex6()
  {
    Vertex v =  DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("C"), buildGraph("A-a->A-b->B-c->B-a->C\nQ-d->S", "testFindVertex6"));
    Assert.assertEquals(new VertexID("C"), v.getUserDatum(JUConstants.LABEL));
  }
View Full Code Here

  }
 
  @Test
  public void testFindVertex7()
  {
    Vertex v = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("S"), buildGraph("A-a->A-b->B-c->B-a->C\nQ-d->S", "testFindVertex7"));
    Assert.assertEquals(new VertexID("S"), v.getUserDatum(JUConstants.LABEL));
  }
View Full Code Here

TOP

Related Classes of statechum.DeterministicDirectedSparseGraph.VertexID

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.