Creating tree views and tree slices¶
Given a node list we can create a new tree by calling
It recursively follows the parents until a desired root, and returns corresponding
list of roots.
This effectively creates views of the global tree which contain specified nodes.
Slices of the tree can be obtained by using
to select a set of nodes and using
recreate the tree.
This mechanism is already part of
and can be used by specifying