Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SimFactory.hpp

Go to the documentation of this file.
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: 02/05/2003
00014 #ifndef _SIMFACTORY_HPP
00015 #define _SIMFACTORY_HPP
00016 // Add new similarity methods here.
00017 #include "CosSim.hpp"
00018 #include "ClusterParam.hpp"
00019 namespace lemur 
00020 {
00021   namespace cluster
00022   {
00024     class SimFactory {
00025     public:
00026       static SimilarityMethod * makeSim(const lemur::api::Index &index,
00027                                         enum ClusterParam::simTypes simType = ClusterParam::COS) {
00028         switch (simType) {
00029         case ClusterParam::COS:
00030           return new CosSim(index);
00031         default:
00032           cerr << "Unknown similarity method " << simType << endl;
00033           return NULL;
00034         }
00035       }
00036     };
00037   }
00038 }
00039 
00040 #endif

Generated on Tue Jun 15 11:02:55 2010 for Lemur by doxygen 1.3.4