Binary-tree histograms with tree indices