Functions for testing if a graph represents a (free) tree or forest. More...
Classes | |
class | ogdf::LCA |
Implements the <O(n log n), O(1)>-time "sparse table" algorithm by Bender and Farach-Colton to compute lowest common ancestors (LCAs) in arborescences (not arbitrary directed acyclic graphs). More... | |
Methods for trees and forests | |
bool | ogdf::isTree (const Graph &G) |
Returns true iff G is a tree, i.e. contains no undirected cycle and is connected. | |
bool | ogdf::isArborescenceForest (const Graph &G, List< node > &roots) |
Returns true iff G is a forest consisting only of arborescences. | |
bool | ogdf::isArborescenceForest (const Graph &G) |
Returns true iff G is a forest consisting only of arborescences. | |
bool | ogdf::isArborescence (const Graph &G, node &root) |
Returns true iff G represents an arborescence. | |
bool | ogdf::isArborescence (const Graph &G) |
Returns true iff G represents an arborescence. | |
Functions for testing if a graph represents a (free) tree or forest.
Returns true iff G
represents an arborescence.
G | is the input graph. |
G
represents an arborescence, false otherwise. Definition at line 973 of file simple_graph_alg.h.
Returns true iff G
represents an arborescence.
G | is the input graph. |
root | is assigned the root node (if true is returned). |
G
represents an arborescence, false otherwise. Returns true iff G
is a forest consisting only of arborescences.
G | is the input graph. |
G
represents an arborescence forest, false otherwise. Definition at line 935 of file simple_graph_alg.h.
Returns true iff G
is a forest consisting only of arborescences.
G | is the input graph. |
roots | is assigned the list of root nodes of the arborescences in the forest. If false is returned, roots is undefined. |
G
represents an arborescence forest, false otherwise. Returns true iff G
is a tree, i.e. contains no undirected cycle and is connected.
G | is the input graph. |
G
is a tree, false otherwise. Definition at line 913 of file simple_graph_alg.h.