1 #ifndef GENESIS_TREE_FUNCTION_LCA_LOOKUP_H_ 2 #define GENESIS_TREE_FUNCTION_LCA_LOOKUP_H_ 89 std::size_t
operator()(
size_t node_index_a,
size_t node_index_b,
size_t root_index )
const;
92 size_t operator()(
size_t node_index_a,
size_t node_index_b )
const;
101 void init_(
Tree const& tree );
110 size_t eulertour_query_(
size_t i,
size_t j )
const;
116 size_t lookup_(
size_t node_index_a,
size_t node_index_b,
size_t root_index )
const;
133 std::vector<size_t> eulertour_order_;
138 std::vector<size_t> eulertour_first_occurrence_;
140 Tree const* tree_ =
nullptr;
147 #endif // include guard Class that allows to efficiently find the index of the minimum element within an interval of an array...
Fast lookup of the lowest common ancestor (LCA) of two TreeNodes, relative to an arbitrary root node...
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
LcaLookup & operator=(LcaLookup const &other)=default
Class for representing phylogenetic trees.
std::size_t operator()(size_t node_index_a, size_t node_index_b, size_t root_index) const