Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound 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 class SimFactory {
00020 public:
00021 static SimilarityMethod * makeSim(const Index &index,
00022                                   enum ClusterParam::simTypes simType = ClusterParam::COS) {
00023   switch (simType) {
00024   case ClusterParam::COS:
00025     return new CosSim(index);
00026   default:
00027     cerr << "Unknown similarity method " << simType << endl;
00028     return NULL;
00029   }
00030 }
00031 };
00032 #endif

Generated on Wed Nov 3 12:59:03 2004 for Lemur Toolkit by doxygen1.2.18