For most algorithms a const pointer to the histogram is enough and there is no need to cast away constness.
const