Package edu.uci.ics.jung.graph.impl

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseGraph


  }
   
  @Test
  public final void testGetTempRed1()
  {
    DirectedSparseGraph a=FsmParser.buildGraph("A-a->B", "testGetTempRed1 model"),
      temp=FsmParser.buildGraph("C-d->Q", "testGetTempRed1 temp");
    Vertex foundA = getTempRed_DijkstraShortestPath(a, DeterministicDirectedSparseGraph.findInitial(a), temp);
    Vertex foundB =Test_Orig_RPNIBlueFringeLearnerTestComponent.getTempRed(a, DeterministicDirectedSparseGraph.findInitial(a), temp);
    Assert.assertTrue(DeterministicDirectedSparseGraph.findInitial(temp).equals(foundA));
    Assert.assertTrue(DeterministicDirectedSparseGraph.findInitial(temp).equals(foundB));
View Full Code Here


  }
 
  @Test
  public final void testGetTempRed2()
  {
    DirectedSparseGraph a=FsmParser.buildGraph("A-a->B-a->B-c->C-c->D", "testGetTempRed1 model"),
      temp=FsmParser.buildGraph("C-a->Q-a->Q-c->Q", "testGetTempRed1 temp");
    Vertex foundA = getTempRed_DijkstraShortestPath(a, DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("D"), a), temp);
    Vertex foundB = Test_Orig_RPNIBlueFringeLearnerTestComponent.getTempRed(a, DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("D"), a), temp);
    Assert.assertTrue(DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("Q"), temp).equals(foundA));
    Assert.assertTrue(DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("Q"), temp).equals(foundB));
View Full Code Here

  }
 
  @Test
  public final void findMergeablePair1()
  {
    DirectedSparseGraph g=FsmParser.buildGraph("A-a->B\nA-b->B\nA-c->C\nA-d->D", "findMergeablePair1");
    Assert.assertNull(Test_Orig_RPNIBlueFringeLearner.findMergablePair(g));
  }
View Full Code Here

  }
 
  @Test
  public final void findMergeablePair2()
  {
    DirectedSparseGraph g=FsmParser.buildGraph("A-a->B\nA-b->B\nA-c->D\nA-b->D\nA-d->E", "findMergeablePair2");
    Vertex
      b = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("B"), g),
      d = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("D"), g);
    Set<Vertex> expected = new HashSet<Vertex>();expected.add(d);expected.add(b);
    Set<Vertex> actualA = new HashSet<Vertex>();
View Full Code Here

  }
 
  @Test
  public final void findMergeablePair3a()
  {
    DirectedSparseGraph g=FsmParser.buildGraph("S-p->A-a->S\nA-b->S\nA-c->D\nA-b->D\nA-d->E", "findMergeablePair3a");
    Vertex
      s = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("S"), g),
      d = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("D"), g);
    OrigStatePair expected = new OrigStatePair(d,s),
    actualA = Test_Orig_RPNIBlueFringeLearner.findMergablePair(g);
View Full Code Here

  }

  @Test
  public final void findMergeablePair3b()
  {
    DirectedSparseGraph g=FsmParser.buildGraph("S-p->A-a->B\nA-b->B\nA-c->S\nA-b->S\nA-d->E", "findMergeablePair3b");
    Vertex
      b = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("B"), g),
      s = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("S"), g);
    OrigStatePair expected = new OrigStatePair(b,s),
    actualA = Test_Orig_RPNIBlueFringeLearner.findMergablePair(g);
View Full Code Here

  }

  @Test
  public final void findMergeablePair4()
  {
    DirectedSparseGraph g=FsmParser.buildGraph("S-p->A-a->B\nA-b->B\nA-c-#D\nA-b-#D\nA-d->E", "findMergeablePair4");
    OrigStatePair actualA = Test_Orig_RPNIBlueFringeLearner.findMergablePair(g);
    Assert.assertNull(actualA);
  }
View Full Code Here

   * be false.
   */
  public void checkCorrectnessOfMerging(String machineToMerge, String expectedFSM,
      String stateBlue, String stateRed, String graphName, boolean checkWithEquals)
  {
    DirectedSparseGraph g=FsmParser.buildGraph(machineToMerge, graphName),
      g2=(DirectedSparseGraph)g.copy();
    Vertex
      a = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID(stateRed), g),
      b = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID(stateBlue), g);
       
    Assert.assertNotNull("state "+stateRed+" was not found", a);
View Full Code Here

  }

  @Test
  public final void testMerge1a()
  {
    DirectedSparseGraph g=FsmParser.buildGraph("S-p->A-a->S\nA-b->S\nA-c->D\nA-b->D\nA-d->E\nS-n->U", "testMerge1a");
    Vertex
      s = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("S"), g),
      d = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("U"), g);
    OrigStatePair pair = new OrigStatePair(d,s);
    LearnerGraph
View Full Code Here

 
  @Test(expected = IllegalArgumentException.class)
  public final void testMerge_fail1a()
  {
    DirectedSparseGraph g=FsmParser.buildGraph(largeGraph1_invalid5,"testMerge_fail1");
    CmpVertex
      a = DeterministicDirectedSparseGraph.findVertexNamed(new VertexID("A"), g),
      b = DeterministicDirectedSparseGraph.findVertexNamed(new VertexID("B"), g);
    StatePair pair = new StatePair(b,a);// A is red
    MergeStates.mergeAndDeterminize(g, pair,testConfig);
View Full Code Here

TOP

Related Classes of edu.uci.ics.jung.graph.impl.DirectedSparseGraph

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.