Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

SortOutput.hpp

Go to the documentation of this file.
00001 #ifndef SortOutput_HPP
00002 #define SortOutput_HPP
00003 
00008 #include <algorithm>
00009 #include "io/output/normal/BufferedNormalOutput.hpp" 
00010 
00017 template <class O = BufferedNormalOutput<> >
00018 class SortOutput : public O
00019 {
00020    public:
00021 
00022       typedef typename O::params_t params_t;
00023 
00024       SortOutput(const params_t* par) : 
00025          O(par) {}
00026 
00027 
00028 
00029       template <typename InputIterator> void writeItemsetAndCounter(
00030          InputIterator first, InputIterator last, 
00031          counter_t support )
00032       {
00033          std::vector<item_t> sorted_itemset(first, last);
00034          std::sort(sorted_itemset.begin(), sorted_itemset.end());
00035          O::writeItemsetAndCounter(
00036             sorted_itemset.begin(), sorted_itemset.end(), support);
00037       }
00038 };
00039 
00040 #endif

Generated on Sun Sep 17 17:50:40 2006 for FIM environment by  doxygen 1.4.4