Package org.gephi.attribute.api

Examples of org.gephi.attribute.api.Column


            target = edgeCheckBoxs;
        }
        contentPanel.removeAll();
        contentPanel.setLayout(new MigLayout("", "[pref!]"));
        for (int i = 0; i < availableColumns.size(); i++) {
            Column column = availableColumns.get(i);
            AttributesCheckBox c = new AttributesCheckBox(column, selectedColumns.contains(column));
            target[i] = c;
            contentPanel.add(c.getCheckBox(), "wrap");
        }
        contentPanel.revalidate();
View Full Code Here


                    } else if ("edgecolumns".equalsIgnoreCase(name)) {
                        edgeColumn = true;
                    } else if ("column".equalsIgnoreCase(name)) {
                        String id = reader.getAttributeValue(null, "id");
                        if (nodeColumn && attributeModel != null) {
                            Column col = attributeModel.getNodeTable().getColumn(id);
                            if (col != null) {
                                nodeCols.add(col);
                            }
                        } else if (edgeColumn && attributeModel != null) {
                            Column col = attributeModel.getEdgeTable().getColumn(id);
                            if (col != null) {
                                edgeCols.add(col);
                            }
                        }
                    }
View Full Code Here

    }

    public void execute(Graph hgraph, AttributeModel attributeModel) {
        isCanceled = false;

        Column column = initializeAttributeColunms(attributeModel);

        hgraph.readLock();

        HashMap<Node, Integer> indicies = createIndiciesMap(hgraph);
View Full Code Here

        hgraph.readUnlockAll();
    }

    private Column initializeAttributeColunms(AttributeModel attributeModel) {
        Table nodeTable = attributeModel.getNodeTable();
        Column pagerankCol = nodeTable.getColumn(PAGERANK);

        if (pagerankCol == null) {
            pagerankCol = nodeTable.addColumn(PAGERANK, "PageRank", Double.class, new Double(0));
        }
View Full Code Here

        execute(graph, attributeModel);
    }

    public void execute(Graph hgraph, AttributeModel attributeModel) {

        Column column = initializeAttributeColunms(attributeModel);

        int N = hgraph.getNodeCount();
        hgraph.readLock();

        centralities = new double[N];
View Full Code Here

        Progress.finish(progress);
    }

    private Column initializeAttributeColunms(AttributeModel attributeModel) {
        Table nodeTable = attributeModel.getNodeTable();
        Column eigenCol = nodeTable.getColumn(EIGENVECTOR);
        if (eigenCol == null) {
            eigenCol = nodeTable.addColumn(EIGENVECTOR, "Eigenvector Centrality", Double.class, new Double(0));
        }
        return eigenCol;
    }
View Full Code Here

        return res;
    }

    private void saveValues(int[] struct, Graph hgraph, AttributeModel attributeModel, CommunityStructure theStructure) {
        Table nodeTable = attributeModel.getNodeTable();
        Column modCol = nodeTable.getColumn(MODULARITY_CLASS);
        if (modCol == null) {
            modCol = nodeTable.addColumn(MODULARITY_CLASS, "Modularity Class", Integer.class, new Integer(0));
        }
        for (Node n : hgraph.getNodes()) {
            int n_index = theStructure.map.get(n);;
View Full Code Here

    }

    public void weaklyConnected(UndirectedGraph graph, AttributeModel attributeModel) {
        isCanceled = false;

        Column componentCol = initializeWeeklyConnectedColumn(attributeModel);

        HashMap<Node, Integer> indicies = createIndiciesMap(graph);

        LinkedList<LinkedList<Node>> components = computeWeeklyConnectedComponents(graph, indicies);
View Full Code Here

        return components;
    }

    private Column initializeWeeklyConnectedColumn(AttributeModel attributeModel) {
        Table nodeTable = attributeModel.getNodeTable();
        Column componentCol = nodeTable.getColumn(WEAKLY);
        if (componentCol == null) {
            componentCol = nodeTable.addColumn(WEAKLY, "Component ID", Integer.class, new Integer(0));
        }
        return componentCol;
    }
View Full Code Here

        }
    }

    private Column initializeStronglyConnectedColumn(AttributeModel attributeModel) {
        Table nodeTable = attributeModel.getNodeTable();
        Column componentCol = nodeTable.getColumn(STRONG);
        if (componentCol == null) {
            componentCol = nodeTable.addColumn(STRONG, "Strongly-Connected ID", Integer.class, new Integer(0));
        }
        return componentCol;
    }
View Full Code Here

TOP

Related Classes of org.gephi.attribute.api.Column

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.