Last change
on this file since 475 was
475,
checked in by Peter, 18 years ago
|
I dont know what happened, but everything is changed...
|
File size:
1.1 KB
|
Line | |
---|
1 | // $Id$ |
---|
2 | |
---|
3 | #include <c++_tools/classifier/DataLookup2D.h> |
---|
4 | |
---|
5 | #include <vector> |
---|
6 | |
---|
7 | namespace theplu { |
---|
8 | namespace classifier { |
---|
9 | |
---|
10 | |
---|
11 | DataLookup2D::DataLookup2D(const DataLookup2D& m, |
---|
12 | const std::vector<size_t>& row, |
---|
13 | const std::vector<size_t>& col) |
---|
14 | { |
---|
15 | for (size_t i=0; i<row.size(); i++) |
---|
16 | row_index_[i] = m.row_index_[row[i]]; |
---|
17 | for (size_t i=0; i<col.size(); i++) |
---|
18 | column_index_[i] = m.column_index_[col[i]]; |
---|
19 | } |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | DataLookup2D::DataLookup2D(const DataLookup2D& m, |
---|
24 | const std::vector<size_t>& index, |
---|
25 | const bool row) |
---|
26 | { |
---|
27 | if (row){ |
---|
28 | row_index_=index; |
---|
29 | column_index_= m.column_index_; |
---|
30 | } |
---|
31 | else{ |
---|
32 | column_index_=index; |
---|
33 | row_index_= m.row_index_; |
---|
34 | } |
---|
35 | } |
---|
36 | |
---|
37 | |
---|
38 | DataLookup2D::DataLookup2D(const std::vector<size_t>& row, |
---|
39 | const std::vector<size_t>& col) |
---|
40 | : row_index_(row),column_index_(col) |
---|
41 | { |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | DataLookup2D::DataLookup2D(const std::vector<size_t>& index, bool row) |
---|
47 | { |
---|
48 | } |
---|
49 | |
---|
50 | |
---|
51 | DataLookup2D::DataLookup2D(const DataLookup2D& mv) |
---|
52 | : row_index_(mv.row_index_),column_index_(mv.column_index_) |
---|
53 | { |
---|
54 | } |
---|
55 | |
---|
56 | |
---|
57 | }} // of namespace classifier and namespace theplu |
---|
Note: See
TracBrowser
for help on using the repository browser.