Package org.gephi.attribute.time

Examples of org.gephi.attribute.time.Interval


        GraphModel graphModel = graphController.getGraphModel();
        AttributeModel attributeModel = graphController.getAttributeModel();

        double window = statistics.getWindow();
        double tick = statistics.getTick();
        Interval bounds = statistics.getBounds();
        if (bounds == null) {
            bounds = graphModel.getTimeBoundsVisible();
            statistics.setBounds(bounds);
        }

        if (dynamicLongTask != null) {
            //Count
            int c = (int) ((bounds.getHigh() - window - bounds.getLow()) / tick);
            dynamicLongTask.start(c);
        }

        //Init
        statistics.execute(graphModel, attributeModel);

        //Loop
        for (double low = bounds.getLow(); low <= bounds.getHigh() - window; low += tick) {
            double high = low + window;

//            Graph g = dynamicGraph.getSnapshotGraph(low, high);
           
           
            GraphView currentView = graphModel.getVisibleView();
            Graph graph = graphModel.getGraphVisible();
            GraphView view = graphModel.createView();
            Graph g = graphModel.getGraph(view);
           
            TimestampIndex<Node> nodeIndex = graphModel.getNodeTimestampIndex(currentView);
            for(Node node : nodeIndex.get(low, high)) {
                g.addNode(node);
            }
           
            TimestampIndex<Edge> edgeIndex = graphModel.getEdgeTimestampIndex(currentView);
            for(Edge edge : edgeIndex.get(low, high)) {
                g.addEdge(edge);
            }
           

            statistics.loop(g.getView(), new Interval(low, high));

            //Cancelled?
            if (dynamicLongTask != null && dynamicLongTask.isCancelled()) {
                return;
            } else if (dynamicLongTask != null) {
View Full Code Here

TOP

Related Classes of org.gephi.attribute.time.Interval

Copyright © 2018 www.massapicom. 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.