yat
0.11.3pre
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
yat
classifier
ConsensusInputRanker.h
1
#ifndef _theplu_yat_classifier_consensusinputranker_
2
#define _theplu_yat_classifier_consensusinputranker_
3
4
// $Id: ConsensusInputRanker.h 2119 2009-12-12 23:11:43Z peter $
5
6
/*
7
Copyright (C) 2004, 2005 Peter Johansson
8
Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
9
Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
10
11
This file is part of the yat library, http://dev.thep.lu.se/yat
12
13
The yat library is free software; you can redistribute it and/or
14
modify it under the terms of the GNU General Public License as
15
published by the Free Software Foundation; either version 3 of the
16
License, or (at your option) any later version.
17
18
The yat library is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
General Public License for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with yat. If not, see <http://www.gnu.org/licenses/>.
25
*/
26
27
#include "InputRanker.h"
28
29
#include <vector>
30
31
namespace
theplu {
32
namespace
yat {
33
namespace
statistics {
34
class
Score;
35
class
VectorFunction;
36
}
37
namespace
classifier {
38
39
class
IRRetrieve;
40
class
MatrixLookup;
41
class
MatrixLookupWeighted;
42
class
Sampler;
43
67
class
ConsensusInputRanker
68
{
69
70
public
:
71
77
ConsensusInputRanker
(
const
IRRetrieve
&,
const
statistics::VectorFunction
&);
78
85
void
add
(
const
Sampler
& sampler,
const
MatrixLookup
&,
86
const
statistics::Score
& s);
87
96
void
add
(
const
Sampler
& sampler,
const
MatrixLookupWeighted
& data,
97
const
statistics::Score
& score);
98
107
void
add
(
const
InputRanker
& ir);
108
113
size_t
id
(
size_t
i)
const
;
114
118
const
InputRanker
&
input_ranker
(
size_t
i)
const
;
119
124
size_t
rank
(
size_t
i)
const
;
125
132
void
reserve
(
size_t
n);
133
134
138
void
update
(
void
);
139
140
141
private
:
142
143
std::vector<size_t> id_;
144
std::vector<InputRanker> input_rankers_;
145
std::vector<size_t> rank_;
146
const
IRRetrieve
& retriever_;
147
const
statistics::VectorFunction
& vec_func_;
148
};
149
150
}}}
// of namespace classifier, yat, and theplu
151
152
#endif
Generated on Sat May 24 2014 03:33:04 for yat by
1.8.2