yat
0.11.3pre
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
yat
classifier
KernelLookup.h
1
#ifndef _theplu_yat_classifier_kernel_lookup_
2
#define _theplu_yat_classifier_kernel_lookup_
3
4
// $Id: KernelLookup.h 2919 2012-12-19 06:54:23Z peter $
5
6
/*
7
Copyright (C) 2005 Jari Häkkinen, 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
Copyright (C) 2010, 2012 Peter Johansson
11
12
This file is part of the yat library, http://dev.thep.lu.se/yat
13
14
The yat library is free software; you can redistribute it and/or
15
modify it under the terms of the GNU General Public License as
16
published by the Free Software Foundation; either version 3 of the
17
License, or (at your option) any later version.
18
19
The yat library is distributed in the hope that it will be useful,
20
but WITHOUT ANY WARRANTY; without even the implied warranty of
21
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
General Public License for more details.
23
24
You should have received a copy of the GNU General Public License
25
along with yat. If not, see <http://www.gnu.org/licenses/>.
26
*/
27
28
#include "Kernel.h"
29
#include "yat/utility/Container2DIterator.h"
30
#include "yat/utility/Index.h"
31
#include "yat/utility/iterator_traits.h"
32
#include "yat/utility/StrideIterator.h"
33
34
#include <boost/shared_ptr.hpp>
35
36
namespace
theplu {
37
namespace
yat {
38
namespace
classifier {
39
40
class
KernelFunction;
41
class
MatrixLookup;
42
class
MatrixLookupWeighted;
43
67
class
KernelLookup
68
{
69
70
public
:
76
typedef
double
value_type
;
77
83
typedef
const
double
const_reference
;
84
86
typedef
utility::StrideIterator
<
87
utility::Container2DIterator
<
const
KernelLookup
,
const
double,
88
const_reference
> >
89
const_iterator
;
90
94
typedef
const_iterator
const_column_iterator
;
95
99
typedef
const_iterator
const_row_iterator
;
100
116
KernelLookup
(
const
Kernel
& kernel,
const
bool
owner=
false
);
117
134
KernelLookup
(
const
Kernel
& kernel,
const
utility::Index
& row,
135
const
utility::Index
& column,
const
bool
owner=
false
);
136
146
KernelLookup
(
const
KernelLookup
& kl);
147
148
166
KernelLookup
(
const
KernelLookup
& kl,
const
utility::Index
& row,
167
const
utility::Index
& column);
168
181
KernelLookup
(
const
KernelLookup
& kl,
const
utility::Index
&,
182
const
bool
row=
false
);
183
190
virtual
~KernelLookup
(
void
);
191
198
const_iterator
begin
(
void
)
const
;
199
205
const_column_iterator
begin_column
(
size_t
)
const
;
206
212
const_row_iterator
begin_row
(
size_t
)
const
;
213
217
size_t
columns
(
void
)
const
;
218
227
MatrixLookup
data
(
void
)
const
;
228
237
MatrixLookupWeighted
data_weighted
(
void
)
const
;
238
245
double
element
(
const
DataLookup1D
& vec,
size_t
i)
const
;
246
256
double
element
(
const
DataLookupWeighted1D
& vec,
size_t
i)
const
;
257
261
const_iterator
end
(
void
)
const
;
262
266
const_column_iterator
end_column
(
size_t
)
const
;
267
271
const_row_iterator
end_row
(
size_t
)
const
;
272
276
size_t
rows
(
void
)
const
;
277
284
KernelLookup
selected
(
const
utility::Index
& index)
const
;
285
296
KernelLookup
test_kernel
(
const
MatrixLookup
&
data
)
const
;
297
308
KernelLookup
test_kernel
(
const
MatrixLookupWeighted
&
data
)
const
;
309
313
bool
weighted
(
void
)
const
;
314
319
const_reference
operator()
(
size_t
row,
size_t
column)
const
;
320
321
private
:
322
const
KernelLookup
& operator=(
const
KernelLookup
&);
323
bool
validate(
const
utility::Index
&)
const
;
324
325
utility::Index
column_index_;
326
boost::shared_ptr<const Kernel> kernel_;
327
utility::Index
row_index_;
328
};
// class KernelLookup
329
330
}}}
// of namespace classifier, yat, and theplu
331
332
#endif
Generated on Sat May 24 2014 03:33:04 for yat by
1.8.2