Public Member Functions | |
NumericRanges () | |
Construct an empty NumericRanges object. | |
NumericRanges (const std::map< std::string, Xapian::doccount > &values, size_t max_ranges) | |
Construct a NumericRanges from values and a target number of ranges. | |
doccount | get_values_seen () const |
Get the number of values seen. | |
const std::map < Xapian::NumericRange, Xapian::doccount > & | get_ranges () const |
Get the ranges. |
Xapian::NumericRanges::NumericRanges | ( | const std::map< std::string, Xapian::doccount > & | values, | |
size_t | max_ranges | |||
) |
Construct a NumericRanges from values and a target number of ranges.
The values supplied should be sort-encoded numeric values.
For "continuous" values (such as price, height, weight, etc), there will usually be too many different values to offer the user, and the user won't want to restrict to an exact value anyway.
This method produces a set of NumericRange objects for a particular value number.
values | The values representing the initial numbers. | |
max_ranges | Group into at most this many ranges. |