LessCachedESTInfo Class Reference

Functor for CachedESTInfo sorting. More...

#include <CachedESTInfoHelper.h>

Collaboration diagram for LessCachedESTInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LessCachedESTInfo (const ESTAnalyzer *analyzer)
 Constructor.
bool operator() (const CachedESTInfo &estInfo1, const CachedESTInfo &estInfo2)
 operator() for CachedESTInfo.

Private Member Functions

LessCachedESTInfooperator= (const LessCachedESTInfo &src)
 A dummy operator=.

Private Attributes

const ESTAnalyzer *const comparator
 The functor for comparing.

Detailed Description

Functor for CachedESTInfo sorting.

This Functor is used when sorting ESTs based on similarity/distance metric by the sort method defined in this class. This functor sorts methods in ascending order with the smallest values at top.

Definition at line 58 of file CachedESTInfoHelper.h.


Constructor & Destructor Documentation

LessCachedESTInfo::LessCachedESTInfo ( const ESTAnalyzer analyzer  )  [inline]

Constructor.

The constructor requires a pointer to the ESTAnalyzer that is being used for analysis. The analyzer is used to compare the metrics for sorting CachedESTInfo objects. This constructor is called in the MSTCache class for sorting cache entries.

Parameters:
[in] analyzer The analyzer to be used for comparing the metric values associated with two CachedESTInfo objects.

Definition at line 73 of file CachedESTInfoHelper.h.


Member Function Documentation

LessCachedESTInfo::operator() ( const CachedESTInfo estInfo1,
const CachedESTInfo estInfo2 
) [inline]

operator() for CachedESTInfo.

The following operator provides a convenient mechanism for comparing CachedESTInfo objects for sorting. This operator overrides the default STL operator() by comparing only the metrics of two CachedESTInfo objects (ignoring the EST indexes and any other information). This method uses the metric comparison functionality provided by all EST analyzers.

Parameters:
[in] estInfo1 The first CachedESTInfo object to be used for comparison.
[in] estInfo2 The second CachedESTInfo object to be used for comparison.
Returns:
This method returns true if estInfo1.metric is better than estInfo2.metric. Otherwise it returns false.

Definition at line 98 of file CachedESTInfoHelper.h.

References comparator, ESTAnalyzer::compareMetrics(), and CachedESTInfo::metric.

LessCachedESTInfo& LessCachedESTInfo::operator= ( const LessCachedESTInfo src  )  [private]

A dummy operator=.

The operator=() is supressed for this class as it has constant members whose value is set when the object is created. These values cannot be changed during the lifetime of this object.

Parameters:
[in] src The source object from where data is to be copied. Currently this value is ignored.
Returns:
Reference to this.

Member Data Documentation

The functor for comparing.

This comparator is set based on the template parameter associated with the enclosing class.

Definition at line 108 of file CachedESTInfoHelper.h.

Referenced by operator()().


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

Generated on 19 Mar 2010 for PEACE by  doxygen 1.6.1