Home | Documentation | Download | Platforms | Projects | Mailing Lists | Version History
Public Member Functions | |
biconnectivity () | |
Creates biconnectivity algorithm object. | |
virtual | ~biconnectivity () |
Destroys biconnectivity algorithm object. | |
virtual int | check (graph &G) |
Checks whether the algorithm can be applied. | |
virtual void | reset () |
Resets algorithm. | |
int | low_number (const node &n) const |
low-number. | |
bool | is_biconnected () const |
Biconnectivity-test. | |
bool | store_components () const |
Returns whether the storing of components is enabled. | |
void | store_components (bool set) |
Enables or disables the storing of biconnected components. | |
void | make_biconnected (bool set) |
If enabled edges will be added to the graph in order to make it biconnected, if cutpoints are discovered. | |
bool | make_biconnected () const |
Returns whether addition of edges neccessary to make graph biconnected is enabled. | |
list< edge >::iterator | additional_begin () |
Begin of edges added to make graph biconnected. | |
list< edge >::iterator | additional_end () |
End of edges added to make graph biconnected. | |
cutpoint_iterator | cut_points_begin () |
Start iteration over all cutpoints found. | |
cutpoint_iterator | cut_points_end () |
End of iteration over all cutpoints. | |
component_iterator | components_begin () |
Start iteration over all biconnected components (if enabled during last call to run). | |
component_iterator | components_end () |
End of iteration over all biconnected components. | |
int | number_of_components () const |
Number von biconnected components detected during the last run. | |
virtual void | init_handler (graph &) |
Handler called before the start of DFS. | |
virtual void | entry_handler (graph &, node &, node &) |
Handler called when touching node n. | |
virtual void | before_recursive_call_handler (graph &, edge &, node &) |
Handler called when a unused node n connected to the actual node by e is found. | |
virtual void | after_recursive_call_handler (graph &, edge &, node &) |
Handler called after the algorithm returns from the subtree starting at n connected to the actual node by e. | |
virtual void | old_adj_node_handler (graph &, edge &, node &) |
Handler called when a already marked node n connected to the actual node by e is found during the search of all adjacent edges of the actual node. | |
virtual void | new_start_handler (graph &, node &) |
Called when DFS is started with start-node n. | |
virtual void | leave_handler (graph &, node &, node &) |
Handler called after all the adjacent edges of n have been examined. | |
virtual void | end_handler (graph &) |
Handler called at the end of DFS. |
Obviously there is a close relationship between DFS and the testing of biconnectivity. Thus this test takes advantage of the possibility to add pieces of code to the DFS-class in order to calculate the low-numbers.
As default no biconnected components will be stored and no edges will be added to make the graph biconnected. The test will run on the whole graph, even if it is not connected.
biconnectivity::biconnectivity | ( | ) |
virtual biconnectivity::~biconnectivity | ( | ) | [inline, virtual] |
virtual int biconnectivity::check | ( | graph & | G | ) | [virtual] |
Checks whether the algorithm can be applied.
Necessary preconditions:
G | graph. |
Reimplemented from dfs.
virtual void biconnectivity::reset | ( | ) | [virtual] |
Resets algorithm.
Prepares the algorithm to be applied to another graph. Please note: The options an algorithm may support do not get reset by this. It is just to reset internally used datastructures.
Reimplemented from dfs.
int biconnectivity::low_number | ( | const node & | n | ) | const [inline] |
bool biconnectivity::is_biconnected | ( | ) | const [inline] |
bool biconnectivity::store_components | ( | ) | const [inline] |
Returns whether the storing of components is enabled.
void biconnectivity::store_components | ( | bool | set | ) | [inline] |
Enables or disables the storing of biconnected components.
If this feature is enabled, the whole graph will be scanned in order to get all the biconnected components even if the graph isn't connected. By default this feature is disabled.
set | if true each biconnected component will be stored. |
void biconnectivity::make_biconnected | ( | bool | set | ) | [inline] |
bool biconnectivity::make_biconnected | ( | ) | const [inline] |
Returns whether addition of edges neccessary to make graph biconnected is enabled.
list<edge>::iterator biconnectivity::additional_begin | ( | ) | [inline] |
Begin of edges added to make graph biconnected.
list<edge>::iterator biconnectivity::additional_end | ( | ) | [inline] |
End of edges added to make graph biconnected.
cutpoint_iterator biconnectivity::cut_points_begin | ( | ) | [inline] |
Start iteration over all cutpoints found.
A cutpoints is a node whose removal will disconnect the graph, thus a graph with no cutpoints is biconnected and vice versa.
cutpoint_iterator biconnectivity::cut_points_end | ( | ) | [inline] |
End of iteration over all cutpoints.
component_iterator biconnectivity::components_begin | ( | ) | [inline] |
Start iteration over all biconnected components (if enabled during last call to run).
Components are represented as a pair consisting of a list of nodes and a list of edges, i.e. if it is of type component_iterator then *it is of type pair<list<node>,list<edge> >.
component_iterator biconnectivity::components_end | ( | ) | [inline] |
End of iteration over all biconnected components.
int biconnectivity::number_of_components | ( | ) | const [inline] |
Number von biconnected components detected during the last run.
virtual void biconnectivity::init_handler | ( | graph & | G | ) | [virtual] |
Handler called before the start of DFS.
G | graph for which DFS was invoked. |
Reimplemented from dfs.
Handler called when touching node n.
G | graph for which DFS was invoked. | |
n | actual node. | |
f | predecessor. |
Reimplemented from dfs.
virtual void biconnectivity::before_recursive_call_handler | ( | graph & | G, | |
edge & | e, | |||
node & | n | |||
) | [virtual] |
Handler called when a unused node n connected to the actual node by e is found.
G | graph for which DFS was invoked. | |
e | edge connecting the actual node to the unused one. | |
n | unused node. |
Reimplemented from dfs.
virtual void biconnectivity::after_recursive_call_handler | ( | graph & | G, | |
edge & | e, | |||
node & | n | |||
) | [virtual] |
Handler called after the algorithm returns from the subtree starting at n connected to the actual node by e.
G | graph for which DFS was invoked. | |
e | edge connecting the actual node to the unused one. | |
n | unused node. |
Reimplemented from dfs.
Handler called when a already marked node n connected to the actual node by e is found during the search of all adjacent edges of the actual node.
G | graph for which DFS was invoked. | |
e | edge connecting the actual node to the old one. | |
n | used node. |
Reimplemented from dfs.
Called when DFS is started with start-node n.
This is particularly useful when DFS was invoked with the scan_whole_graph option.
G | graph for which DFS was invoked. | |
n | start-node. |
Reimplemented from dfs.
Handler called after all the adjacent edges of n have been examined.
G | graph for which DFS was invoked. | |
n | actual node. | |
f | predecessor. |
Reimplemented from dfs.
virtual void biconnectivity::end_handler | ( | graph & | G | ) | [virtual] |
Handler called at the end of DFS.
G | graph for which DFS was invoked. |
Reimplemented from dfs.
University of Passau - FMI - Theoretical Computer Science