25 this->precision = precision;
35 inline int operator()(
const double key)
const
37 return (
int) floor(key / precision);
52 int main(
int argc,
char **argv)
61 JParser<> zap(
"Example program to test hash collection.");
68 catch(
const exception &error) {
69 FATAL(error.what() << endl);
75 typedef JHashCollection<double, get_value> hash_collection;
77 hash_collection buffer(precision);
79 for (
double x = 2.0; x >= 1.0; x -= 0.1) {
83 for (hash_collection::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {