/** 
* @file ClusterOnline.h
* @brief interface for online clustering
* @author Erik Rodner
* @date 02/13/2008

*/
#ifndef CLUSTERONLINEINCLUDE
#define CLUSTERONLINEINCLUDE

#include "core/vector/VectorT.h"
#include "core/vector/MatrixT.h"
 
#include <vector>
#include <string>

#include "core/vector/VVector.h"

#include "ClusterAlgorithm.h"


namespace OBJREC {

/** interface for online clustering */
class ClusterOnline : public ClusterAlgorithm
{

    protected:


    public:
	NICE::VVector clusters;
	std::vector<double> weights;

  
	/** simple constructor */
	ClusterOnline();
      
	/** simple destructor */
	virtual ~ClusterOnline();

	/** interface to offline cluster algorithms */
	void cluster ( 
		       const NICE::VVector & features,
		       NICE::VVector & prototypes,
		       std::vector<double> & weights,
		       std::vector<int>    & assignment );

	/** important virtual function: update clusters in current step 
	    @param x current vector
	    @return returns index of nearest cluster
	*/
	virtual int updateClusters ( const NICE::Vector & x ) = 0;

	/** init stuff */
	virtual void init ();


};


} // namespace

#endif
