in include/WeakPartialOrdering.h [275:292]
void build(const NodeId& root) {
construct_auxilary(root);
construct_wpo();
// Compute num_outer_preds.
for (auto& p : m_for_outer_preds) {
auto& v = p.first;
auto& x_max = p.second;
auto h = m_wpo_space[v].is_head() ? v : m_parent[v];
// index of exit == index of head - 1.
auto x = h - 1;
while (x != x_max) {
m_wpo_space[x].inc_num_outer_preds(v);
h = m_parent[h];
x = h - 1;
}
m_wpo_space[x].inc_num_outer_preds(v);
}
}