Package statechum.DeterministicDirectedSparseGraph

Examples of statechum.DeterministicDirectedSparseGraph.DeterministicEdge


          else
            if (DeterministicDirectedSparseGraph.isAccept(toVertex) != accept)
              throw new IllegalArgumentException("conflicting acceptance assignment on vertex "+to);
       
        StatePair pair = new StatePair(fromVertex,toVertex);
        DeterministicEdge edge = existingEdges.get(pair);
        if (edge == null)
        {
          edge = new DeterministicDirectedSparseGraph.DeterministicEdge(fromVertex,toVertex);
          edge.addUserDatum(JUConstants.LABEL, new HashSet<String>(), UserData.CLONE);
          g.addEdge(edge);existingEdges.put(pair,edge);
        }
       
        Set<String> labels = (Set<String>)edge.getUserDatum(JUConstants.LABEL);
        labels.add(label);
      }

      @Override
      public void accept(String from, String to, String label) {
View Full Code Here


         */
        public Color getEdgeColour(ArchetypeEdge e, String currentLabel) {
            Color result = null;

            if (e instanceof DeterministicEdge) {
                DeterministicEdge edge = (DeterministicEdge) e;
                String source = edge.getSource().getUserDatum(JUConstants.LABEL).toString(), target = edge.getDest().getUserDatum(JUConstants.LABEL).toString();
                if (transitionColours != null && transitionColours.containsKey(source) && transitionColours.get(source).containsKey(currentLabel)) {
                    result = transitionColours.get(source).get(currentLabel).get(target);
                }
            }
            return result;
View Full Code Here

        for(Entry<CmpVertex,Set<Label>> tgtEntry:entry.getValue().entrySet())
        {
          CmpVertex targetOld = tgtEntry.getKey();
          assert coregraph.findVertex(targetOld.getID()) == targetOld : "was looking for vertex with name "+targetOld.getID()+", got "+coregraph.findVertex(targetOld.getID());
          DeterministicVertex target = oldToNew.get(targetOld);
          DeterministicEdge e = new DeterministicEdge(source,target);
          e.addUserDatum(JUConstants.LABEL, tgtEntry.getValue(), UserData.CLONE);
          result.addEdge(e);
        }
      }
    }
    return result;
View Full Code Here

        for(Entry<CmpVertex,Set<Label>> tgtEntry:entry.getValue().entrySet())
        {
          CmpVertex targetOld = tgtEntry.getKey();
          assert coregraph.findVertex(targetOld) == targetOld : "was looking for vertex with name "+targetOld+", got "+coregraph.findVertex(targetOld);
          DeterministicVertex target = oldToNew.get(targetOld);
          DeterministicEdge e = new DeterministicEdge(source,target);
          e.addUserDatum(JUConstants.LABEL, tgtEntry.getValue(), UserData.CLONE);
          result.addEdge(e);
        }
      }
    }
    return result;
View Full Code Here

      {
        DeterministicVertex source = oldToNew.get(entry.getKey());
        for(Entry<CmpVertex,Set<String>> 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);
        }
      }
    }
    return result;
View Full Code Here

        for(Entry<CmpVertex,Set<String>> tgtEntry:entry.getValue().entrySet())
        {
          CmpVertex targetOld = tgtEntry.getKey();
          assert coregraph.findVertex(targetOld.getID()) == targetOld : "was looking for vertex with name "+targetOld.getID()+", got "+coregraph.findVertex(targetOld.getID());
          DeterministicVertex target = oldToNew.get(targetOld);
          DeterministicEdge e = new DeterministicEdge(source,target);
          e.addUserDatum(JUConstants.LABEL, tgtEntry.getValue(), UserData.CLONE);
          result.addEdge(e);
        }
      }
    }
    return result;
View Full Code Here

TOP

Related Classes of statechum.DeterministicDirectedSparseGraph.DeterministicEdge

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.