VCTransform.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * @file VCTransform.h
  3. // refactor-nice.pl: check this substitution
  4. // old: * @brief interface to Vector Transformation
  5. * @brief interface to NICE::Vector Transformation
  6. * @author Michael Koch
  7. * @date 11/28/2007
  8. */
  9. #ifndef VCTransformINCLUDE
  10. #define VCTransformINCLUDE
  11. #include "core/vector/VectorT.h"
  12. #include "core/vector/MatrixT.h"
  13. #include "vislearning/math/ftransform/FTransform.h"
  14. #include "vislearning/classifier/classifierbase/VecClassifier.h"
  15. namespace OBJREC {
  16. /** VC with Feature Transformation */
  17. class VCTransform : public VecClassifier
  18. {
  19. protected:
  20. VecClassifier * classifier;
  21. FTransform * transform;
  22. LabeledSetVector transformedSet;
  23. uint dimension;
  24. uint mode;
  25. public:
  26. /** simple constructor */
  27. VCTransform( const NICE::Config *conf, VecClassifier * classifier, FTransform * transform );
  28. /** simple destructor */
  29. virtual ~VCTransform();
  30. /** classify using simple vector */
  31. // refactor-nice.pl: check this substitution
  32. // old: virtual ClassificationResult classify ( const ice::Vector & x ) const;
  33. ClassificationResult classify ( const NICE::Vector & x ) const;
  34. void teach ( const LabeledSetVector & teachSet );
  35. void finishTeaching();
  36. void restore ( std::istream & is, int format = 0 );
  37. void store ( std::ostream & is, int format = 0 ) const;
  38. void clear ();
  39. };
  40. } // namespace
  41. #endif