Sha256: 74d9a36e83bbb20058376ce8d8ec906309446defdd82d64134f137cb22a83b7d

Contents?: true

Size: 1 KB

Versions: 7

Compression:

Stored size: 1 KB

Contents

#ifndef __feature_h__
#define __feature_h__
#include <string>
using namespace std;

namespace DataSet {
  class DataSet;
  
  class Feature {
  public:
    string  name;
    int     index;
    
    string  get_name()                  { return name; }
    int     get_index()                 { return index; }
    void    set_name(string new_name)   { name = new_name; }
    void    set_index(int new_index)    { index = new_index; }
    
    Feature(string name, int index) : name(name), index(index) {}
    virtual Feature *clone() { return NULL; }
    virtual void reset() {}
    virtual void print() {}

    // counting
    virtual void prepare_for_counting(DataSet *data_set) {}
    virtual void count_example(double value, int category_index) {}
    virtual void finalise_counting(DataSet *data_set) {}
    
    // indexing
    virtual void prepare_for_indexing(DataSet *data_set) {}
    virtual void index_example(double value, Example *example) {}
    virtual void finalise_indexing(DataSet *data_set) {}
  };
}

#endif

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
thera-0.0.7 lib/quarry/src/data_set/feature.h
thera-0.0.6 lib/quarry/src/data_set/feature.h
thera-0.0.5 lib/quarry/src/data_set/feature.h
thera-0.0.4 lib/quarry/src/data_set/feature.h
thera-0.0.3 lib/quarry/src/data_set/feature.h
thera-0.0.2 lib/quarry/src/data_set/feature.h
thera-0.0.1 lib/quarry/src/data_set/feature.h