Line | |
---|
1 | // $Id$ |
---|
2 | |
---|
3 | #include "FeatureSelector.h" |
---|
4 | |
---|
5 | #include "DataLookup2D.h" |
---|
6 | |
---|
7 | #include <list> |
---|
8 | |
---|
9 | namespace theplu { |
---|
10 | namespace classifier { |
---|
11 | |
---|
12 | |
---|
13 | FeatureSelector::FeatureSelector(size_t N, size_t first) |
---|
14 | : first_(first), N_(N) |
---|
15 | { |
---|
16 | } |
---|
17 | |
---|
18 | |
---|
19 | FeatureSelector::~FeatureSelector() |
---|
20 | { |
---|
21 | for (std::list<const DataLookup2D*>::iterator i=garbage_.begin(); |
---|
22 | i!=garbage_.end(); ++i) |
---|
23 | delete *i; |
---|
24 | } |
---|
25 | |
---|
26 | |
---|
27 | const DataLookup2D& FeatureSelector::get(const DataLookup2D& data) |
---|
28 | { |
---|
29 | garbage_.push_back(data.selected(features_)); |
---|
30 | return *garbage_.back(); |
---|
31 | } |
---|
32 | |
---|
33 | } // end of namespace classifier |
---|
34 | } // end of namespace theplu |
---|
Note: See
TracBrowser
for help on using the repository browser.