Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/WeightedBridgingCentrality/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.nathansteinmeyer</groupId>
<artifactId>weighted-bridging-centrality</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>nbm</packaging>

<name>Weighted Bridging Centrality</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ private double[] calculateBetweeness(Graph graph, HashMap<Node, Integer> indicie

Progress.start(progressTicket, Number_of_Nodes);
//Weighted shortest-path search to calculate all shortest paths from node s to t
for (Node s : graph.getNodes()) {
NodeIterable nodeIterable = graph.getNodes();
for (Node s : nodeIterable) {
//The below structures are candidates to performance improvments:
//Creates a stack for each node, ...
Stack<Node> S = new Stack<Node>();
Expand Down Expand Up @@ -298,6 +299,8 @@ private double[] calculateBetweeness(Graph graph, HashMap<Node, Integer> indicie
count++;

if (cancelled) {
// Leaving the loop early keeps the graph read-locked unless the iterable is told
nodeIterable.doBreak();
return nodeBetweenness;
}

Expand Down
Loading