#include <CacheDFDecoder.hpp>
Inheritance diagram for CacheDFDecoder< FR >:
Public Types | |
typedef DecoderBase< BufferedOutput< FR > >::params_t | params_t |
Public Member Functions | |
CacheDFDecoder (const params_t *par) | |
~CacheDFDecoder () | |
void | pushItem (const item_t item) |
void | write (counter_t support) |
void | writeNEE (counter_t support, const std::vector< item_t > &nee_items) |
This adds and writes out all subsets of an itemset to the itemset stored in the stack. | |
void | pushItemWithWrite (const item_t item, counter_t support) |
void | pushItemWithPrevSupport (const item_t item) |
void | popItem () |
void | popAll () |
std::string | getCurrentPatternAsString () |
void | hint (std::string hint) |
Outputs a given string directly to the pattern file. Useful for debugging. | |
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 Attributes | |
std::vector< std::pair< char *, unsigned int > > | 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 |
char * | support_buffer |
The buffer for the string representation of the support. | |
std::streamsize | support_buffer_size |
The size of the support_buffer. | |
size_t | support_length |
The length of the representation of the support. | |
Classes | |
class | params_t |
Definition at line 18 of file CacheDFDecoder.hpp.
|
Reimplemented from DecoderBase< BufferedOutput< FR > >. Reimplemented in CacheNormalDecoder< FR >. Definition at line 25 of file CacheDecoderBase.hpp. |
|
Definition at line 32 of file CacheDFDecoder.hpp. References CacheDFDecoder< FR >::positions, CacheDFDecoder< FR >::support_buffer, and CacheDFDecoder< FR >::support_buffer_size. |
|
Definition at line 39 of file CacheDFDecoder.hpp. References CacheDFDecoder< FR >::support_buffer. |
|
Definition at line 28 of file DecoderBase.hpp. |
|
Definition at line 86 of file CacheDFDecoder.hpp. References CacheDFDecoder< FR >::positions. |
|
Outputs a given string directly to the pattern file. Useful for debugging.
Definition at line 92 of file CacheDFDecoder.hpp. |
|
Reimplemented from OutputBase< FR >. Definition at line 44 of file CacheDFDecoder.hpp. |
|
Reimplemented from OutputBase< FR >. Definition at line 79 of file CacheDFDecoder.hpp. References CacheDFDecoder< FR >::positions. |
|
Reimplemented from OutputBase< FR >. Definition at line 74 of file CacheDFDecoder.hpp. References CacheDFDecoder< FR >::positions. Referenced by CacheDFDecoder< FR >::writeNEE(). |
|
Reimplemented from OutputBase< FR >. Definition at line 111 of file CacheDFDecoder.hpp. References BufferedOutput< FR >::buffer, CacheDecoderBase< FR >::code_inverse, and CacheDFDecoder< FR >::positions. Referenced by CacheDFDecoder< FR >::pushItemWithPrevSupport(), CacheDFDecoder< FR >::pushItemWithWrite(), and CacheDFDecoder< FR >::writeNEE(). |
|
Reimplemented from OutputBase< FR >. Definition at line 169 of file CacheDFDecoder.hpp. References BufferedOutput< FR >::buffer, CacheDFDecoder< FR >::positions, CacheDFDecoder< FR >::pushItem(), CacheDFDecoder< FR >::support_buffer, CacheDFDecoder< FR >::support_buffer_size, and CacheDFDecoder< FR >::support_length. |
|
Reimplemented from OutputBase< FR >. Definition at line 68 of file CacheDFDecoder.hpp. References CacheDFDecoder< FR >::pushItem(), and CacheDFDecoder< FR >::write(). |
|
Reimplemented from DecoderBase< BufferedOutput< FR > >. Definition at line 37 of file CacheDecoderBase.hpp. References BufferedOutput< FR >::buffer_size, and Formatter::IntToStringBack(). |
|
Reimplemented from OutputBase< FR >. Definition at line 123 of file CacheDFDecoder.hpp. References BufferedOutput< FR >::buffer, Formatter::IntToStringBack(), CacheDFDecoder< FR >::positions, CacheDFDecoder< FR >::support_buffer, CacheDFDecoder< FR >::support_buffer_size, and CacheDFDecoder< FR >::support_length. Referenced by CacheDFDecoder< FR >::pushItemWithWrite(), and CacheDFDecoder< FR >::writeNEE(). |
|
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(). |
|
This adds and writes out all subsets of an itemset to the itemset stored in the stack. This method is useful when the equisupport pruning technique (not generating any extension of an itemset that has the same support as its prefix) is used.
Definition at line 139 of file CacheDFDecoder.hpp. References CacheDFDecoder< FR >::popItem(), CacheDFDecoder< FR >::pushItem(), and CacheDFDecoder< FR >::write(). |
|
|
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 string representation of that item whose new code is i. Definition at line 63 of file CacheDecoderBase.hpp. Referenced by CacheDFDecoder< FR >::pushItem(), CacheNormalDecoder< FR >::writeItemsetAndCounter(), and CacheDecoderBase< FR >::~CacheDecoderBase(). |
|
|
The buffer for the string representation of the support.
Definition at line 101 of file CacheDFDecoder.hpp. Referenced by CacheDFDecoder< FR >::CacheDFDecoder(), CacheDFDecoder< FR >::pushItemWithPrevSupport(), CacheDFDecoder< FR >::write(), and CacheDFDecoder< FR >::~CacheDFDecoder(). |
|
The size of the support_buffer.
Definition at line 104 of file CacheDFDecoder.hpp. Referenced by CacheDFDecoder< FR >::CacheDFDecoder(), CacheDFDecoder< FR >::pushItemWithPrevSupport(), and CacheDFDecoder< FR >::write(). |
|
The length of the representation of the support.
Definition at line 107 of file CacheDFDecoder.hpp. Referenced by CacheDFDecoder< FR >::pushItemWithPrevSupport(), and CacheDFDecoder< FR >::write(). |