Examples of Graph


Examples of org.wymiwyg.rdf.graphs.Graph

    return dates[number];
  }
 
  public void write(OutputStream out) throws IOException {
    for (int i = 0; i < graphs.length; i++) {
      Graph graph = graphs[i];
      Date date = dates[i];
      try {
        out.write('\n');
        out.write(("graph nr:"+i+" asserted at").getBytes());
        out.write(date.toString().getBytes());
View Full Code Here

Examples of prefuse.data.Graph

      Data[] resultInMemory = comparePhaseResultResult.getResult();
   

      // graph comparison phase

      Graph resultGraph = (Graph) originalInMemory[0].getData();
      Graph origGraph = (Graph) resultInMemory[0].getData();

      NewGraphComparer comparer = testData.getComparer();
      ComparisonResult graphComparisonPhaseResult = comparer.compare(
          origGraph, resultGraph);
View Full Code Here

Examples of primitives.graph.Graph

  public double evaluate(ClusterHead result) {
    Stack<ClusterNode> toVisit = new Stack<ClusterNode>();
    toVisit.push(result);
    double ret = 0;
   
    Graph g = new Graph();
    for(Node n : result.getNodes()){
      g.addNode(n);
    }
   
    while(!toVisit.isEmpty()){
      ClusterNode current = toVisit.pop();
      ret += calculateComplexity(current, g,  result);
View Full Code Here

Examples of progs.lib.Graph

    String[] array = new String[]{
        "   ",
        "   ",
        "   ",
    };
    Graph graph = Graph.fromStringArray(array);
    Graph graph2 = Graph.fromStringArray(array);
    Assert.assertEquals(graph.getEdgeList(), graph2.getEdgeList());
  }
View Full Code Here

Examples of ptolemy.graph.Graph

     @exception RuntimeException If the deep entity list of the
     *  composite actor contains an entry that is not an AtomicActor.
     */
    public Graph convert(CompositeActor compositeActor) {
        // Instantiate an empty graph.
        Graph graph = _initializeGraph(compositeActor);

        // Add all deeply-contained actors to the graph
        Iterator actors = compositeActor.deepEntityList().iterator();

        while (actors.hasNext()) {
            Object entity = actors.next();

            if (entity instanceof AtomicActor
                    || entity instanceof CompositeActor) {
                Actor actor = (Actor) entity;
                Node newNode = graph.addNodeWeight(_computeNodeWeight(actor));
                _actorMap.put(actor, newNode);
                _processNewNode(graph, newNode, actor);
            } else {
                throw new RuntimeException("Unsupported deep entity type: "
                        + entity.getClass().getName() + " (value = " + entity
                        + ")");
            }
        }

        // Convert each connection in the model to a graph edge
        actors = compositeActor.deepEntityList().iterator();

        while (actors.hasNext()) {
            Actor source = (Actor) (actors.next());

            // Connect the current actor to each of its sinks
            Iterator outPorts = source.outputPortList().iterator();

            while (outPorts.hasNext()) {
                IOPort outPort = (IOPort) (outPorts.next());
                Iterator inPorts = outPort.deepConnectedInPortList().iterator();

                while (inPorts.hasNext()) {
                    IOPort inPort = (IOPort) (inPorts.next());
                    Actor sink = (Actor) (inPort.getContainer());

                    if (graph.containsNode((Node) (_actorMap.get(sink)))) {
                        if (_debug) {
                            System.out.println("Adding edge from " + source
                                    + " to " + sink);
                        }

                        Edge newEdge = graph.addEdge((Node) (_actorMap
                                .get(source)), (Node) (_actorMap.get(sink)),
                                _computeEdgeWeight(outPort, inPort));
                        _processNewEdge(graph, newEdge, outPort, inPort);
                    }
                }
View Full Code Here

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

    n2 = new DefaultNode(r2);

    n3 = new DefaultNode(r3);

    Graph graph = new DefaultGraph();

    graph.add(n1);

    graph.add(n2);

    graph.add(n3);

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

    Edge e1, e2;

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

    e2 = new DefaultEdge(n2, n3, "Edge2", 2);

    graph.add(e1);

    graph.add(e2);

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

    graph.add(e1);

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


  }
View Full Code Here

Examples of unbbayes.prs.Graph

   */
  @Override
  public UnBBayesModule openFile(File file) throws IOException {
   
   
    Graph g = null;
   
    // a IO that delegates to correct I/O depending on the file extension (NET, DNE and XMLBIF by default)
    FileExtensionIODelegator ioDelegator = PluginAwareFileExtensionIODelegator.newInstance();
//    ioDelegator.getDelegators().add(UbfIO.getInstance());  // adding UBF compatibility into delegator
   
View Full Code Here

Examples of upenn.junto.graph.Graph

 
  public static void main(String[] args) {
    Hashtable config = ConfigReader.read_config(args);

    // load the graph
    Graph g = GraphConfigLoader.apply(config);
    MessagePrinter.Print(PrintStats(g));
  }
View Full Code Here

Examples of vg.core.graph.Graph

  public synchronized List<StorableSubGraph> getSubGraphs() {
    List<StorableSubGraph>ssg = new ArrayList<StorableSubGraph>(this.subGraphs);
    return(ssg);
  }
  public synchronized Graph getGraph() {
    Graph g = new Graph();
    for(StorableSubGraph bufSubGraph : this.subGraphs) {
      g.addSubGraph(bufSubGraph.getStorableId(), bufSubGraph.getSubGraph());
    }
    g.setName(this.name);
    g.setRoot(this.rootSubGraphId);
    return(g);
  }
View Full Code Here

Examples of y.base.Graph

        Node node = this.getNode(entity);
        if (node != null) {
            this.getFamixToNodeMap().remove(entity);
            this.getNodeToFamixMap().set(node, null);
            Graph graph = node.getGraph(); // if parent node has been removed, than node is not in the graph anymore
            if (graph != null) {
                node.getGraph().removeNode(node);
            }
            isRemoved = true;
        }
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.