/** 
* @file HierarchicalCluster.h
* @brief Hierarchical Clustering wrapper
* @author Michael Koch
* @date 10/25/2010

*/
#ifndef HierarchicalClusterINCLUDE
#define HierarchicalClusterINCLUDE


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




namespace OBJREC {
/** Hierarchical Clustering */
class HierarchicalCluster : public ClusterAlgorithm
{

    protected:
	int noClasses;
	char method;
	int distanceType;
	int compute_prototypes ( const NICE::VVector & features,
					  NICE::VVector & prototypes,
					  std::vector<double> & weights,
					  const std::vector<int>    & assignment );
	char distanceFunction(int distanceType);
	void VVectorToDoubleArray(const NICE::VVector &data,double ** &doublearray,int ** &mask);
    public:
  
	/** simple constructor */
	HierarchicalCluster( int noClasses , char method='s',int distanceMode=0);
      
	/** simple destructor */
	virtual ~HierarchicalCluster();
     
	void cluster ( const NICE::VVector & features,
		       NICE::VVector & prototypes,
		       std::vector<double> & weights,
		       std::vector<int>    & assignment );

};


} // namespace

#endif
