/** * @file KMeansMatlab.h * @brief K-Means * @author Erik Rodner * @date 10/29/2007 */ #ifndef KMeansMatlabINCLUDE #define KMeansMatlabINCLUDE #include "core/vector/VectorT.h" #include "core/vector/MatrixT.h" #include "core/basics/Config.h" #include "ClusterAlgorithm.h" namespace OBJREC { /** K-Means */ class KMeansMatlab : public ClusterAlgorithm { protected: int noClasses; // refactor-nice.pl: check this substitution // old: string kmeansDir; std::string kmeansDir; // refactor-nice.pl: check this substitution // old: string matlabExec; std::string matlabExec; // refactor-nice.pl: check this substitution // old: string matlabArgs; std::string matlabArgs; // refactor-nice.pl: check this substitution // old: string inputFN; std::string inputFN; // refactor-nice.pl: check this substitution // old: string outputFN; std::string outputFN; FILE *matlabPipe; int compute_prototypes ( const NICE::VVector & features, NICE::VVector & prototypes, std::vector & weights, const std::vector & assignment ); public: /** simple constructor */ KMeansMatlab( const NICE::Config *conf, int noClasses ); /** simple destructor */ virtual ~KMeansMatlab(); void cluster ( const NICE::VVector & features, NICE::VVector & prototypes, std::vector & weights, std::vector & assignment ); }; } // namespace #endif