Examples of DeterministicVertex


Examples of statechum.DeterministicDirectedSparseGraph.DeterministicVertex

      Map<CmpVertex,DeterministicVertex> oldToNew = new HashMapWithSearch<CmpVertex,DeterministicVertex>(coregraph.getStateNumber());
      // add states
      for(Entry<CmpVertex,Map<CmpVertex,Set<Label>>> entry:flowgraph.entrySet())
      {
        CmpVertex source = entry.getKey();
        DeterministicVertex vert = new DeterministicVertex(source);
        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())
      {
        DeterministicVertex source = oldToNew.get(entry.getKey());
        for(Entry<CmpVertex,Set<Label>> tgtEntry:entry.getValue().entrySet())
        {
          DeterministicVertex target = oldToNew.get(tgtEntry.getKey());
          DeterministicEdge e = new DeterministicEdge(source,target);
          e.addUserDatum(JUConstants.LABEL, tgtEntry.getValue(), UserData.CLONE);
          result.addEdge(e);
        }
      }
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.