Examples of addEdge()


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

        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);
      }
    }
    /*
     * find the id's participating in the cycle, and return the intersection
     * with set of id's which actually produce references.
View Full Code Here

Examples of org._3pq.jgrapht.graph.ListenableUndirectedGraph.addEdge()

    while (edgesAdded < numCliques - 1) {
      VarSet[] pair = (VarSet[]) pq.first();
      pq.remove(pair);

      if (!inspector.pathExists(pair[0], pair[1])) {
          g.addEdge(pair[0], pair[1]);
          edgesAdded++;
      }
    }

    JunctionTree jt = graphToJt(g);
View Full Code Here

Examples of org._3pq.jgrapht.graph.SimpleGraph.addEdge()

      Factor factor = (Factor) it.next ();
      VarSet varSet = factor.varSet ();
      int nv = varSet.size ();
      for (int i = 0; i < nv; i++) {
        for (int j = i + 1; j < nv; j++) {
          g.addEdge (varSet.get (i), varSet.get (j));
        }
      }
    }

    return g;
View Full Code Here

Examples of org.antlr.misc.Graph.addEdge()

                GrammarSpelunker grammar = new GrammarSpelunker(inputDirectory, gfile);
                grammar.parse();
                String vocabName = grammar.getTokenVocab();
                String grammarName = grammar.getGrammarName();
                // Make all grammars depend on any tokenVocab options
                if ( vocabName!=null ) g.addEdge(gfile, vocabName+CodeGenerator.VOCAB_FILE_EXTENSION);
                // Make all generated tokens files depend on their grammars
                g.addEdge(grammarName+CodeGenerator.VOCAB_FILE_EXTENSION, gfile);
            }
            catch (FileNotFoundException fnfe) {
                ErrorManager.error(ErrorManager.MSG_CANNOT_OPEN_FILE, gfile);
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.Graph.addEdge()

        OutputNode outParamNode = (OutputNode) workflow.addNode(this.outputComponent);
        outParamNode.setPosition(new Point(370, 240));

        // Connect ports
        graph.addEdge(paramNode1.getOutputPort(0), adderNode1.getInputPort(0));
        graph.addEdge(paramNode2.getOutputPort(0), adderNode1.getInputPort(1));
        graph.addEdge(paramNode3.getOutputPort(0), adderNode2.getInputPort(0));
        graph.addEdge(paramNode4.getOutputPort(0), adderNode2.getInputPort(1));
        graph.addEdge(adderNode1.getOutputPort(0), multiNode.getInputPort(0));
        graph.addEdge(adderNode2.getOutputPort(0), multiNode.getInputPort(1));
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.ws.WSGraph.addEdge()

        Node multiplier2 = workflow.addNode(multiplierComponent);
        multiplier2.setPosition(new Point(170, 210));
        repaintAndWait(1);

        graph.addEdge(c.getOutputPort(0), multiplier2.getInputPort(0));
        repaintAndWait(1);

        graph.addEdge(d.getOutputPort(0), multiplier2.getInputPort(1));
        repaintAndWait(1);
View Full Code Here

Examples of org.apache.airavata.xbaya.graph.Graph.addEdge()

            for (int i = 0; i < outputPorts.size(); ++i) {
                List<Port> toPorts = this.node.getOutputPort(i).getToPorts();
                for (Port port : toPorts) {
                    graph.removeEdge(this.node.getOutputPort(i), port);
                    graph.addEdge(outputPorts.get(i), port);
                }

            }

            this.engine.getWorkflow().removeNode(this.node);
View Full Code Here

Examples of org.apache.airavata.xbaya.graph.ws.WSGraph.addEdge()

        // Output parameter
        OutputNode outParamNode = (OutputNode) workflow.addNode(outputComponent);
        outParamNode.setPosition(new Point(863, 169));

        // Connect ports
        graph.addEdge(confInput.getOutputPort(0), wrfPreNode.getInputPort(0));
        graph.addEdge(confInput.getOutputPort(0), arp2wrfNode.getInputPort(0));
        graph.addEdge(confInput.getOutputPort(0), adasIntNode.getInputPort(1));
        graph.addEdge(confInput.getOutputPort(0), lateralIntNode.getInputPort(1));
        graph.addEdge(confInput.getOutputPort(0), terrainPreNode.getInputPort(0));
        graph.addEdge(terrainPreNode.getOutputPort(0), adasIntNode.getInputPort(2));
View Full Code Here

Examples of org.apache.hama.graph.example.PageRank.PageRankVertex.addEdge()

        PageRankVertex v = new PageRank.PageRankVertex();
        v.setVertexID(new Text(i + ""));
        if (i % 2 == 0) {
          v.setValue(new DoubleWritable(i * 2));
        }
        v.addEdge(new Edge<Text, NullWritable>(new Text((10 - i) + ""), null));

        list.add(v);
      }

      info.init(null, conf, attempt);
View Full Code Here

Examples of org.apache.tez.dag.api.DAG.addEdge()

         
          // finally we can create the grouped edge
          GroupInputEdge e = utils.createEdge(group, workToConf.get(v),
               workToVertex.get(v), work.getEdgeProperty(w, v));

          dag.addEdge(e);
        }
      } else {
        // Regular vertices
        JobConf wxConf = utils.initializeVertexConf(conf, w);
        Vertex wx = utils.createVertex(wxConf, w, scratchDir, appJarLr,
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.