source: trunk/c++_tools/classifier/FeatureSelector.cc @ 607

Last change on this file since 607 was 607, checked in by Peter, 15 years ago

ref #96 included FeatureSelection? in CrossSplitter?. Also happened to add properties to files

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 587 bytes
Line 
1// $Id: FeatureSelector.cc 607 2006-08-29 14:42:28Z peter $
2
3#include "FeatureSelector.h"
4
5#include "DataLookup2D.h"
6
7#include <list>
8
9namespace theplu {
10namespace 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.