GenericKernelFunction.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * @file GenericKernelFunction.h
  3. * @author Alexander Freytag
  4. * @brief Abstract class for all kernels (Interface - abstract)
  5. * @date 12/08/2011
  6. */
  7. #ifndef _NICE_GENERICKERNELFUNCTION
  8. #define _NICE_GENERICKERNELFUNCTION
  9. #include <vector>
  10. #include <core/vector/VectorT.h>
  11. namespace NICE {
  12. /**
  13. * @class GenericKernelFunction
  14. * @brief Abstract class for all kernels
  15. * @author Alexander Freytag
  16. */
  17. template<class T> class GenericKernelFunction
  18. {
  19. protected:
  20. public:
  21. /** simple constructor */
  22. GenericKernelFunction(){};
  23. /** simple destructor */
  24. ~GenericKernelFunction(){};
  25. virtual double measureDistance ( const std::vector<T> & a, const std::vector<T> & b )=0;
  26. virtual NICE::Matrix computeKernelMatrix ( const std::vector<std::vector<T> > & X )=0;
  27. virtual NICE::Matrix computeKernelMatrix ( const std::vector<std::vector<T> > & X , const double & noise)=0;
  28. virtual std::vector<double> computeKernelVector ( const std::vector<std::vector<T> > & X , const NICE::Vector & xstar)=0;
  29. virtual void sayYourName()=0;
  30. };
  31. }
  32. #endif