xapian-core  1.4.26
Public Member Functions | List of all members
StringAndFreqCmpByFreq Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StringAndFreqCmpByFreq()

StringAndFreqCmpByFreq::StringAndFreqCmpByFreq ( )
inline

Default constructor.

Definition at line 174 of file matchspy.cc.

Member Function Documentation

◆ operator()()

bool StringAndFreqCmpByFreq::operator() ( const StringAndFrequency a,
const StringAndFrequency b 
) const
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().


The documentation for this class was generated from the following file: