StringAndFreqCmpByFreq Class Reference

Compare two StringAndFrequency objects. More...

List of all members.

Public Member Functions

 StringAndFreqCmpByFreq ()
 Default constructor.
bool operator() (const StringAndFrequency &a, const StringAndFrequency &b) const
 Return true if a has a higher frequency than b.


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 170 of file matchspy.cc.


Constructor & Destructor Documentation

StringAndFreqCmpByFreq::StringAndFreqCmpByFreq (  )  [inline]

Default constructor.

Definition at line 173 of file matchspy.cc.


Member Function Documentation

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 177 of file matchspy.cc.

References StringAndFrequency::get_frequency(), and StringAndFrequency::get_string().


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

Documentation for Xapian (version 1.2.13).
Generated on 9 Jan 2013 by Doxygen 1.5.9.