2#ifndef INKSCAPE_UTIL_TREEIFY_H
3#define INKSCAPE_UTIL_TREEIFY_H
Miscellaneous supporting code.
TreeifyResult treeify(int N, std::function< bool(int, int)> const &contains)
Given a collection of nodes 0 ... N - 1 and a containment function, attempt to organise the nodes int...
std::vector< int > preorder
The preorder traversal of the nodes, a permutation of {0, ..., N - 1}.
std::vector< int > num_children
For each node, the number of direct children.