Construction of regular and irregular histograms with different