Last change
on this file since 667 was
667,
checked in by Peter, 16 years ago
|
refs #151 using Functor now in consensusinputranker to retrieve information from inputranker to sort on. Median is still hard-coded so I leave this ticket open.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
666 bytes
|
Line | |
---|
1 | // $Id: IRRank.h 667 2006-10-06 07:03:19Z peter $ |
---|
2 | |
---|
3 | #ifndef _theplu_classifier_ir_rank_ |
---|
4 | #define _theplu_classifier_ir_rank_ |
---|
5 | |
---|
6 | #include <c++_tools/classifier/InputRanker.h> |
---|
7 | #include <c++_tools/classifier/IRRetrieve.h> |
---|
8 | |
---|
9 | namespace theplu { |
---|
10 | namespace classifier { |
---|
11 | |
---|
12 | /// |
---|
13 | /// Functor retrieving minus rank from a InputRanker to |
---|
14 | /// build a ConsensusInputRanker. |
---|
15 | /// |
---|
16 | class IRRank : public IRRetrieve |
---|
17 | { |
---|
18 | |
---|
19 | public: |
---|
20 | /// |
---|
21 | /// @brief operator to retrieve information from @a ranker of |
---|
22 | /// input @a i. |
---|
23 | /// |
---|
24 | inline double operator()(const InputRanker& ranker, size_t i) const |
---|
25 | { |
---|
26 | return -static_cast<double>(ranker.rank()[i]); |
---|
27 | } |
---|
28 | }; |
---|
29 | |
---|
30 | |
---|
31 | }} // of namespace classifier and namespace theplu |
---|
32 | |
---|
33 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.