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

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseGraph.addVertex()


          {
            toVertex = new DeterministicDirectedSparseGraph.DeterministicVertex(to);
            toVertex.removeUserDatum(JUConstants.ACCEPTED); // in case we've got a reject loop in the same state
            toVertex.addUserDatum(JUConstants.ACCEPTED, accept, UserData.SHARED);
            existingVertices.put(to, toVertex);
            g.addVertex(toVertex);
          }
          else
            if (DeterministicDirectedSparseGraph.isAccept(toVertex) != accept)
              throw new IllegalArgumentException("conflicting acceptance assignment on vertex "+to);
       
View Full Code Here


        if (coregraph.init == source)
          vert.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
        vert.setAccept(source.isAccept());
        vert.setColour(source.getColour());
        vert.setHighlight(source.isHighlight());
        result.addVertex(vert);
        oldToNew.put(source,vert);
      }
     
      // now add transitions
      for(Entry<CmpVertex,Map<CmpVertex,Set<String>>> entry:flowgraph.entrySet())
View Full Code Here

        if (coregraph.getInit() == source)
          vert.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
        vert.setAccept(source.isAccept());
        vert.setColour(source.getColour());
        vert.setHighlight(source.isHighlight());
        result.addVertex(vert);
        oldToNew.put(source,vert);
      }
     
      // now add transitions
      for(Entry<CmpVertex,Map<CmpVertex,Set<Label>>> entry:flowgraph.entrySet())
View Full Code Here

    DirectedSparseGraph pta = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);
    pta.setUserDatum(JUConstants.TITLE, "Hypothesis machine", UserData.SHARED);
    pta.addVertex(init);
    DeterministicDirectedSparseGraph.numberVertices(pta);
    return pta;
  }

  /** Computes an alphabet of a given graph and adds transitions to a
View Full Code Here

    DirectedSparseGraph g = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    init.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);
    g.addVertex(init);
    checkTestGenerationResult(new LearnerGraph(g,config),0, new String[][] {
        new String[] {}
      });
  }
 
View Full Code Here

    DirectedSparseGraph g = new DirectedSparseGraph();
    DirectedSparseVertex init = new DirectedSparseVertex();
    init.addUserDatum(JUConstants.LABEL, "A", UserData.SHARED);
    init.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
    init.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);
    g.addVertex(init);
    checkTestGenerationResult(new LearnerGraph(g,config),2, new String[][] {
        new String[] {}
      });
  }
 
View Full Code Here

        if (coregraph.getInit() == source)
          vert.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
        vert.setAccept(source.isAccept());
        vert.setColour(source.getColour());
        vert.setHighlight(source.isHighlight());
        result.addVertex(vert);
        oldToNew.put(source,vert);
      }
     
      // now add transitions
      for(Entry<CmpVertex,Map<CmpVertex,Set<Label>>> entry:flowgraph.entrySet())
View Full Code Here

      {
        CmpVertex source = entry.getKey();
        DeterministicVertex vert = (DeterministicVertex)AbstractLearnerGraph.cloneCmpVertex(source,cloneConfig);
        if (coregraph.getInit() == source)
          vert.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
        result.addVertex(vert);
        oldToNew.put(source,vert);
      }
     
      // now add transitions
      for(Entry<CmpVertex,Map<CmpVertex,Set<Label>>> entry:coregraph.learnerCache.getFlowgraph().entrySet())
View Full Code Here

          fromVertex = new DeterministicDirectedSparseGraph.DeterministicVertex(from);
          if (existingVertices.isEmpty())
            fromVertex.addUserDatum(JUConstants.INITIAL, true, UserData.SHARED);
          fromVertex.addUserDatum(JUConstants.ACCEPTED, true, UserData.SHARED);
          existingVertices.put(from, fromVertex);
          g.addVertex(fromVertex);
        }
        else
          if (!Boolean.valueOf(fromVertex.getUserDatum(JUConstants.ACCEPTED).toString()))
            throw new IllegalArgumentException("conflicting acceptance assignment on vertex "+from);
View Full Code Here

          {
            toVertex = new DeterministicDirectedSparseGraph.DeterministicVertex(to);
            toVertex.removeUserDatum(JUConstants.ACCEPTED); // in case we've got a reject loop in the same state
            toVertex.addUserDatum(JUConstants.ACCEPTED, accept, UserData.SHARED);
            existingVertices.put(to, toVertex);
            g.addVertex(toVertex);
          }
          else
            if (DeterministicDirectedSparseGraph.isAccept(toVertex) != accept)
              throw new IllegalArgumentException("conflicting acceptance assignment on vertex "+to);
       
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.