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:
856 bytes
|
Line | |
---|
1 | // $Id: DataLookup1D.h 470 2005-12-19 19:46:50Z peter $ |
---|
2 | |
---|
3 | #ifndef _theplu_classifier_dataLookup1D_ |
---|
4 | #define _theplu_classifier_dataLookup1D_ |
---|
5 | |
---|
6 | #include <c++_tools/classifier/DataLookup2D.h> |
---|
7 | |
---|
8 | #include <vector> |
---|
9 | |
---|
10 | namespace theplu { |
---|
11 | namespace classifier { |
---|
12 | |
---|
13 | class DataLookup2D; |
---|
14 | |
---|
15 | /// |
---|
16 | /// Class for general vector view |
---|
17 | /// |
---|
18 | |
---|
19 | class DataLookup1D |
---|
20 | { |
---|
21 | |
---|
22 | public: |
---|
23 | |
---|
24 | /// |
---|
25 | /// Constructor |
---|
26 | /// |
---|
27 | DataLookup1D(const DataLookup2D&, const size_t, const bool row); |
---|
28 | |
---|
29 | /// |
---|
30 | /// |
---|
31 | /// |
---|
32 | inline size_t size(void) const |
---|
33 | { return column_vector_ ? matrix_->rows() : matrix_->columns(); } |
---|
34 | |
---|
35 | /// |
---|
36 | /// |
---|
37 | /// |
---|
38 | inline double operator()(const size_t i) const |
---|
39 | { return column_vector_ ? (*matrix_)(i,index_) : (*matrix_)(index_,i); } |
---|
40 | |
---|
41 | private: |
---|
42 | DataLookup1D(); |
---|
43 | |
---|
44 | const bool column_vector_; |
---|
45 | const size_t index_; |
---|
46 | const DataLookup2D* matrix_; |
---|
47 | |
---|
48 | }; |
---|
49 | |
---|
50 | }} // of namespace classifier and namespace theplu |
---|
51 | |
---|
52 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.