Generic impementation of an Histogram