function path = tree_path(A, B, tree, heights)
%
% Return all the nodes on the path between A and B in the rooted tree, including endpoints.

[C, pathA, pathB] = least_common_ancestor(A, B, heights, tree);
path = union(pathA, pathB);
path = union(path, A);
path = union(path, B);
