0

我正在尝试按属性对 Graphstream 的节点集合进行排序。我不确定如何做到这一点。

Collection <Node> function (Graph graph){
    BetweennessCentrality bcb = new BetweennessCentrality();
    bcb.init(graph);
    bcb.compute();

    System.out.println("A=" + graph.getNode("A").getAttribute("Cb")); // prints the calculated measure

    return graph.getNodeSet();
}

该函数返回具有属性但未排序的节点集。

如何按计算的属性对节点集合进行排序?

4

0 回答 0