12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #ifndef FEATUREINCLUDE
- #define FEATUREINCLUDE
- #include <set>
- #include <map>
- #include "vislearning/cbaselib/CachedExample.h"
- #include "vislearning/cbaselib/Example.h"
- #include "core/basics/Persistent.h"
- #include "core/basics/triplet.h"
- #include "core/basics/quadruplet.h"
- namespace OBJREC {
- class FeaturePool;
- #define ROADWORKS { fprintf(stderr, "not yet implemented !\n"); exit(-1); }
- class FeatureValues : public std::set< NICE::quadruplet<double, int, int, double> > {};
- class FeatureStorage : public std::map< int, FeatureValues > {};
- class FeatureValuesUnsorted : public std::vector< NICE::quadruplet<double, int, int, double > > {};
- class FeatureStorageUnsorted : public std::map< int, FeatureValuesUnsorted > {};
- class Feature : public NICE::Persistent
- {
- protected:
- public:
-
- Feature();
-
- virtual ~Feature();
- virtual double val( const Example *example ) const = 0;
- virtual Feature *clone() const = 0;
- virtual void explode ( FeaturePool & featurePool, bool variableWindow = true ) const = 0;
- virtual void calcFeatureValues ( const Examples & examples,
- std::vector<int> & examples_selection,
- FeatureValuesUnsorted & values ) const;
- virtual void calcFeatureValues ( const Examples & examples,
- std::vector<int> & examples_selection,
- FeatureValues & values ) const;
- };
- }
- #undef ROADWORKS
- #endif
|