Line | |
---|
1 | // $Id: IRScore.h 666 2006-10-06 04:07:54Z peter $ |
---|
2 | |
---|
3 | #ifndef _theplu_classifier_ir_score_ |
---|
4 | #define _theplu_classifier_ir_score_ |
---|
5 | |
---|
6 | #include <c++_tools/classifier/InputRanker.h> |
---|
7 | |
---|
8 | namespace theplu { |
---|
9 | namespace classifier { |
---|
10 | |
---|
11 | /// |
---|
12 | /// Functor retrieving score 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.score(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.