CEDRIC  Revision_backup-2009-02
AutomaticPAM.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 2008 Max Hermann
4  *
5  * This file is part of the "CEDRIC Event Display" application.
6  *
7  *****************************************************************************/
8 
9 #ifndef REDUKT_AUTOMATICPAM_H
10 #define REDUKT_AUTOMATICPAM_H
11 
12 #include "PAMClustering.h"
13 #include <vector>
14 
15 //#define AUTOMATIC_PAM_COMPUTEALL
16 
24 {
25 public:
27  ~AutomaticPAM();
28 
29  unsigned int cluster( unsigned int minK=2, unsigned int maxK=15 );
30 
31  PAMClustering* pam() { return m_pam; }
32 
33  void setThreshold( double val ) { m_threshold = val; }
34  void setMaxIterations( unsigned int val ) { m_maxIterations = val; }
35  double threshold() const { return m_threshold; }
36  unsigned int maxIterations() const { return m_maxIterations; }
37 
38 private:
39  // no copy nor assignment yet
40  AutomaticPAM( AutomaticPAM& other ): D(other.D) {}
41  AutomaticPAM& operator = ( AutomaticPAM& other ) { return *this; }
42 
44  unsigned int m_maxIterations;
45  double m_threshold;
46  PAMClustering* m_pam;
47 
48 #ifdef AUTOMATIC_PAM_COMPUTEALL
49  std::vector<PAMClustering*> m_pams;
50 #endif
51 };
52 
53 #endif
double threshold() const
Definition: AutomaticPAM.h:35
void setMaxIterations(unsigned int val)
Definition: AutomaticPAM.h:34
PAMClustering * pam()
Definition: AutomaticPAM.h:31
unsigned int cluster(unsigned int minK=2, unsigned int maxK=15)
Definition: AutomaticPAM.cpp:37
unsigned int maxIterations() const
Definition: AutomaticPAM.h:36
Definition: AutomaticPAM.h:23
AutomaticPAM(const PAMClustering::matrix_type &d)
Definition: AutomaticPAM.cpp:21
ublas::symmetric_matrix< double, ublas::lower > matrix_type
Definition: PAMClustering.h:31
~AutomaticPAM()
Definition: AutomaticPAM.cpp:26
void setThreshold(double val)
Definition: AutomaticPAM.h:33
Definition: PAMClustering.h:28