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

SimpleNormalDecoder.hpp

Go to the documentation of this file.
00001 #ifndef SimpleNormalDecoder_HPP
00002 #define SimpleNormalDecoder_HPP
00003 
00008 #include <iterator>
00009 #include "io/codec/decoder/SimpleDecoderBase.hpp"  
00010 #include "io/output/normal/BufferedNormalOutput.hpp"  
00011 
00012 template <class O = BufferedNormalOutput<> >
00013 class SimpleNormalDecoder : public SimpleDecoderBase<O>
00014 {
00015    protected:
00016       typedef SimpleDecoderBase<O> PARENT;
00017 
00018    public:
00019       typedef typename SimpleDecoderBase<O>::params_t params_t;
00020       SimpleNormalDecoder(const params_t* par)
00021          : PARENT(par){}
00022 
00023       static bool DINLINE isDFO()
00024       {
00025          return false;
00026       }  
00027 
00028 
00029       template <typename InputIterator> void writeItemsetAndCounter(
00030          InputIterator first, InputIterator last, 
00031          counter_t support )
00032       {
00033          static std::vector<item_t> decoded_set;
00034          decoded_set.clear();
00035          while(first != last)
00036          {
00037             decoded_set.push_back(PARENT::code_inverse[*first]);
00038             ++first;
00039          }
00040          O::writeItemsetAndCounter( 
00041             decoded_set.begin(), decoded_set.end(), support );   
00042       }
00043 };
00044 
00045 #endif

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