dip::LowestCommonAncestorSolver class

Solves the lowest common ancestor problem for a tree.

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 (see dip::Graph::MinimumSpanningForest).

Functions

auto GetLCA(dip::uint a, dip::uint b) const -> dip::uint
Returns the vertex that is the nearest common ancestor to vertices a and b.
auto GetLogF(dip::uint index) const -> dip::dfloat
Returns the value associated to the vertex index. TODO: describe this value!