GClasses
GClasses::GSparseClusterer Class Referenceabstract

Detailed Description

This is a base class for clustering algorithms that operate on sparse matrices.

#include <GCluster.h>

Inheritance diagram for GClasses::GSparseClusterer:
GClasses::GKMeansSparse GClasses::GKMedoidsSparse

Public Member Functions

 GSparseClusterer (size_t clusterCount)
 
virtual ~GSparseClusterer ()
 
virtual void cluster (GSparseMatrix *pData)=0
 Perform clustering. More...
 
size_t clusterCount ()
 Return the number of clusters. More...
 
void setMetric (GSparseSimilarity *pMetric, bool own)
 If own is true, then this takes ownership of pMetric. More...
 
virtual size_t whichCluster (size_t nVector)=0
 Report which cluster the specified row is a member of. More...
 

Protected Attributes

size_t m_clusterCount
 
bool m_ownMetric
 
GSparseSimilaritym_pMetric
 

Constructor & Destructor Documentation

GClasses::GSparseClusterer::GSparseClusterer ( size_t  clusterCount)
virtual GClasses::GSparseClusterer::~GSparseClusterer ( )
virtual

Member Function Documentation

virtual void GClasses::GSparseClusterer::cluster ( GSparseMatrix pData)
pure virtual

Perform clustering.

Implemented in GClasses::GKMeansSparse, and GClasses::GKMedoidsSparse.

size_t GClasses::GSparseClusterer::clusterCount ( )
inline

Return the number of clusters.

void GClasses::GSparseClusterer::setMetric ( GSparseSimilarity pMetric,
bool  own 
)

If own is true, then this takes ownership of pMetric.

virtual size_t GClasses::GSparseClusterer::whichCluster ( size_t  nVector)
pure virtual

Report which cluster the specified row is a member of.

Implemented in GClasses::GKMeansSparse, and GClasses::GKMedoidsSparse.

Member Data Documentation

size_t GClasses::GSparseClusterer::m_clusterCount
protected
bool GClasses::GSparseClusterer::m_ownMetric
protected
GSparseSimilarity* GClasses::GSparseClusterer::m_pMetric
protected