Package org.gephi.ranking.api

Examples of org.gephi.ranking.api.NodeRanking


    }

    public NodeRanking getDegreeRanking() {
        GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
        Graph graph = model.getGraphVisible();
        NodeRanking degreeRanking = RankingFactory.getNodeDegreeRanking(graph);
        if (degreeRanking.getMinimumValue() != null && degreeRanking.getMaximumValue() != null && !degreeRanking.getMinimumValue().equals(degreeRanking.getMaximumValue())) {
            return degreeRanking;
        }
        return null;
    }
View Full Code Here


    }

    public NodeRanking getInDegreeRanking() {
        GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
        DirectedGraph graph = model.getDirectedGraphVisible();
        NodeRanking degreeRanking = RankingFactory.getNodeInDegreeRanking(graph);
        if (degreeRanking.getMinimumValue() != null && degreeRanking.getMaximumValue() != null && !degreeRanking.getMinimumValue().equals(degreeRanking.getMaximumValue())) {
            return degreeRanking;
        }
        return null;
    }
View Full Code Here

    }

    public NodeRanking getOutDegreeRanking() {
        GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
        DirectedGraph graph = model.getDirectedGraphVisible();
        NodeRanking degreeRanking = RankingFactory.getNodeOutDegreeRanking(graph);
        if (degreeRanking.getMinimumValue() != null && degreeRanking.getMaximumValue() != null && !degreeRanking.getMinimumValue().equals(degreeRanking.getMaximumValue())) {
            return degreeRanking;
        }
        return null;
    }
View Full Code Here

    public NodeRanking getNodeAttributeRanking(AttributeColumn column) {
        GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
        Graph graph = model.getGraphVisible();
        if (RankingFactory.isNumberColumn(column)) {
            NodeRanking r = RankingFactory.getNodeAttributeRanking(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();
            NodeRanking r = RankingFactory.getNodeDynamicAttributeRanking(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

        List<Ranking> rankingList = new ArrayList<Ranking>();
        GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
        Graph graph = model.getGraphVisible();

        //Topology
        NodeRanking degreeRanking = RankingFactory.getNodeDegreeRanking(graph);
        if (degreeRanking.getMinimumValue() != null && degreeRanking.getMaximumValue() != null && !degreeRanking.getMinimumValue().equals(degreeRanking.getMaximumValue())) {
            rankingList.add(degreeRanking);
        }

        if (model.isDirected()) {
            DirectedGraph directedGraph = model.getDirectedGraphVisible();
            NodeRanking inDegreeRanking = RankingFactory.getNodeInDegreeRanking(directedGraph);
            if (inDegreeRanking.getMinimumValue() != null && inDegreeRanking.getMaximumValue() != null && !inDegreeRanking.getMinimumValue().equals(inDegreeRanking.getMaximumValue())) {
                rankingList.add(inDegreeRanking);
            }
            NodeRanking outDegreeRanking = RankingFactory.getNodeOutDegreeRanking(directedGraph);
            if (outDegreeRanking.getMinimumValue() != null && outDegreeRanking.getMaximumValue() != null && !outDegreeRanking.getMinimumValue().equals(outDegreeRanking.getMaximumValue())) {
                rankingList.add(outDegreeRanking);
            }
        }

        if (model.isHierarchical()) {
            HierarchicalGraph hierarchicalGraph = model.getHierarchicalGraphVisible();
            NodeRanking childrenRanking = RankingFactory.getNodeChildrenCountRanking(hierarchicalGraph);
            if (childrenRanking.getMinimumValue() != null && childrenRanking.getMaximumValue() != null && !childrenRanking.getMinimumValue().equals(childrenRanking.getMaximumValue())) {
                rankingList.add(childrenRanking);
            }
        }

        //Attributes
        int nativeCount = rankingList.size();
        for (AttributeColumn column : attributeController.getModel().getNodeTable().getColumns()) {
            if (RankingFactory.isNumberColumn(column)) {
                NodeRanking r = RankingFactory.getNodeAttributeRanking(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();
                NodeRanking r = RankingFactory.getNodeDynamicAttributeRanking(column, graph, visibleInterval, dynamicModel.getNumberEstimator());
                if (r.getMinimumValue() != null && r.getMaximumValue() != null && !r.getMinimumValue().equals(r.getMaximumValue())) {
                    rankingList.add(r);
                }
            }
        }
View Full Code Here

* @author Mathieu Bastian
*/
public class RankingFactory {

    public static NodeRanking getNodeAttributeRanking(AttributeColumn column, Graph graph) {
        NodeRanking nodeRanking = new NodeAttributeRanking(column);
        setMinMax((AbstractRanking) nodeRanking, graph);
        return nodeRanking;
    }
View Full Code Here

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

    public static NodeRanking getNodeDegreeRanking(Graph graph) {
        NodeRanking nodeRanking = new NodeDegreeRanking(graph);
        setMinMax((AbstractRanking) nodeRanking, graph);
        return nodeRanking;
    }
View Full Code Here

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

    public static NodeRanking getNodeInDegreeRanking(DirectedGraph graph) {
        NodeRanking nodeRanking = new NodeInDegreeRanking(graph);
        setMinMax((AbstractRanking) nodeRanking, graph);
        return nodeRanking;
    }
View Full Code Here

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

    public static NodeRanking getNodeOutDegreeRanking(DirectedGraph graph) {
        NodeRanking nodeRanking = new NodeOutDegreeRanking(graph);
        setMinMax((AbstractRanking) nodeRanking, graph);
        return nodeRanking;
    }
View Full Code Here

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

    public static NodeRanking getNodeChildrenCountRanking(HierarchicalGraph graph) {
        NodeRanking nodeRanking = new NodeChildrenCountRanking(graph);
        setMinMax((AbstractRanking) nodeRanking, graph);
        return nodeRanking;
    }
View Full Code Here

TOP

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

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.