Implementation of a rooted triple distribution, constructed from a tree or a vector of trees. Compiles, not tested yet.