Examples of addUserDatum()


Examples of edu.uci.ics.jung.graph.impl.DirectedSparseEdge.addUserDatum()

    }
    Iterator<DirectedSparseEdge> outEdges = q.getOutEdges().iterator();
    while(outEdges.hasNext()){
      DirectedSparseEdge e = outEdges.next();
      DirectedSparseEdge eDash = new DirectedSparseEdge(qDash, e.getDest());
      eDash.addUserDatum(JUConstants.LABEL, e.getUserDatum(JUConstants.LABEL), UserData.CLONE);
      if(!qDash.getSuccessors().contains(e.getDest()))
        model.addEdge(eDash);
      else{
        Edge existing = findEdge(qDash, e.getDest());
        Set<String> labels = (Set<String>)existing.getUserDatum(JUConstants.LABEL);
View Full Code Here

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseEdge.addUserDatum()

          Vertex previous;
          previous = getVertex(pta, string.subList(0, i-1));// for i==1, getVertex will return the initial vertex
          DirectedSparseEdge e = new DirectedSparseEdge(previous, newVertex);
          Set<String> labels = new HashSet<String>();
          labels.add(string.get(i-1));
          e.addUserDatum(JUConstants.LABEL, labels, UserData.CLONE);
          pta.addEdge(e);
        }
        else
          if (different(new OrigStatePair(existing,newVertex)))
          {
View Full Code Here

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseEdge.addUserDatum()

    Iterator<DirectedSparseEdge> inEdges = q.getInEdges().iterator();
    Set<DirectedSparseEdge> removeEdges = new HashSet<DirectedSparseEdge>();
    while(inEdges.hasNext()){
      DirectedSparseEdge e = inEdges.next();
      DirectedSparseEdge eDash = new DirectedSparseEdge(e.getSource(), qDash);
      eDash.addUserDatum(JUConstants.LABEL, e.getUserDatum(JUConstants.LABEL), UserData.CLONE);
      if(!e.getSource().getSuccessors().contains(qDash))
        model.addEdge(eDash);
      else{
        Edge existing = findEdge(e.getSource(), qDash);
        Set<String> labels = (Set<String>)existing.getUserDatum(JUConstants.LABEL);// KIRR: if you use UserData.SHARED, you do not need to copy the result back using put
View Full Code Here

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseEdge.addUserDatum()

    }
    Iterator<DirectedSparseEdge> outEdges = q.getOutEdges().iterator();
    while(outEdges.hasNext()){
      DirectedSparseEdge e = outEdges.next();
      DirectedSparseEdge eDash = new DirectedSparseEdge(qDash, e.getDest());
      eDash.addUserDatum(JUConstants.LABEL, e.getUserDatum(JUConstants.LABEL), UserData.CLONE);
      if(!qDash.getSuccessors().contains(e.getDest()))
        model.addEdge(eDash);
      else{
        Edge existing = findEdge(qDash, e.getDest());
        Set<String> labels = (Set<String>)existing.getUserDatum(JUConstants.LABEL);
View Full Code Here

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseEdge.addUserDatum()

          Vertex previous;
          previous = getVertex(pta, string.subList(0, i-1));// for i==1, getVertex will return the initial vertex
          DirectedSparseEdge e = new DirectedSparseEdge(previous, newVertex);
          Set<String> labels = new HashSet<String>();
          labels.add(string.get(i-1));
          e.addUserDatum(JUConstants.LABEL, labels, UserData.CLONE);
          pta.addEdge(e);
        }
        else
          if (different(new OrigStatePair(existing,newVertex)))
          {
View Full Code Here

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

                            {
                              Configuration config = Configuration.getDefaultConfiguration().copy();
                              LearnerGraphND machine = new LearnerGraphND(config);Synapse.StatechumProcess.parseStatemachine(message.elementAt(2),machine,null,true);
                              DirectedSparseGraph fsmPicture = machine.pathroutines.getGraph();
                              if (!fsmPicture.containsUserDatumKey(JUConstants.LAYOUTOPTIONS))
                                fsmPicture.addUserDatum(JUConstants.LAYOUTOPTIONS,new LayoutOptions(), UserData.SHARED);
                              int windowNumber = setOptions(message,3,fsmPicture);
                              if (windowNumber >= 0)
                                Visualiser.updateFrameWithPos(fsmPicture,windowNumber);

                              outcome = new OtpErlangTuple(new OtpErlangObject[]{ref,msgOk});
View Full Code Here

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

      }
     
      possibleMerges = topLearner.ChooseStatePairs(scoreComputer);
      //System.out.println(possibleMerges);
    }
    DirectedSparseGraph result = scoreComputer.paths.getGraph();result.addUserDatum(JUConstants.STATS, report.toString(), UserData.SHARED);
    if(config.getDebugMode())
      updateGraph(scoreComputer);
    return result;
  }
}
View Full Code Here

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseVertex.addUserDatum()

  private Vertex createNode(String nodeKey) {
    nodeCount++;
   
    Vertex node = new DirectedSparseVertex();
    node.addUserDatum("strength", new Integer(1), new UserDataContainer.CopyAction.Shared());
    node.addUserDatum("label", nodeKey, new UserDataContainer.CopyAction.Shared());
   
    outputGraph.addVertex(node);
    nodeLabels.add(nodeKey);
   
View Full Code Here

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseVertex.addUserDatum()

  private Vertex createNode(String nodeKey) {
    nodeCount++;
   
    Vertex node = new DirectedSparseVertex();
    node.addUserDatum("strength", new Integer(1), new UserDataContainer.CopyAction.Shared());
    node.addUserDatum("label", nodeKey, new UserDataContainer.CopyAction.Shared());
   
    outputGraph.addVertex(node);
    nodeLabels.add(nodeKey);
   
    return node;
View Full Code Here

Examples of edu.uci.ics.jung.graph.impl.DirectedSparseVertex.addUserDatum()

  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 = computeAlphabet(g);
   
    // second pass - checking if any transitions need to be added.
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.