source: branches/peters_vector/lib/classifier/DataLookup2D.h @ 470

Last change on this file since 470 was 470, checked in by Peter, 16 years ago

compiling 3 tests fail

File size: 1.5 KB
Line 
1// $Id$
2
3#ifndef _theplu_classifier_DataLookup2D_
4#define _theplu_classifier_DataLookup2D_
5
6#include <vector>
7
8namespace theplu {
9namespace classifier { 
10
11  ///
12  /// Interface class for classifier data
13  ///
14
15  class DataLookup2D
16  {
17 
18  public:
19
20    ///
21    /// Constructor taking the row index vector and column index vector
22    /// as input.
23    ///
24    DataLookup2D(const std::vector<size_t>&, const std::vector<size_t>&);
25
26    ///
27    /// Constructor taking the row index vector or
28    /// column index vector (default)
29    ///
30    DataLookup2D(const std::vector<size_t>&, bool row=false);
31
32
33    ///
34    /// Copy constructor.
35    ///
36    DataLookup2D(const DataLookup2D&);
37
38    ///
39    ///
40    ///
41    DataLookup2D(const DataLookup2D&, const std::vector<size_t>& row, 
42               const std::vector<size_t>& col);
43
44    ///
45    ///
46    ///
47    DataLookup2D(const DataLookup2D&, const std::vector<size_t>& index, 
48               const bool row);
49
50
51    ///
52    /// Destructor
53    ///
54    virtual ~DataLookup2D() {};
55
56    ///
57    /// @return number of columns
58    ///
59    inline size_t columns(void) const { return column_index_.size(); } 
60
61    ///
62    /// @return number of rows
63    ///
64    inline size_t rows(void) const { return row_index_.size(); } 
65
66    ///
67    /// @return
68    ///
69    virtual double operator()(const size_t row, const size_t column) const=0;
70
71  protected:
72    std::vector<size_t> row_index_;
73    std::vector<size_t> column_index_;
74   
75    ///
76    /// Default constructor.
77    ///
78    DataLookup2D() {};
79
80  }; 
81 
82}} // of namespace classifier and namespace theplu
83
84#endif
Note: See TracBrowser for help on using the repository browser.