Last change
on this file since 470 was
470,
checked in by Peter, 17 years ago
|
compiling 3 tests fail
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
1.3 KB
|
Line | |
---|
1 | // $Id: KernelLookup.h 470 2005-12-19 19:46:50Z peter $ |
---|
2 | |
---|
3 | #ifndef _theplu_classifier_kernel_lookup_ |
---|
4 | #define _theplu_classifier_kernel_lookup_ |
---|
5 | |
---|
6 | #include <c++_tools/classifier/Kernel.h> |
---|
7 | #include <c++_tools/classifier/DataLookup2D.h> |
---|
8 | #include <vector> |
---|
9 | |
---|
10 | namespace theplu { |
---|
11 | namespace classifier { |
---|
12 | |
---|
13 | class KernelFunction; |
---|
14 | |
---|
15 | /// |
---|
16 | /// @brief View into sub Kernel |
---|
17 | /// |
---|
18 | class KernelLookup : public DataLookup2D |
---|
19 | { |
---|
20 | |
---|
21 | public: |
---|
22 | |
---|
23 | /// |
---|
24 | /// Constructor |
---|
25 | /// |
---|
26 | KernelLookup(const Kernel&); |
---|
27 | |
---|
28 | /// |
---|
29 | /// Contructor taking the Kernel to view into, row index vector, |
---|
30 | /// and column index vector. |
---|
31 | /// |
---|
32 | /// @note For training usage row index shall always be equal to |
---|
33 | /// column index. |
---|
34 | /// |
---|
35 | KernelLookup(const Kernel& kernel, const std::vector<size_t>& row, |
---|
36 | const std::vector<size_t>& column); |
---|
37 | |
---|
38 | /// |
---|
39 | /// Copy constructor |
---|
40 | /// |
---|
41 | KernelLookup(const KernelLookup&); |
---|
42 | |
---|
43 | /// |
---|
44 | /// @return element at position (\a row, \a column) in the Kernel |
---|
45 | /// matrix |
---|
46 | /// |
---|
47 | inline double operator()(const size_t row,const size_t column) const |
---|
48 | { return (*kernel_)(row_index_[row],column_index_[column]); } |
---|
49 | |
---|
50 | |
---|
51 | |
---|
52 | private: |
---|
53 | /// |
---|
54 | /// Default constructor. Not implemented. |
---|
55 | /// |
---|
56 | KernelLookup(void); |
---|
57 | |
---|
58 | const Kernel* kernel_; |
---|
59 | |
---|
60 | }; // class KernelLookup |
---|
61 | |
---|
62 | }} // of namespace classifier and namespace theplu |
---|
63 | |
---|
64 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.