Package org.gephi.graph.api

Examples of org.gephi.graph.api.HierarchicalDirectedGraph


        }

        private void refreshValues(Graph graph) {
            Integer min = 0;
            Integer max = 0;
            HierarchicalDirectedGraph hgraph = (HierarchicalDirectedGraph) graph;
            values = new ArrayList<Integer>(((HierarchicalGraph) graph).getNodeCount());
            min = Integer.MAX_VALUE;
            max = Integer.MIN_VALUE;
            for (Node n : hgraph.getNodes()) {
                int degree = hgraph.getTotalInDegree(n);
                min = Math.min(min, degree);
                max = Math.max(max, degree);
                values.add(degree);
            }
            if (range == null) {
View Full Code Here


        }

        private void refreshValues(Graph graph) {
            Integer min = 0;
            Integer max = 0;
            HierarchicalDirectedGraph hgraph = (HierarchicalDirectedGraph) graph;
            values = new ArrayList<Integer>(((HierarchicalGraph) graph).getNodeCount());
            min = Integer.MAX_VALUE;
            max = Integer.MIN_VALUE;
            for (Node n : hgraph.getNodes()) {
                int degree = hgraph.getMutualDegree(n);
                min = Math.min(min, degree);
                max = Math.max(max, degree);
                values.add(degree);
            }
            if (range == null) {
View Full Code Here

    public void execute(GraphModel graphModel, AttributeModel attributeModel) {

        HierarchicalUndirectedGraph undirectedGraph = graphModel.getHierarchicalUndirectedGraphVisible();
        weaklyConnected(undirectedGraph, attributeModel);
        if (isDirected) {
            HierarchicalDirectedGraph directedGraph = graphModel.getHierarchicalDirectedGraphVisible();
            top_tarjans(directedGraph, attributeModel);
        }
    }
View Full Code Here

        }

        private void refreshValues(Graph graph) {
            Integer min = 0;
            Integer max = 0;
            HierarchicalDirectedGraph hgraph = (HierarchicalDirectedGraph) graph;
            values = new ArrayList<Integer>(((HierarchicalGraph) graph).getNodeCount());
            min = Integer.MAX_VALUE;
            max = Integer.MIN_VALUE;
            for (Node n : hgraph.getNodes()) {
                int degree = hgraph.getMutualDegree(n);
                min = Math.min(min, degree);
                max = Math.max(max, degree);
                values.add(degree);
            }
            if (range == null) {
View Full Code Here

        Workspace workspace = projectController.getCurrentWorkspace();
        AttributeController attributeController = Lookup.getDefault().lookup(AttributeController.class);
        AttributeModel attributeModel = attributeController.getModel();
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        GraphModel graphModel = graphController.getModel();
        HierarchicalDirectedGraph graph = graphModel.getHierarchicalDirectedGraph();

        Node n1 = graphModel.factory().newNode("n1");
        graph.addNode(n1);
        Node n2 = graphModel.factory().newNode("n2");
        graph.addNode(n2);
        Node n3 = graphModel.factory().newNode("n3");
        graph.addNode(n3);
        Node n4 = graphModel.factory().newNode("n4");
        graph.addNode(n4, n3);

        Edge e1 = graphModel.factory().newEdge(n1, n2, 1f, true);
        graph.addEdge(e1);
        Edge e2 = graphModel.factory().newEdge(n2, n4, 3f, true);
        graph.addEdge(e2);
        Edge e3 = graphModel.factory().newEdge(n2, n1, 1f, true);
        graph.addEdge(e3);

        AttributeColumn nodeCol1 = attributeModel.getNodeTable().addColumn("col1", "Column 1", AttributeType.STRING, AttributeOrigin.DATA, "default value col1");
        AttributeColumn nodeCol2 = attributeModel.getNodeTable().addColumn("col2 listint", AttributeType.LIST_INTEGER);
        attributeModel.getNodeTable().addColumn("col3 listchar", AttributeType.LIST_CHARACTER);
        attributeModel.getNodeTable().addColumn("col4 int", AttributeType.INT);
View Full Code Here

        Progress.start(progress, graph.getNodeCount());

        for (Node n : graph.getNodes()) {
            AttributeRow row = (AttributeRow) n.getNodeData().getAttributes();
            if (graph instanceof DirectedGraph) {
                HierarchicalDirectedGraph hdg = graph.getGraphModel().getHierarchicalDirectedGraph();
                int inDegree = hdg.getTotalInDegree(n);
                int outDegree = hdg.getTotalOutDegree(n);
                row.setValue(inCol, inDegree);
                row.setValue(outCol, outDegree);
                if (!inDegreeDist.containsKey(inDegree)) {
                    inDegreeDist.put(inDegree, 0);
                }
View Full Code Here

TOP

Related Classes of org.gephi.graph.api.HierarchicalDirectedGraph

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.