#include <ClusterDB.hpp>
Inheritance diagram for ClusterDB:

Public Methods | |
| ClusterDB (const Index *ind, double threshold=0.25, enum ClusterParam::simTypes simType=ClusterParam::COS, enum ClusterParam::clusterTypes clusterType=ClusterParam::CENTROID, enum ClusterParam::docModes docMode=ClusterParam::DMAX) | |
| initialize the cluster method | |
| virtual | ~ClusterDB () |
| clean up | |
| virtual int | countClusters () const=0 |
| Return number of clusters. | |
| virtual int | maxID () const=0 |
| Return highest cluster ID. | |
| virtual vector< Cluster * > | getDocCluster (int docId) const=0 |
| Get the Cluster for the given docId. | |
| virtual Cluster * | getCluster (int clusterId) const=0 |
| Get the Cluster for the given clusterId. | |
| virtual vector< int > | getDocClusterId (int docId) const=0 |
| Get the Cluster id for the given docId. | |
| virtual int | addToCluster (int docId, int clusterId, double score)=0 |
| Add a document id to a cluster, given the cluster id. | |
| virtual int | addToCluster (int docId, Cluster *cluster, double score)=0 |
| Add a document id to a cluster, given the cluster. | |
| virtual int | removeFromCluster (int docId, int clusterID)=0 |
| Remove a document id from a cluster, given the cluster id. | |
| virtual int | deleteCluster (int clusterID)=0 |
| Delete a cluster entirely. | |
| virtual int | deleteCluster (Cluster *target)=0 |
| Delete a cluster entirely. | |
| virtual vector< int > | splitCluster (int cid, int num=2)=0 |
| split cluster using Cluster::split | |
| virtual int | mergeClusters (int cid1, int cid2)=0 |
| merge two clusters. | |
| virtual void | printClusters () const |
| pretty print all clusters to the standard output. | |
| virtual int | cluster (int docId) |
| Assign a document to a cluster. | |
| virtual int | cluster (int docId, double &finalScore) |
| Assign a document to a cluster, returning score. | |
| virtual string | getKeyWords (int cid, int numTerms=10) const |
| Get the top N keywords for a cluster. | |
Protected Methods | |
| virtual Cluster * | newCluster ()=0 |
| subclass specific cluster intitialization. | |
| Cluster * | allocateCluster (int clusterID) const |
| Uses ClusterFactory to create Cluster objects. | |
Protected Attributes | |
| const Index * | index |
| Database containing the collection to operate on. | |
| int | numDocs |
| Number of documents in the database, reduces calls to db->docCount(). | |
| int | numTerms |
| Number of terms in the database. | |
| double | threshold |
| threshold for YES/NO decisions | |
| vector< Cluster * > | clusters |
| the cluster database. | |
| const SimilarityMethod * | sim |
| Similarity method to use. | |
| ClusterFactory * | factory |
| Cluster factory. | |
| ThresholdFcn * | thresh |
| Threshold function for adaptive thresholding. | |
|
||||||||||||||||||||||||
|
initialize the cluster method
|
|
|
clean up
|
|
||||||||||||||||
|
Add a document id to a cluster, given the cluster.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
||||||||||||||||
|
Add a document id to a cluster, given the cluster id.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
Uses ClusterFactory to create Cluster objects.
|
|
||||||||||||
|
Assign a document to a cluster, returning score.
|
|
|
Assign a document to a cluster.
|
|
|
Return number of clusters.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
Delete a cluster entirely.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
Delete a cluster entirely.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
Get the Cluster for the given clusterId.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
Get the Cluster for the given docId.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
Get the Cluster id for the given docId.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
||||||||||||
|
Get the top N keywords for a cluster.
|
|
|
Return highest cluster ID.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
||||||||||||
|
merge two clusters.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
subclass specific cluster intitialization.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
pretty print all clusters to the standard output.
|
|
||||||||||||
|
Remove a document id from a cluster, given the cluster id.
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
||||||||||||
|
split cluster using Cluster::split
Implemented in FlatFileClusterDB, and KeyfileClusterDB. |
|
|
the cluster database.
|
|
|
Cluster factory.
|
|
|
Database containing the collection to operate on.
|
|
|
Number of documents in the database, reduces calls to db->docCount().
|
|
|
Number of terms in the database.
|
|
|
Similarity method to use.
|
|
|
Threshold function for adaptive thresholding.
|
|
|
threshold for YES/NO decisions
|
1.2.18