#include <SimpleBufferedDFDecoder.hpp>
Inheritance diagram for SimpleBufferedDFDecoder< FR >:
Public Types | |
typedef SimpleDecoderBase< BufferedOutput< FR > >::params_t | params_t |
Public Member Functions | |
SimpleBufferedDFDecoder (const params_t *par) | |
void | pushItem (const item_t item) |
void | write (counter_t support) |
void | pushItemWithWrite (item_t item, counter_t support) |
void | pushItemWithPrevSupport (item_t item) |
void | popItem () |
void | popAll () |
SimpleDecoderBase (const typename DecoderBase< BufferedOutput< FR > >::params_t *par) | |
void | setCodeInverse (const std::vector< item_t > &code_inverse) |
DecoderBase (const params_t *par) | |
template<typename InputIterator> | |
void | writeItemsetAndCounter (InputIterator first, InputIterator last, counter_t support) |
Writes out one itemset and its counter. | |
Static Public Member Functions | |
static bool DINLINE | isDFO () |
Protected Types | |
typedef SimpleDecoderBase< BufferedOutput< FR > > | PARENT |
Protected Attributes | |
std::vector< item_t > | code_inverse |
The inverse of code vector. | |
std::streamsize | buffer_size |
The size of the buffer. | |
char * | buffer |
The buffer. | |
Private Attributes | |
std::stack< std::streamsize > | positions |
counter_t | last_support |
Definition at line 14 of file SimpleBufferedDFDecoder.hpp.
|
Reimplemented from DecoderBase< BufferedOutput< FR > >. Definition at line 20 of file SimpleBufferedDFDecoder.hpp. |
|
Definition at line 18 of file SimpleBufferedDFDecoder.hpp. |
|
Definition at line 21 of file SimpleBufferedDFDecoder.hpp. References SimpleBufferedDFDecoder< FR >::positions. |
|
Definition at line 28 of file DecoderBase.hpp. |
|
Reimplemented from OutputBase< FR >. Definition at line 25 of file SimpleBufferedDFDecoder.hpp. |
|
Reimplemented from OutputBase< FR >. Definition at line 50 of file SimpleBufferedDFDecoder.hpp. References SimpleBufferedDFDecoder< FR >::positions. |
|
Reimplemented from OutputBase< FR >. Definition at line 45 of file SimpleBufferedDFDecoder.hpp. References SimpleBufferedDFDecoder< FR >::positions. |
|
Reimplemented from OutputBase< FR >. Definition at line 63 of file SimpleBufferedDFDecoder.hpp. References BufferedOutput< FR >::buffer, SimpleDecoderBase< BufferedOutput< FR > >::code_inverse, Formatter::IntToStringFront(), and SimpleBufferedDFDecoder< FR >::positions. Referenced by SimpleBufferedDFDecoder< FR >::pushItemWithWrite(). |
|
Reimplemented from OutputBase< FR >. Definition at line 40 of file SimpleBufferedDFDecoder.hpp. References SimpleBufferedDFDecoder< FR >::last_support, and SimpleBufferedDFDecoder< FR >::pushItemWithWrite(). |
|
Reimplemented from OutputBase< FR >. Definition at line 34 of file SimpleBufferedDFDecoder.hpp. References SimpleBufferedDFDecoder< FR >::pushItem(), and SimpleBufferedDFDecoder< FR >::write(). Referenced by SimpleBufferedDFDecoder< FR >::pushItemWithPrevSupport(). |
|
Reimplemented from DecoderBase< BufferedOutput< FR > >. Definition at line 26 of file SimpleDecoderBase.hpp. |
|
Definition at line 24 of file SimpleDecoderBase.hpp. |
|
Reimplemented from OutputBase< FR >. Definition at line 71 of file SimpleBufferedDFDecoder.hpp. References BufferedOutput< FR >::buffer, Formatter::IntToStringFront(), SimpleBufferedDFDecoder< FR >::last_support, and SimpleBufferedDFDecoder< FR >::positions. Referenced by SimpleBufferedDFDecoder< FR >::pushItemWithWrite(). |
|
Writes out one itemset and its counter.
Here you can see an example of the usage #include "common.hpp" #include "io/output/normal/SimpleOutput.hpp" #include "io/StreamRepr.hpp" #include "io/FILERepr.hpp" #include "io/output/OutputBase.hpp" #include "io/output/normal/BufferedNormalOutput.hpp" #include <set> #include <vector> using namespace std; int main() { typedef Bodon::SimpleOutput O_M; // typedef BufferedNormalOutput<FStreamOutput> O_M; // typedef BufferedNormalOutput<FILEOutput> O_M; O_M::params_t par; par.file_name = "output.txt"; O_M o_manager(&par); counter_t support = 19283; // itemset is stored in an array item_t itemset_array[] = {1, 4, 2, 8, 5, 7}; const int N = sizeof(itemset_array) / sizeof(item_t); o_manager.writeItemsetAndCounter( (item_t*) itemset_array, itemset_array + N, support); // itemset is stored in an vector vector<item_t> itemset_vector(itemset_array, itemset_array + N); o_manager.writeItemsetAndCounter( itemset_vector.begin(), itemset_vector.end(), support); // itemset is stored in an set set<item_t> itemset_set(itemset_array, itemset_array + N); o_manager.writeItemsetAndCounter( itemset_set.begin(), itemset_set.end(), support); return 1; } Reimplemented in CacheNormalDecoder< FR >, NoOutput< ISDFO, FR >, BufferedNormalOutput< FR >, SimpleOutput, and BufferedNormalOutput< StreamRepr >. Definition at line 51 of file OutputBase.hpp. Referenced by NoOutput< ISDFO, FR >::writeItemsetAndCounter(). |
|
|
The size of the buffer.
Definition at line 45 of file BufferedOutput.hpp. Referenced by BufferedOutput< StreamRepr >::BufferedOutput(), CacheDecoderBase< FR >::setCodeInverse(), CacheNormalDecoder< FR >::writeItemsetAndCounter(), and BufferedNormalOutput< StreamRepr >::writeItemsetAndCounter(). |
|
The inverse of code vector. code_inverse[i] stores the original code of the item, whose new code is i. Definition at line 39 of file SimpleDecoderBase.hpp. Referenced by SimpleBufferedDFDecoder< FR >::pushItem(). |
|
Definition at line 59 of file SimpleBufferedDFDecoder.hpp. Referenced by SimpleBufferedDFDecoder< FR >::pushItemWithPrevSupport(), and SimpleBufferedDFDecoder< FR >::write(). |
|