Package org.gephi.attribute.api

Examples of org.gephi.attribute.api.Table


        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));
        }

        return pagerankCol;
    }
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

        this.isDirected = graphModel.isDirected();
        this.averages = new HashMap<Double, Double>();

        //Attributes cols
        if (!averageOnly) {
            Table nodeTable = attributeModel.getNodeTable();
            dynamicCoefficientColumn = nodeTable.getColumn(DYNAMIC_CLUSTERING_COEFFICIENT);
            if (dynamicCoefficientColumn == null) {
                dynamicCoefficientColumn = nodeTable.addColumn(DYNAMIC_CLUSTERING_COEFFICIENT, NbBundle.getMessage(DynamicClusteringCoefficient.class, "DynamicClusteringCoefficient.nodecolumn.ClusteringCoefficient"), TimestampDoubleSet.class, null);
            }
        }
    }
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);;
            n.setAttribute(modCol, struct[n_index]);
        }
View Full Code Here

        this.isDirected = graphModel.isDirected();
        this.averages = new HashMap<Double, Double>();

        //Attributes cols
        if (!averageOnly) {
            Table nodeTable = attributeModel.getNodeTable();
            dynamicInDegreeColumn = nodeTable.getColumn(DYNAMIC_INDEGREE);
            dynamicOutDegreeColumn = nodeTable.getColumn(DYNAMIC_OUTDEGREE);
            dynamicDegreeColumn = nodeTable.getColumn(DYNAMIC_DEGREE);
            if (isDirected) {
                if (dynamicInDegreeColumn == null) {
                    dynamicInDegreeColumn = nodeTable.addColumn(DYNAMIC_INDEGREE, NbBundle.getMessage(DynamicDegree.class, "DynamicDegree.nodecolumn.InDegree"), TimestampIntegerSet.class, null);
                }
                if (dynamicOutDegreeColumn == null) {
                    dynamicOutDegreeColumn = nodeTable.addColumn(DYNAMIC_OUTDEGREE, NbBundle.getMessage(DynamicDegree.class, "DynamicDegree.nodecolumn.OutDegree"), TimestampIntegerSet.class, null);
                }
            }
            if (dynamicDegreeColumn == null) {
                dynamicDegreeColumn = nodeTable.addColumn(DYNAMIC_DEGREE, NbBundle.getMessage(DynamicDegree.class, "DynamicDegree.nodecolumn.Degree"), TimestampIntegerSet.class, null);
            }
        }
    }
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

            componentsSize[i] = components.get(i).size();
        }
    }

    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

    protected Workspace workspace;
    protected ContainerUnloader container;
    protected AttributeModel attributeModel;

    protected void flushColumns() {
        Table nodeTable = attributeModel.getNodeTable();
        for (ColumnDraft col : container.getNodeColumns()) {
            if (!nodeTable.hasColumn(col.getId())) {
                Class typeClass = col.getTypeClass();
                if (col.isDynamic()) {
                    typeClass = AttributeUtils.getDynamicType(typeClass);
                }
                nodeTable.addColumn(col.getId(), col.getTitle(), typeClass, Origin.DATA, col.getDefaultValue(), true);
            }
        }
        Table edgeTable = attributeModel.getEdgeTable();
        for (ColumnDraft col : container.getEdgeColumns()) {
            if (!edgeTable.hasColumn(col.getId())) {
                Class typeClass = col.getTypeClass();
                if (col.isDynamic()) {
                    typeClass = AttributeUtils.getDynamicType(typeClass);
                }
                edgeTable.addColumn(col.getId(), col.getTitle(), typeClass, Origin.DATA, col.getDefaultValue(), true);
            }
        }
    }
View Full Code Here

        return averageDegree;
    }

    private void initializeAttributeColunms(AttributeModel attributeModel) {
        Table nodeTable = attributeModel.getNodeTable();
        if (isDirected) {
            if (!nodeTable.hasColumn(INDEGREE)) {
                nodeTable.addColumn(INDEGREE, NbBundle.getMessage(Degree.class, "Degree.nodecolumn.InDegree"), Integer.class, 0);
            }
            if (!nodeTable.hasColumn(OUTDEGREE)) {
                nodeTable.addColumn(OUTDEGREE, NbBundle.getMessage(Degree.class, "Degree.nodecolumn.OutDegree"), Integer.class, 0);
            }
        }
        if (!nodeTable.hasColumn(DEGREE)) {
            nodeTable.addColumn(DEGREE, NbBundle.getMessage(Degree.class, "Degree.nodecolumn.Degree"), Integer.class, 0);
        }
    }
View Full Code Here

            }
        }
    }

    private void initializeAttributeColunms(AttributeModel attributeModel) {
        Table nodeTable = attributeModel.getNodeTable();

        if (!nodeTable.hasColumn(AUTHORITY)) {
            nodeTable.addColumn(AUTHORITY, "Authority", Float.class, new Float(0));
        }
        if (!nodeTable.hasColumn(HUB)) {
            nodeTable.addColumn(HUB, "Hub", Float.class, new Float(0));
        }
    }
View Full Code Here

TOP

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

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.