GClasses

GClasses::GClusterer Class Reference

The base class for clustering algorithms. Classes that inherit from this class must implement a method named "cluster" which performs clustering, and a method named "whichCluster" which reports which cluster the specified row is determined to be a member of. More...

#include <GCluster.h>

Inheritance diagram for GClasses::GClusterer:
GClasses::GTransform GClasses::GAgglomerativeClusterer GClasses::GFuzzyKMeans GClasses::GKMeans GClasses::GKMedoids

List of all members.

Public Member Functions

 GClusterer (size_t nClusterCount)
virtual ~GClusterer ()
void setMetric (GDistanceMetric *pMetric, bool own)
 If own is true, then this object will delete pMetric when it is destroyed.
size_t clusterCount ()
 Return the number of clusters.
virtual GMatrixdoit (GMatrix &in)
 Clusters pIn and outputs a dataset with one column that specifies the cluster number for each row.
virtual void cluster (GMatrix *pData)=0
 Performs clustering.
virtual size_t whichCluster (size_t nVector)=0
 Reports which cluster the specified row is a member of.

Protected Attributes

size_t m_clusterCount
GDistanceMetricm_pMetric
bool m_ownMetric

Detailed Description

The base class for clustering algorithms. Classes that inherit from this class must implement a method named "cluster" which performs clustering, and a method named "whichCluster" which reports which cluster the specified row is determined to be a member of.


Constructor & Destructor Documentation

GClasses::GClusterer::GClusterer ( size_t  nClusterCount)
virtual GClasses::GClusterer::~GClusterer ( ) [virtual]

Member Function Documentation

virtual void GClasses::GClusterer::cluster ( GMatrix pData) [pure virtual]
size_t GClasses::GClusterer::clusterCount ( ) [inline]

Return the number of clusters.

virtual GMatrix* GClasses::GClusterer::doit ( GMatrix in) [inline, virtual]

Clusters pIn and outputs a dataset with one column that specifies the cluster number for each row.

Implements GClasses::GTransform.

void GClasses::GClusterer::setMetric ( GDistanceMetric pMetric,
bool  own 
)

If own is true, then this object will delete pMetric when it is destroyed.

virtual size_t GClasses::GClusterer::whichCluster ( size_t  nVector) [pure virtual]

Reports which cluster the specified row is a member of.

Implemented in GClasses::GAgglomerativeClusterer, GClasses::GKMeans, GClasses::GFuzzyKMeans, and GClasses::GKMedoids.


Member Data Documentation