00001 /*========================================================================== 00002 * Copyright (c) 2001 Carnegie Mellon University. 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 #ifndef _DISTMERGEMETHOD_HPP 00013 #define _DISTMERGEMETHOD_HPP 00014 00023 #include "Param.hpp" 00024 00025 #define CORI_MERGE 0 00026 #define SINGLETYPEREGR_MERGE 1 00027 #define MULTITYPEREGR_MERGE 2 00028 00029 namespace DistMergeMethodParameter { 00030 00032 00033 static int mergeMethod; 00035 00036 static void get() { 00037 mergeMethod=ParamGetInt("mergeMethod",0); 00038 } 00039 }; 00040 00041 00042 #include "common_headers.hpp" 00043 #include "IndexedReal.hpp" 00044 #include "DocScore.hpp" 00045 00046 class DistMergeMethod { 00047 public: 00048 virtual ~DistMergeMethod() {}; 00049 00051 virtual void mergeScoreSet(const IndexedRealVector &indexset, 00052 const DocScoreVector* const* scoreset, 00053 DocScoreVector &results); 00054 00055 protected: 00057 virtual double score(double dbscore, double docscore) const =0; 00058 }; 00059 00060 #endif