#include <StatOutput.hpp>
Collaboration diagram for LStatOutput< OUTPUT >:
Public Member Functions | |
LStatOutput (OUTPUT &out, item_t numfreq) throw (std::ios_base::failure) | |
It opens the output file. | |
template<class InputIterator> | |
void DINLINE | writeItemsetAndCounter (InputIterator first, InputIterator last, const counter_t support) |
Writes out one itemset and its counter. | |
void | flush () |
~LStatOutput () | |
It closes the output file. | |
Private Attributes | |
OUTPUT & | out |
size_t | totlen |
size_t | totsup |
, it just collects the length of itemsets
Definition at line 132 of file StatOutput.hpp.
|
It opens the output file.
Definition at line 144 of file StatOutput.hpp. |
|
It closes the output file.
Definition at line 172 of file StatOutput.hpp. References LStatOutput< OUTPUT >::totlen, and LStatOutput< OUTPUT >::totsup. |
|
Definition at line 167 of file StatOutput.hpp. References LStatOutput< OUTPUT >::out. |
|
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; } Definition at line 159 of file StatOutput.hpp. References LStatOutput< OUTPUT >::out, LStatOutput< OUTPUT >::totlen, and LStatOutput< OUTPUT >::totsup. |
|
Definition at line 134 of file StatOutput.hpp. Referenced by LStatOutput< OUTPUT >::flush(), and LStatOutput< OUTPUT >::writeItemsetAndCounter(). |
|
Definition at line 135 of file StatOutput.hpp. Referenced by LStatOutput< OUTPUT >::writeItemsetAndCounter(), and LStatOutput< OUTPUT >::~LStatOutput(). |
|
Definition at line 136 of file StatOutput.hpp. Referenced by LStatOutput< OUTPUT >::writeItemsetAndCounter(), and LStatOutput< OUTPUT >::~LStatOutput(). |