get histogram index from a central place
get histogram index from a central place

if index is out of bounds (because suddenly a value >max comes) return the biggest bin

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb