#include <compare.hh>
Public Member Functions | |
Comparator (std::size_t order) | |
bool | operator() (const void *lhs, const void *rhs) const |
std::size_t | Order () const |
Protected Attributes | |
std::size_t | order_ |
Definition at line 14 of file compare.hh.
lm::Comparator< Child >::Comparator | ( | std::size_t | order | ) | [inline, explicit] |
Constructs a comparator capable of comparing two n-grams.
order | Number of words in each n-gram |
Definition at line 22 of file compare.hh.
bool lm::Comparator< Child >::operator() | ( | const void * | lhs, | |
const void * | rhs | |||
) | const [inline] |
Applies the comparator using the Compare method that must be defined in any class that inherits from this class.
lhs | A pointer to the n-gram on the left-hand side of the comparison | |
rhs | A pointer to the n-gram on the right-hand side of the comparison |
Definition at line 34 of file compare.hh.
std::size_t lm::Comparator< Child >::Order | ( | ) | const [inline] |
Gets the n-gram order defined for this comparator.
Definition at line 39 of file compare.hh.
Referenced by lm::builder::CombineCounts::operator()().
std::size_t lm::Comparator< Child >::order_ [protected] |