LowestCommonAncestorSolver class
Solves the lowest common ancestor problem for a tree.
Contents
Constructors, destructors, assignment and conversion operators
- LowestCommonAncestorSolver(dip::Graph const& graph)
- The constructor takes a
graph
, which must not have any cycles in it (it must be a tree). The easiest way to turn an arbitrary graph into a tree is to compute the MST (seedip::Graph::MinimumSpanningForest
).