00001 #ifndef PrefixArrayListDBCache_HPP 00002 #define PrefixArrayListDBCache_HPP 00003 00004 #include "common.hpp" 00005 #include "datastructures/PrefixArrayList.hpp" 00006 #include <vector> 00007 //#include <fstream> 00008 00009 template <class T_R, unsigned THRESHOLD = 100> 00010 class PrefixArrayListDBCache : public T_R, public PrefixArrayList<THRESHOLD> 00011 { 00012 public: 00013 typedef typename T_R::params_t params_t; 00014 PrefixArrayListDBCache( const params_t* par ) : 00015 T_R(par), PrefixArrayList<THRESHOLD>(par->largest_item) 00016 { 00017 std::vector<item_t> transaction; 00018 register counter_t multiplicity; 00019 T_R::rewind(); 00020 while( (multiplicity = T_R::nextTransactionBIS( 00021 transaction)) != 0 ) 00022 if(transaction.size() > 1) 00023 PrefixArrayList<THRESHOLD>::insert( 00024 transaction, multiplicity); 00025 } 00026 template <class BIS> counter_t nextTransactionBIS( 00027 BIS& transaction ){return 0;} 00028 00029 void rewind() 00030 { 00031 } 00032 00033 }; 00034 00035 #endif