Package org.gephi.ranking.api

Examples of org.gephi.ranking.api.EdgeRanking


    public EdgeRanking getEdgeAttributeRanking(AttributeColumn column) {
        GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
        Graph graph = model.getGraphVisible();
        if (RankingFactory.isNumberColumn(column)) {
            EdgeRanking r = RankingFactory.getEdgeAttributeRanking(column, graph);
            if (r.getMinimumValue() != null && r.getMaximumValue() != null && !r.getMinimumValue().equals(r.getMaximumValue())) {
                return r;
            }
        } else if (RankingFactory.isDynamicNumberColumn(column) && getDynamicModel() != null) {
            TimeInterval visibleInterval = dynamicModel.getVisibleInterval();
            EdgeRanking r = RankingFactory.getEdgeDynamicAttributeRanking(column, graph, visibleInterval, dynamicModel.getNumberEstimator());
            if (r.getMinimumValue() != null && r.getMaximumValue() != null && !r.getMinimumValue().equals(r.getMaximumValue())) {
                return r;
            }
        }
        return null;
    }
View Full Code Here


        AttributeController attributeController = Lookup.getDefault().lookup(AttributeController.class);
        Graph graph = Lookup.getDefault().lookup(GraphController.class).getModel().getGraphVisible();
        List<Ranking> rankingList = new ArrayList<Ranking>();
        for (AttributeColumn column : attributeController.getModel().getEdgeTable().getColumns()) {
            if (RankingFactory.isNumberColumn(column)) {
                EdgeRanking r = RankingFactory.getEdgeAttributeRanking(column, graph);
                if (r.getMinimumValue() != null && r.getMaximumValue() != null && !r.getMinimumValue().equals(r.getMaximumValue())) {
                    rankingList.add(r);
                }
            } else if (RankingFactory.isDynamicNumberColumn(column) && getDynamicModel() != null) {
                TimeInterval visibleInterval = dynamicModel.getVisibleInterval();
                EdgeRanking r = RankingFactory.getEdgeDynamicAttributeRanking(column, graph, visibleInterval, dynamicModel.getNumberEstimator());
                if (r.getMinimumValue() != null && r.getMaximumValue() != null && !r.getMinimumValue().equals(r.getMaximumValue())) {
                    rankingList.add(r);
                }
            }
        }
        return rankingList.toArray(new EdgeRanking[0]);
View Full Code Here

        setMinMax((AbstractRanking) nodeRanking, graph);
        return nodeRanking;
    }

    public static EdgeRanking getEdgeAttributeRanking(AttributeColumn column, Graph graph) {
        EdgeRanking edgeRanking = new EdgeAttributeRanking(column);
        setMinMax((AbstractRanking) edgeRanking, graph);
        return edgeRanking;
    }
View Full Code Here

TOP

Related Classes of org.gephi.ranking.api.EdgeRanking

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.