Examples of DirectedSparseVertex


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

  @Test
  public final void testGetData_Empty2()
  {
    DirectedSparseGraph g = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum(JUConstants.INITIAL, true,UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    g.addVertex(init);
    PTASequenceEngine engine = new PTA_FSMStructure(new LearnerGraph(g,config));
    vertifyPTA(engine, 1, new String[][] {
        new String[] {}
    });
View Full Code Here

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

   */
  @Test
  public final void test_sequenceSet_testing_shouldBeReturned4()
  {
    DirectedSparseGraph g = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, false, UserData.SHARED);
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    g.addVertex(init);
    final LearnerGraph machine = new LearnerGraph(g,config);
    en = new PTA_FSMStructure(machine) {
      {
        init(machine.new FSMImplementation(){
View Full Code Here

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

  /** Tests that we choke on an empty graph. */
  @Test(expected=IllegalArgumentException.class)
  public final void test_containsSequence1_fail()
  {
    DirectedSparseGraph g = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, false, UserData.SHARED);
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    g.addVertex(init);
    PTASequenceEngine engine = new PTA_FSMStructure(new LearnerGraph(g,config));
    engine.containsSequence(new ArrayList<String>());
  }
View Full Code Here

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

     
      for(int i = 1;i<=string.size();i++){
        List<String> current = string.subList(0, i);
        Vertex existing = getVertex(pta,current);

        Vertex newVertex = new DirectedSparseVertex();
        if (i == string.size())// KIRR: every prefix of a reject sequence is an accept sequence.
          newVertex.setUserDatum(JUConstants.ACCEPTED, accepted, UserData.SHARED);
        else
          newVertex.setUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);
       
        if(existing == null){
          pta.addVertex(newVertex);
          Vertex previous;
          previous = getVertex(pta, string.subList(0, i-1));// for i==1, getVertex will return the initial vertex
View Full Code Here

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

     
      for(int i = 1;i<=string.size();i++){
        List<String> current = string.subList(0, i);
        Vertex existing = getVertex(pta,current);

        Vertex newVertex = new DirectedSparseVertex();
        if (i == string.size())// KIRR: every prefix of a reject sequence is an accept sequence.
          newVertex.setUserDatum(JUConstants.ACCEPTED, accepted, UserData.SHARED);
        else
          newVertex.setUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);
       
        if(existing == null){
          pta.addVertex(newVertex);
          Vertex previous;
          previous = getVertex(pta, string.subList(0, i-1));// for i==1, getVertex will return the initial vertex
View Full Code Here

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

  /** The configuration to use when running tests. */
  private Configuration config = null, mainConfiguration = null;

  static protected OrigStatePair constructOrigPair(String a,String b)
  {
    DirectedSparseVertex aV = new DirectedSparseVertex(), bV = new DirectedSparseVertex();
    aV.addUserDatum(JUConstants.LABEL, a, UserData.SHARED);
    bV.addUserDatum(JUConstants.LABEL, b, UserData.SHARED);
    return new OrigStatePair(aV,bV);
  }
View Full Code Here

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

public class TestFSMAlgo {

  static protected StatePair constructPair(String a,String b)
  {
    DirectedSparseVertex aV = new DirectedSparseVertex(), bV = new DirectedSparseVertex();
    aV.addUserDatum(JUConstants.LABEL, a, UserData.SHARED);
    bV.addUserDatum(JUConstants.LABEL, b, UserData.SHARED);
    return new StatePair(aV,bV);
  }
View Full Code Here

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

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

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

  }
 
  @Test
  public void testGraphConstructionFail3()
  {
    DirectedSparseVertex v = new DirectedSparseVertex();
    v.addUserDatum(JUConstants.ACCEPTED, "true", UserData.SHARED);v.addUserDatum(JUConstants.LABEL, "CONFL", UserData.SHARED);
    checkWithVertex(v, "multiple", "testGraphConstructionFail3");
  }
View Full Code Here

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

  }
 
  @Test
  public void testGraphConstructionFail4()
  {
    DirectedSparseVertex v = new DirectedSparseVertex();
    v.addUserDatum(JUConstants.ACCEPTED, "true", UserData.SHARED);v.addUserDatum(JUConstants.LABEL, "Q", UserData.SHARED);v.addUserDatum(JUConstants.PROPERTY, JUConstants.INIT, UserData.SHARED);
    checkWithVertex(v, "duplicate", "testGraphConstructionFail4");
  }
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.