00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _SIMFACTORY_HPP
00015 #define _SIMFACTORY_HPP
00016
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