public class ConnectivityFinder extends Object
Modifier and Type | Field and Description |
---|---|
gnu.trove.list.array.TIntArrayList |
isthmusFrom |
gnu.trove.list.array.TIntArrayList |
isthmusTo |
Constructor and Description |
---|
ConnectivityFinder(IGraph g)
Create an object that can compute Connected Components (CC) of a graph g
Can also quickly tell whether g is biconnected or not (only for undirected graph)
|
Modifier and Type | Method and Description |
---|---|
void |
findAllCC()
Find all connected components of graph by performing one dfs
Complexity : O(M+N) light and fast in practice
|
int[] |
getCC_firstNode() |
int[] |
getCC_nextNode() |
int |
getNBCC()
get the number of CC in g
Beware you should call method findAllCC() first
|
int[] |
getNode_CC() |
boolean |
isBiconnected()
Test biconnectivity (i.e. connected with no articulation point and no bridge)
only for undirected graphs
|
boolean |
isConnectedAndFindIsthma()
Only for undirected graphs
|
public gnu.trove.list.array.TIntArrayList isthmusFrom
public gnu.trove.list.array.TIntArrayList isthmusTo
public ConnectivityFinder(IGraph g)
g
- graphpublic int getNBCC()
public int[] getCC_firstNode()
public int[] getCC_nextNode()
public int[] getNode_CC()
public void findAllCC()
public boolean isBiconnected()
public boolean isConnectedAndFindIsthma()
Copyright © 2015. All rights reserved.