Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

FlatFileClusterDB Class Reference

#include <FlatFileClusterDB.hpp>

Inheritance diagram for FlatFileClusterDB:

ClusterDB List of all members.

Public Methods

 FlatFileClusterDB (const Index *ind, const string &name, double threshold=0.25, enum ClusterParam::simTypes simType=ClusterParam::COS, enum ClusterParam::clusterTypes clusterType=ClusterParam::CENTROID, enum ClusterParam::docModes docMode=ClusterParam::DMAX)
 initialize

virtual ~FlatFileClusterDB ()
 clean up

virtual vector< Cluster * > getDocCluster (DOCID_T docId) const
 Get the Cluster for the given docId.

virtual int countClusters () const
 Count number of clusters.

virtual int maxID () const
 Return highest cluster ID.

virtual Cluster * getCluster (int clusterId) const
 Get the Cluster for the given clusterId.

virtual vector< int > getDocClusterId (DOCID_T docId) const
 Get the Cluster id for the given docId.

virtual int addToCluster (DOCID_T docId, int clusterId, double score)
 Add a document id to a cluster, given the cluster id.

virtual int addToCluster (DOCID_T docId, Cluster *cluster, double score)
 Add a document id to a cluster, given the cluster.

virtual int removeFromCluster (DOCID_T docId, int clusterID)
 Remove a document id from a cluster, given the cluster id.

virtual int deleteCluster (int clusterID)
 Delete a cluster entirely.

virtual int deleteCluster (Cluster *cluster)
 Delete a cluster entirely.

virtual vector< int > splitCluster (int cid, int num=2)
 split cluster -- using Cluster::split.

virtual int mergeClusters (int cid1, int cid2)
 merge two clusters.


Protected Methods

virtual Cluster * newCluster ()
 Factory method for creating Cluster objects.


Detailed Description

Writes one file, name.cl, the cluster database.


Constructor & Destructor Documentation

FlatFileClusterDB::FlatFileClusterDB (  const Index *    ind,
const string &    name,
double    threshold = 0.25,
enum ClusterParam::simTypes    simType = ClusterParam::COS,
enum ClusterParam::clusterTypes    clusterType = ClusterParam::CENTROID,
enum ClusterParam::docModes    docMode = ClusterParam::DMAX
) 
 

initialize

FlatFileClusterDB::~FlatFileClusterDB (    )  [virtual]
 

clean up


Member Function Documentation

int FlatFileClusterDB::addToCluster (  DOCID_T    docId,
Cluster *    cluster,
double    score
)  [virtual]
 

Add a document id to a cluster, given the cluster.

Implements ClusterDB.

int FlatFileClusterDB::addToCluster (  DOCID_T    docId,
int    clusterId,
double    score
)  [virtual]
 

Add a document id to a cluster, given the cluster id.

Implements ClusterDB.

virtual int FlatFileClusterDB::countClusters (    )  const [inline, virtual]
 

Count number of clusters.

Implements ClusterDB.

int FlatFileClusterDB::deleteCluster (  Cluster *    cluster )  [virtual]
 

Delete a cluster entirely.

Implements ClusterDB.

int FlatFileClusterDB::deleteCluster (  int    clusterID )  [virtual]
 

Delete a cluster entirely.

Implements ClusterDB.

Cluster * FlatFileClusterDB::getCluster (  int    clusterId )  const [virtual]
 

Get the Cluster for the given clusterId.

Implements ClusterDB.

vector< Cluster * > FlatFileClusterDB::getDocCluster (  DOCID_T    docId )  const [virtual]
 

Get the Cluster for the given docId.

Implements ClusterDB.

vector< int > FlatFileClusterDB::getDocClusterId (  DOCID_T    docId )  const [virtual]
 

Get the Cluster id for the given docId.

Implements ClusterDB.

virtual int FlatFileClusterDB::maxID (    )  const [inline, virtual]
 

Return highest cluster ID.

Implements ClusterDB.

int FlatFileClusterDB::mergeClusters (  int    cid1,
int    cid2
)  [virtual]
 

merge two clusters.

Implements ClusterDB.

Cluster * FlatFileClusterDB::newCluster (    )  [protected, virtual]
 

Factory method for creating Cluster objects.

Implements ClusterDB.

int FlatFileClusterDB::removeFromCluster (  DOCID_T    docId,
int    clusterID
)  [virtual]
 

Remove a document id from a cluster, given the cluster id.

Implements ClusterDB.

vector< int > FlatFileClusterDB::splitCluster (  int    cid,
int    num = 2
)  [virtual]
 

split cluster -- using Cluster::split.

Implements ClusterDB.


The documentation for this class was generated from the following files:
Generated on Wed Nov 3 12:59:33 2004 for Lemur Toolkit by doxygen1.2.18