source: trunk/c++_tools/classifier/IRRank.h @ 666

Last change on this file since 666 was 666, checked in by Peter, 15 years ago

refs #151, added IRRetreive functors and prepared ConsensusInputRanker? for usage.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 600 bytes
Line 
1// $Id: IRRank.h 666 2006-10-06 04:07:54Z peter $
2
3#ifndef _theplu_classifier_ir_rank_
4#define _theplu_classifier_ir_rank_
5
6#include <c++_tools/classifier/InputRanker.h>
7
8namespace theplu {
9namespace classifier { 
10
11  ///
12  /// Functor retrieving minus rank from a InputRanker to
13  /// build a ConsensusInputRanker.
14  ///   
15  class IRRank : public IRRetrieve
16  {
17
18  public:
19    ///
20    /// @brief operator to retrieve information from @a ranker of
21    /// input @a i.
22    ///
23    inline double operator()(const InputRanker& ranker, size_t i) const
24    {
25      return -ranker.rank()[i];
26    }
27  };
28
29
30}} // of namespace classifier and namespace theplu
31
32#endif
Note: See TracBrowser for help on using the repository browser.