Skip to content
Snippets Groups Projects
Commit 44d30c3e authored by Yoann Pigné's avatar Yoann Pigné
Browse files

Changed visibility of method getConnectedComponents(int,int) from protected to public

parent 90c7e30d
Branches
No related merge requests found
...@@ -186,7 +186,7 @@ public class ConnectedComponents extends SinkAdapter implements ...@@ -186,7 +186,7 @@ public class ConnectedComponents extends SinkAdapter implements
if (graph != null) if (graph != null)
init(graph); init(graph);
connectedComponentsMap = new HashMap<Node, Integer>();
} }
/** /**
...@@ -208,7 +208,6 @@ public class ConnectedComponents extends SinkAdapter implements ...@@ -208,7 +208,6 @@ public class ConnectedComponents extends SinkAdapter implements
maxIndex = c; maxIndex = c;
} }
} }
// Get the list of nodes within this component // Get the list of nodes within this component
if (maxIndex != -1) { if (maxIndex != -1) {
ArrayList<Node> giant = new ArrayList<Node>(); ArrayList<Node> giant = new ArrayList<Node>();
...@@ -253,7 +252,7 @@ public class ConnectedComponents extends SinkAdapter implements ...@@ -253,7 +252,7 @@ public class ConnectedComponents extends SinkAdapter implements
* Maximum size for the connected component to be considered (use * Maximum size for the connected component to be considered (use
* 0 or lower values to ignore the ceiling) * 0 or lower values to ignore the ceiling)
*/ */
protected int getConnectedComponentsCount(int sizeThreshold, int sizeCeiling) { public int getConnectedComponentsCount(int sizeThreshold, int sizeCeiling) {
if (!started) { if (!started) {
compute(); compute();
} }
...@@ -392,6 +391,8 @@ public class ConnectedComponents extends SinkAdapter implements ...@@ -392,6 +391,8 @@ public class ConnectedComponents extends SinkAdapter implements
ids.add(""); // The dummy first identifier (since zero is a special ids.add(""); // The dummy first identifier (since zero is a special
// value). // value).
connectedComponentsMap = new HashMap<Node, Integer>();
// Initialize the size count structure // Initialize the size count structure
connectedComponentsSize = new HashMap<Integer, Integer>(); connectedComponentsSize = new HashMap<Integer, Integer>();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment