Class to calculate average of histograms