xapian-core
1.4.26
|
Compare two StringAndFrequency objects. More...
Public Member Functions | |
StringAndFreqCmpByFreq () | |
Default constructor. More... | |
bool | operator() (const StringAndFrequency &a, const StringAndFrequency &b) const |
Return true if a has a higher frequency than b. More... | |
Compare two StringAndFrequency objects.
The comparison is firstly by frequency (higher is better), then by string (earlier lexicographic sort is better).
Definition at line 171 of file matchspy.cc.
|
inline |
Default constructor.
Definition at line 174 of file matchspy.cc.
|
inline |
Return true if a has a higher frequency than b.
If equal, compare by the str, to provide a stable sort order.
Definition at line 178 of file matchspy.cc.
References StringAndFrequency::get_frequency(), and StringAndFrequency::get_string().