00001 /*========================================================================== 00002 * Copyright (c) 2002 University of Massachusetts. All Rights Reserved. 00003 * 00004 * Use of the Lemur Toolkit for Language Modeling and Information Retrieval 00005 * is subject to the terms of the software license set forth in the LICENSE 00006 * file included with this software, and also available at 00007 * http://www.lemurproject.org/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 // David Fisher 00013 // init: 11/18/2002 00014 // Agglomerative clustering algorithms. 00015 #ifndef _AGGLOMCLUSTER_HPP 00016 #define _AGGLOMCLUSTER_HPP 00017 #include "Cluster.hpp" 00018 00019 namespace lemur 00020 { 00022 namespace cluster 00023 { 00024 00026 class AgglomCluster: public Cluster 00027 { 00028 public: 00030 AgglomCluster(int cid, const lemur::api::Index &ind, 00031 const SimilarityMethod &sim, 00032 enum ClusterParam::docModes mode): Cluster(cid, ind, sim), 00033 docmode(mode) {} 00035 virtual ~AgglomCluster() {}; 00037 virtual double score(const ClusterRep *rep) const; 00041 virtual ClusterRep *getClusterRep() const; 00043 virtual double sum2() const; 00044 00045 private: 00047 enum ClusterParam::docModes docmode; 00049 double score_min(const ClusterRep *rep) const; 00051 double score_max(const ClusterRep *rep) const; 00053 double score_mean(const ClusterRep *rep) const; 00055 double score_ave(const ClusterRep *rep) const; 00056 }; 00057 } 00058 } 00059 00060 #endif