Examples of addEdge()


Examples of de.timefinder.algo.graph.WeightedGraph.addEdge()

        int ALL_NODES = NO_X + NO_Y;
        for (int x = 0; x < NO_X; x++) {
            int tmpY = 0;
            for (int y = NO_X; y < ALL_NODES; y++, tmpY++) {
                if (costMatrix[tmpY][x] < floatMax) {
                    graph.addEdge(x, y, costMatrix[tmpY][x]);
                } else {
                    // we would not need this line, if we would have a better graph.getOneNodeWithAnEdge()
                    // see within the while(true) loop
                    graph.addEdge(x, y, floatMax);
                }
View Full Code Here

Examples of dk.brics.xact.analysis.flowgraph.FlowGraph.addEdge()

          Unit stmt = entry.getKey();
          StatementPair translation = entry.getValue();
          // add successors
          for (Unit next : unitgraph.getSuccsOf(stmt)) {
            StatementPair nextt = translated.get(next);
            graph.addEdge(translation.last, nextt.first, new VariableFilter());
          }
          // add (exceptional) return edge
          graph.addEdge(translation.last, method.getExit(), new VariableFilter());
        }
        // add entry edges
View Full Code Here

Examples of edu.brown.designer.AccessGraph.addEdge()

                        // Check whether this is a self-referencing edge
                    } else if ((parent0 == null && parent1.equals(catalog_tbl0)) || (parent1 == null && parent0.equals(catalog_tbl0))) {
                        if (d)
                            LOG.debug(String.format("Self-referencing edge %s ===> %s, %s", entry, v0, v0));
                        agraph.addEdge(new_e, v0, v0);

                    } else if ((parent0 == null && parent1.equals(catalog_tbl1)) || (parent1 == null && parent0.equals(catalog_tbl1))) {
                        if (d)
                            LOG.debug(String.format("Self-referencing edge %s ===> %s, %s", entry, v1, v1));
                        agraph.addEdge(new_e, v1, v1);
View Full Code Here

Examples of edu.brown.designer.DependencyGraph.addEdge()

            vertices[i] = new DesignerVertex(catalog_tbl);
            dgraph.addVertex(vertices[i]);
           
            if (i > 0) {
                for (int j = 0; j < num_edges; j++) {
                    dgraph.addEdge(new DesignerEdge(dgraph), vertices[i-1], vertices[i]);
                } // FOR
                Collection<DesignerEdge> edges = dgraph.findEdgeSet(vertices[i-1], vertices[i]);
                assertNotNull(edges);
                assertEquals(num_edges, edges.size());
            }
View Full Code Here

Examples of edu.brown.markov.MarkovGraph.addEdge()

               
                // For now we'll set the new edge's probability to 1.0 to just
                // make the calculations down below work. This will get updated
                // overtime when we recompute the probabilities in the entire graph.
                candidate_edge = new MarkovEdge(markov, 1, 1.0f);
                markov.addEdge(candidate_edge, element, v, EdgeType.DIRECTED);
                this.candidate_edges.add(candidate_edge);
               
                if (this.created_vertices == null) this.created_vertices = new HashSet<MarkovVertex>();
                this.created_vertices.add(v);
                if (trace.val)
View Full Code Here

Examples of edu.cmu.graphchi.preprocessing.FastSharder.addEdge()

                        HDFSGraphLoader hdfsLoader = new HDFSGraphLoader(location, new EdgeProcessor<Float>() {
                            long counter = 0;

                            public Float receiveEdge(int from, int to, String token) {
                                try {
                                    sharder.addEdge(from, to, token);
                                    counter++;
                                    if (counter % 100000 == 0) {
                                        setStatusString("Preprocessing, read " + counter + " edges");
                                    }
                                } catch (IOException e) {
View Full Code Here

Examples of edu.cmu.sphinx.result.Lattice.addEdge()

    double acousticCD = 2;

    lattice.setInitialNode(a);
    lattice.setTerminalNode(d);

    lattice.addEdge(a, b, logMath.linearToLog(acousticAB), 0);
    lattice.addEdge(a, c, logMath.linearToLog(acousticAC), 0);
    lattice.addEdge(c, b, logMath.linearToLog(acousticCB), 0);
    lattice.addEdge(b, d, logMath.linearToLog(acousticBD), 0);
    lattice.addEdge(c, d, logMath.linearToLog(acousticCD), 0);
View Full Code Here

Examples of edu.indiana.extreme.xbaya.graph.Graph.addEdge()

        OutputNode outParamNode = (OutputNode) workflow
                .addNode(outputComponent);
        outParamNode.setPosition(new Point(800, 150));

        // Connect ports
        graph.addEdge(input1.getOutputPort(0), adder.getInputPort(0));
        graph.addEdge(input2.getOutputPort(0), adder.getInputPort(1));
        graph.addEdge(adder.getOutputPort(0), subWorkflow.getInputPort(0));
        graph.addEdge(input3.getOutputPort(0), subWorkflow.getInputPort(1));
        graph.addEdge(subWorkflow.getOutputPort(0), outParamNode
                .getInputPort(0));
View Full Code Here

Examples of edu.indiana.extreme.xbaya.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 edu.stanford.nlp.semgraph.SemanticGraph.addEdge()

        }
        assert(target != null);
        synchronized (LOCK) {
          // this is not thread-safe: there are static fields in GrammaticalRelation
          GrammaticalRelation rel = GrammaticalRelation.valueOf(ie.dep);
          graph.addEdge(source, target, rel, 1.0, ie.isExtra);
        }
      }
     
      // compute root nodes if they weren't stored in the graph
      if (!graph.isEmpty() && graph.getRoots().size() == 0){
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.