7 template <
class DataType,
unsigned int Po
intDimension>
22 m_NumberPerClass.resize(m_NbClass);
39 VectorType
GetCentroid(
unsigned int i) {
return m_Centroids[i];}
46 double computeDistance(VectorType &vec1, VectorType &vec2);
48 MembershipType m_ClassesMembership;
49 DataHolderType m_Centroids;
50 DataHolderType m_InputData;
52 std::vector <unsigned int> m_NumberPerClass;
54 unsigned int m_NbClass, m_NbInputs;
55 unsigned int m_MaxIterations;
void SetVerbose(bool verb)
MembershipType & GetClassesMemberships()
unsigned int GetClassMembership(unsigned int i)
void InitializeClassesMemberships(MembershipType &classM)
std::vector< VectorType > DataHolderType
void SetInputData(DataHolderType &data)
std::vector< unsigned int > MembershipType
VectorType GetCentroid(unsigned int i)
void ResetClassesMemberships()
void SetMaxIterations(unsigned int mIt)
unsigned int GetNumberPerClass(unsigned int i)
void SetNumberOfClasses(unsigned int nbC)
void InitializeKMeansFromData()
bool endConditionReached(MembershipType &oldMemberships)