Examples of Edge


Examples of prefuse.data.Edge

                   Node addMe = newNodes.getGraph().getNodeFromKey(key);
                   this.getRadialGraph().getDataGraph().getNodes().addTuple(addMe);
                   Iterator edgeIt = newNodes.getGraph().edges();
                   while(edgeIt.hasNext())
                   {
                       Edge edge = (Edge)edgeIt.next();
                       if(edge.getInt("source") == addMe.getInt("DEFAULT_NODE_KEY"))
                       {
                           this.getRadialGraph().getDataGraph().addEdge(edge.getInt("source"), edge.getInt("target"));
                       }
                   }
               }
           }
       }  //end while, checked all nodes
View Full Code Here

Examples of ptolemy.graph.Edge

                // FIXME: why call new Schedule here?
                /*Schedule schedule = */new Schedule();

                // Expand the super node with adjacent nodes contained
                // within it.
                Edge edge = (Edge) childGraph.edges().iterator().next();
                ptolemy.graph.Node source = edge.source();
                ptolemy.graph.Node sink = edge.sink();
                SymbolicScheduleElement first = _expandAPGAN(childGraph,
                        source, strategy);
                SymbolicScheduleElement second = _expandAPGAN(childGraph, sink,
                        strategy);

                // Determine the iteration counts of the source and
                // sink clusters.
                String producedExpression = strategy.producedExpression(edge);
                String consumedExpression = strategy.consumedExpression(edge);

                // These errors should not occur.
                if (producedExpression == null) {
                    throw new RuntimeException("Internal error: null "
                            + "production rate expression. The offending edge "
                            + "follows.\n" + edge);
                } else if (consumedExpression == null) {
                    throw new RuntimeException(
                            "Internal error: null "
                                    + "consumption rate expression. The offending edge "
                                    + "follows.\n" + edge);
                }

                String denominator = PSDFGraphs.gcdExpression(
                        producedExpression, consumedExpression);
                String firstIterations = "(" + consumedExpression + ") / ("
                        + denominator + ")";
                String secondIterations = "(" + producedExpression + ") / ("
                        + denominator + ")";

                first.setIterationCount(firstIterations);
                second.setIterationCount(secondIterations);

                SymbolicSchedule symbolicSchedule = new SymbolicSchedule("1");
                symbolicSchedule.add((ScheduleElement) first);
                symbolicSchedule.add((ScheduleElement) second);

                // Compute buffer sizes and associate them with the
                // corresponding relations.
                Iterator edges = childGraph.edges().iterator();

                while (edges.hasNext()) {
                    Edge nextEdge = (Edge) edges.next();
                    PSDFEdgeWeight weight = (PSDFEdgeWeight) nextEdge
                            .getWeight();
                    IOPort sourcePort = weight.getSourcePort();
                    List relationList = sourcePort.linkedRelationList();

                    if (relationList.size() != 1) {
View Full Code Here

Examples of roadnetwork.Edge

    for (int i = 0; i < totalVehiclesToEmit; i++) {
      // Get the vehicle's type based on the user selection
      VehicleType vehicleType = layer.getVehicleSelection().getRandomType();

      // Get a random edge in the network
      Edge randomNetworkEdge1 = allEdges.get(r.nextInt(totalNetworkEdges));

      // Get a random edge in the network
      Edge randomNetworkEdge2 = allEdges.get(r.nextInt(totalNetworkEdges));

      // Get a random time between the emission starting and ending time
      int timeToLeave = layer.getStartingTime() + r.nextInt(layer.getEndingTime() + 1 - layer.getStartingTime());

      // Add the incoming vehicle trip to the output
      tripsList.add(new Trip(timeToLeave,"<trip id=\"" + layer.getName() + "-In-" + String.valueOf(i) + "\" depart=\"" + String.valueOf(timeToLeave) + "\" from=\"" + randomNetworkEdge1.getId() + "\" to=\"" + randomNetworkEdge2.getId() + "\" color=\"" + color + "\" type=\"" + vehicleType.getName() + "\" />\n"));
    }
  }
View Full Code Here

Examples of soot.jimple.toolkits.callgraph.Edge

            // by this method.
            CallGraph callGraph = Scene.v().getCallGraph();
            Iterator outEdges = callGraph.edgesOutOf(method);

            while (outEdges.hasNext()) {
                Edge edge = (Edge) outEdges.next();
                SootMethod targetMethod = edge.tgt();
                _add(targetMethod);
            }

            // Add the nodes called in the body of the method.
            _add(_getNodesAccessedInBodyOf(method));
View Full Code Here

Examples of uk.ac.man.cs.mig.util.graph.graph.Edge

    graph.add(n3);

    assertTrue(graph.getNodeCount() == 2);

    Edge e1, e2;

    e1 = new DefaultEdge(n1, n2, "Edge1", 2);

    e2 = new DefaultEdge(n2, n3, "Edge2", 2);
View Full Code Here

Examples of unbbayes.prs.Edge

    setPaneMode(PANEMODE_COMPILE);

    this.removeAll();

    Node n;
    Edge e;
    UShape shape = null;
    // Load all nodes.
    for (int i = 0; i < nodeList.size(); i++) {
      n = nodeList.get(i);

      createNode(n);

      if (reset == true && n instanceof ProbabilisticNode) {
        shape = getNodeUShape(n);
      }

      if (n instanceof ContinuousNode || n instanceof ProbabilisticNode) {

        shape = getNodeUShape(n);
        shape.shapeTypeChange(UShapeProbabilisticNode.STYPE_BAR);
        shape.setState(UShape.STATE_RESIZED, null);
      }

    }

    // Load all Edges
    for (int i = 0; i < edgeList.size(); i++) {
      e = edgeList.get(i);

      if (getNodeUShape(e.getOriginNode()) != null
          && getNodeUShape(e.getDestinationNode()) != null) {
        UShapeLine line = new UShapeLine(this, getNodeUShape(e
            .getOriginNode()),
            getNodeUShape(e.getDestinationNode()));
        line.setEdge(e);
        // by young 1/23/2010
        line.setLearningLineSelection(false);
        addShape(line);
      }
View Full Code Here

Examples of vg.core.graph.Edge

    }
    //edges----------------------------------
    for(StorableEdge bufEdge : this.edges) {
      Vertex source = localVertex.get(bufEdge.getStorableSource().getStorableId());
      Vertex target = localVertex.get(bufEdge.getStorableTarget().getStorableId());
      localEdge.add(new Edge(source, target, bufEdge.getId(), bufEdge.getAttributes()));
    }
    SubGraph sg = new SubGraph(this.id, this.name, twoLocalVertex, localEdge, this.directed);
    return(sg);
  }
View Full Code Here

Examples of weka.gui.treevisualizer.Edge

      checkExistenceOfAttribute(predicateField, predicatesParts[1]);
    }
    String helpPredicateField = nodeOfWeka.getLabel();
    int i = 0;
    while ((nodeOfWeka.getChild(i)) != null) {
      Edge edge = nodeOfWeka.getChild(i++);
      String predicateOfChildNode = edge.getLabel();
      NodeType helpNodeOfPMML = _40Factory.eINSTANCE.createNodeType();     
      nodeOfPMML.getNode().add(identifyAndAssociateNodes(edge.getTarget(), helpNodeOfPMML, predicateOfChildNode, helpPredicateField));
    }
    if (nodeOfWeka.getChild(0) == null) {
      nodeOfPMML.setScore(helpPredicateField);
      String value = parserOfClassAttributeValue(helpPredicateField);
      checkExistenceOfAttribute("class", value);
View Full Code Here

Examples of y.base.Edge

        Node planetClassNode = graph.getNode(planetClass);
        Node galaxyClassNode = graph.getNode(galaxyClass);
        Node galaxyConstructorNode = graph.getNode(galaxyContstructor);
        Assert.assertEquals("Parent node of " + galaxyConstructorNode + " has to be " + galaxyClassNode, galaxyClassNode, graph.getHierarchyManager().getParentNode(galaxyConstructorNode));

        Edge invocation = galaxyClassNode.getEdge(planetClassNode);
        Assert.assertNotNull("There should be an edge between " + galaxyClassNode + " and " + planetClassNode, invocation);
    }
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.