123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #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
|