/* $Id: listmerger.h 4025 2008-10-01 00:01:14Z abehm $ Copyright (C) 2007 by The Regents of the University of California Redistribution of this file is permitted under the terms of the BSD license Author: Chen Li, Jiaheng Lu, and Yiming Lu, Alexander Behm Date: 05/11/2007 */ #ifndef _listsmerger_h_ #define _listsmerger_h_ #include #include "util/array.h" #include "counttable.h" #include "utilities.h" using namespace std; enum DataSet {URL, DBLP, IMDB, Google}; template class ListsMerger { protected: bool hasDuplicateLists; public: ListsMerger(bool hasDuplicateLists = false){ this->hasDuplicateLists = hasDuplicateLists; } // the lists are assumed to be sorted in an ascending order void merge(vector &arrays, const unsigned threshold, // threshold of count vector &results) { static_cast(this)->merge_Impl(arrays, threshold, results); } ~ListsMerger() {}; }; #endif