C++ Reference: class ConnectedComponentsFinder
Note: This documentation is automatically generated.
Method | |
---|---|
AddEdge | Return type: Arguments: Adds an edge in the graph. Also adds both endpoint nodes as necessary. It is not an error to add the same edge twice. Self-edges are OK too. Returns true if the two nodes are newly connected, and false if they were already connected. |
AddNode | Return type: Arguments: Adds a node in the graph. It is OK to add the same node more than once; additions after the first have no effect. |
Connected | Return type: Arguments: Returns true iff both nodes are in the same connected component. Returns false if either node has not been already added with AddNode. |
ConnectedComponentsFinder | Constructs a connected components finder. |
ConnectedComponentsFinder | Arguments: |
FindConnectedComponents | Return type: Arguments: |
GetNumberOfComponents | Return type: Returns the current number of connected components. This number can change as the new nodes or edges are added. |
GetNumberOfNodes | Return type: Returns the current number of added distinct nodes. This includes nodes added explicitly via the calls to AddNode() method and implicitly via the calls to AddEdge() method. Nodes that were added several times only count once. |
GetSize | Return type: Arguments: Finds the connected component containing a node, and returns the total number of nodes in that component. Returns zero iff the node has not been already added with AddNode. |