#include <KeyfileClusterDB.hpp>
Inheritance diagram for lemur::cluster::KeyfileClusterDB:
Public Member Functions | |
KeyfileClusterDB (const lemur::api::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 | ~KeyfileClusterDB () |
clean up | |
virtual vector< Cluster * > | getDocCluster (lemur::api::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 (lemur::api::DOCID_T docId) const |
Get the Cluster id for the given docId. | |
virtual int | addToCluster (lemur::api::DOCID_T docId, int clusterId, double score) |
Add a document id to a cluster, given the cluster id. | |
virtual int | addToCluster (lemur::api::DOCID_T docId, Cluster *cluster, double score) |
Add a document id to a cluster, given the cluster. | |
virtual int | removeFromCluster (lemur::api::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 Member Functions | |
virtual Cluster * | newCluster () |
Factory method for creating Cluster objects. | |
Private Member Functions | |
void | init (const string &name) |
void | addC2D (int cid, const vector< lemur::api::DOCID_T > &dids) |
Private Attributes | |
lemur::file::Keyfile | doc2cluster |
the document id to cluster table. | |
lemur::file::Keyfile | clustersKey |
|
initialize
|
|
clean up
|
|
|
|
Add a document id to a cluster, given the cluster.
Implements lemur::api::ClusterDB. |
|
Add a document id to a cluster, given the cluster id.
Implements lemur::api::ClusterDB. |
|
Count number of clusters.
Implements lemur::api::ClusterDB. |
|
Delete a cluster entirely.
Implements lemur::api::ClusterDB. |
|
Delete a cluster entirely.
Implements lemur::api::ClusterDB. |
|
Get the Cluster for the given clusterId.
Implements lemur::api::ClusterDB. |
|
Get the Cluster for the given docId.
Implements lemur::api::ClusterDB. |
|
Get the Cluster id for the given docId.
Implements lemur::api::ClusterDB. |
|
|
|
Return highest cluster ID.
Implements lemur::api::ClusterDB. |
|
merge two clusters.
Implements lemur::api::ClusterDB. |
|
Factory method for creating Cluster objects.
Implements lemur::api::ClusterDB. |
|
Remove a document id from a cluster, given the cluster id.
Implements lemur::api::ClusterDB. |
|
split cluster -- using Cluster::split.
Implements lemur::api::ClusterDB. |
|
|
|
the document id to cluster table.
|