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

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


  }
 
  @Test
  public void testGraphConstructionFail5()
  {
    DirectedSparseVertex v = new DirectedSparseVertex();
    v.addUserDatum(JUConstants.ACCEPTED, "true", UserData.SHARED);v.addUserDatum(JUConstants.LABEL, "Q", UserData.SHARED);v.addUserDatum(JUConstants.PROPERTY, "aa", UserData.SHARED);
    checkWithVertex(v, "property", "testGraphConstructionFail5");
  }
View Full Code Here


  @Test
  public final void testGraphConstructionFail7() // unlabelled states
  {
    DirectedSparseGraph g = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum(JUConstants.PROPERTY, JUConstants.INIT, UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, "true", UserData.SHARED);g.addVertex(init);
    boolean exceptionThrown = false;
    try
    {
      getGraphData(g);// now getGraphData should choke.     
    }
View Full Code Here

   * @param reject the name of the reject state, to be added to the graph.
   * @return true if any transitions have been added
   */  
  public static boolean completeGraph(DirectedSparseGraph g, String reject)
  {
    DirectedSparseVertex rejectVertex = new DirectedSparseVertex();
    boolean transitionsToBeAdded = false;// whether and new transitions have to be added.
    rejectVertex.addUserDatum(JUConstants.ACCEPTED, "false", UserData.SHARED);
    rejectVertex.addUserDatum(JUConstants.LABEL, reject, UserData.SHARED);
   
    // first pass - computing an alphabet
    Set<String> alphabet = WMethod.computeAlphabet(g);
   
    // second pass - checking if any transitions need to be added.
View Full Code Here

 
  @Test
  public final void testGetData_Empty1()
  {
    DirectedSparseGraph g = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum("property", "init", UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, "false", UserData.SHARED);
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    g.addVertex(init);
    PTATestSequenceEngine enVerySmall = new PTA_FSMStructure(WMethod.getGraphData(g));
    vertifyPTA(enVerySmall, new String[][] {
        new String[] {}
      });
View Full Code Here

  @Test
  public final void testGetData_Empty2()
  {
    DirectedSparseGraph g = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum("property", "init", UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, "true", UserData.SHARED);
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    g.addVertex(init);
    PTATestSequenceEngine enVerySmall = new PTA_FSMStructure(WMethod.getGraphData(g));
    vertifyPTA(enVerySmall, new String[][] {
        new String[] {}
    });
View Full Code Here

  }
 
  @Test
  public void testGraphConstructionFail2()
  {
    DirectedSparseVertex v = new DirectedSparseVertex();
    v.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);v.addUserDatum(JUConstants.LABEL, VertexID.parseID("B"), UserData.SHARED);
    checkWithVertex(v, "multiple states with the same name", "testGraphConstructionFail2");
  }
View Full Code Here

  }
 
  @Test
  public void testGraphConstructionFail3()
  {
    DirectedSparseVertex v = new DirectedSparseVertex();
    v.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);v.addUserDatum(JUConstants.LABEL, VertexID.parseID("CNFL"), UserData.SHARED);
    checkWithVertex(v, "multiple states with the same name", "testGraphConstructionFail3");
  }
View Full Code Here

  }
 
  @Test
  public void testGraphConstructionFail4a()
  {
    DirectedSparseVertex v = new DirectedSparseVertex();
    v.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);v.addUserDatum(JUConstants.LABEL, VertexID.parseID("Q"), UserData.SHARED);v.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
    checkWithVertex(v, "both labelled as initial states", "testGraphConstructionFail4a");
  }
View Full Code Here

  }
 
  @Test
  public void testGraphConstructionFail4b()
  {
    DirectedSparseVertex v = new DirectedSparseVertex();
    v.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);v.addUserDatum(JUConstants.LABEL, VertexID.parseID("Q"), UserData.SHARED);v.addUserDatum(JUConstants.INITIAL, VertexID.parseID("aa"), UserData.SHARED);
    checkWithVertex(v, "invalid init property", "testGraphConstructionFail4b");
  }
View Full Code Here

  }
 
  @Test
  public void testGraphConstructionFail5a()
  {
    DirectedSparseVertex v = new DirectedSparseVertex();
    v.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);v.addUserDatum(JUConstants.LABEL, VertexID.parseID("Q"), UserData.SHARED);v.addUserDatum(JUConstants.INITIAL, "aa", UserData.SHARED);
    checkWithVertex(v, "invalid init property", "testGraphConstructionFail5a");
  }
View Full Code Here

TOP

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

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.