Examples of containsVertex()


Examples of cu.repsystestbed.graphs.ReputationGraph.containsVertex()

        }
        Agent src = new Agent(new Integer(feedbackInstance[0]));
        Agent sink = new Agent(new Integer(feedbackInstance[1]));
        Double reputation = new Double(feedbackInstance[2]);
       
        if(!repGraph.containsVertex(src))
        {
          repGraph.addVertex(src);
        }
       
        if(!repGraph.containsVertex(sink))
View Full Code Here

Examples of cu.repsystestbed.graphs.ReputationGraph.containsVertex()

        if(!repGraph.containsVertex(src))
        {
          repGraph.addVertex(src);
        }
       
        if(!repGraph.containsVertex(sink))
        {
          repGraph.addVertex(sink);
        }
       
        repGraph.addEdge(src, sink);
View Full Code Here

Examples of cu.repsystestbed.graphs.TrustGraph.containsVertex()

          feedbackInstance[i] = temp.stringValue(i);         
        }
        Agent src = new Agent(new Integer(feedbackInstance[0]));
        Agent sink = new Agent(new Integer(feedbackInstance[1]));
       
        if(!trustGraph.containsVertex(src))
        {
          trustGraph.addVertex(src);
        }
       
        if(!trustGraph.containsVertex(sink))
View Full Code Here

Examples of cu.repsystestbed.graphs.TrustGraph.containsVertex()

        if(!trustGraph.containsVertex(src))
        {
          trustGraph.addVertex(src);
        }
       
        if(!trustGraph.containsVertex(sink))
        {
          trustGraph.addVertex(sink);
        }
       
        trustGraph.addEdge(src, sink);
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFGraph.containsVertex()

      }
     
      LFGraph graph = localContext.getGraph();
     
      @SuppressWarnings("unchecked")
      Set<LFEdge> outgoingEdges = graph.containsVertex(localContext.vertex)
          ? graph.outgoingEdgesOf(localContext.vertex) : Collections.EMPTY_SET;
     
      if(outgoingEdges.isEmpty()) { // leaf?
        setPredicateName(localContext);
      }
View Full Code Here

Examples of org._3pq.jgrapht.DirectedGraph.containsVertex()

     */
    Iterator<String> keys = nodeRefs.keySet().iterator();
    while(keys.hasNext()) {
      //a node
      String key = keys.next();
      if(!dg.containsVertex(key)) {
        dg.addVertex(key);
      }
      //and its children
      Set<String> children = nodeRefs.get(key);
      Iterator<String> childrenIt = children.iterator();
View Full Code Here

Examples of org._3pq.jgrapht.DirectedGraph.containsVertex()

      //and its children
      Set<String> children = nodeRefs.get(key);
      Iterator<String> childrenIt = children.iterator();
      while(childrenIt.hasNext()){
        String child = childrenIt.next();
        if(!dg.containsVertex(child)) {
          dg.addVertex(child);
        }
        //add edge, precondition: vertex key - child are already added to the graph
        Edge de = def.createEdge(key, child);
        dg.addEdge(de);
View Full Code Here

Examples of org._3pq.jgrapht.UndirectedGraph.containsVertex()

  //xxx Insanely inefficient stub
  public boolean isConnected (Variable v1, Variable v2)
  {
    UndirectedGraph g = Graphs.mdlToGraph (this);
    ConnectivityInspector ins = new ConnectivityInspector (g);
    return g.containsVertex (v1) && g.containsVertex (v2) && ins.pathExists (v1, v2);
  }

}
View Full Code Here

Examples of org._3pq.jgrapht.UndirectedGraph.containsVertex()

  //xxx Insanely inefficient stub
  public boolean isConnected (Variable v1, Variable v2)
  {
    UndirectedGraph g = Graphs.mdlToGraph (this);
    ConnectivityInspector ins = new ConnectivityInspector (g);
    return g.containsVertex (v1) && g.containsVertex (v2) && ins.pathExists (v1, v2);
  }

}
View Full Code Here

Examples of org._3pq.jgrapht.graph.DefaultDirectedGraph.containsVertex()

     */
    Iterator<String> keys = nodeRefs.keySet().iterator();
    while(keys.hasNext()) {
      //a node
      String key = keys.next();
      if(!dg.containsVertex(key)) {
        dg.addVertex(key);
      }
      //and its children
      Set<String> children = nodeRefs.get(key);
      Iterator<String> childrenIt = children.iterator();
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.