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

OutputBase< FR > Class Template Reference

#include <OutputBase.hpp>

Inheritance diagram for OutputBase< FR >:

Inheritance graph
[legend]
Collaboration diagram for OutputBase< FR >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef FR::params_t params_t

Public Member Functions

 OutputBase (const params_t *par)
template<typename InputIterator>
void writeItemsetAndCounter (InputIterator first, InputIterator last, counter_t support)
 Writes out one itemset and its counter.
void pushItem (item_t item)
 Push an item to the top of the stack.
void write (counter_t support)
 write the content of the stack together with a counter
void pushItemWithWrite (item_t item, counter_t support)
 Push an item to the top of the stack and write the content of it together with a counter.
void pushItemWithPrevSupport (item_t item)
 Push an item to the top of the stack and write the content of it together with the previously used counter.
void popItem ()
 Pop an item from the top of the stack.
void popAll ()
 remove all items form the stack

Static Public Member Functions

static bool DINLINE isDFO ()

Detailed Description

template<class FR = FDRepr>
class OutputBase< FR >

Definition at line 25 of file OutputBase.hpp.


Member Typedef Documentation

template<class FR = FDRepr>
typedef FR::params_t OutputBase< FR >::params_t
 

Reimplemented in CacheDecoderBase< FR >, SimpleBufferedDFDecoder< FR >, CacheNormalDecoder< FR >, SimpleAssocRuleWriter, bracz::NonOptDFOutput< FR >, NoOutput< ISDFO, FR >, BufferedNormalOutput< FR >, SimpleOutput, DecoderBase< BufferedOutput< FR > >, DecoderBase< BufferedNormalOutput< StreamRepr > >, SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >, and BufferedNormalOutput< StreamRepr >.

Definition at line 28 of file OutputBase.hpp.


Constructor & Destructor Documentation

template<class FR = FDRepr>
OutputBase< FR >::OutputBase const params_t par  )  [inline]
 

Definition at line 30 of file OutputBase.hpp.


Member Function Documentation

template<class FR = FDRepr>
static bool DINLINE OutputBase< FR >::isDFO  )  [inline, static]
 

Reimplemented in CacheDFDecoder< FR >, SimpleBufferedDFDecoder< FR >, CacheNormalDecoder< FR >, bracz::NonOptDFOutput< FR >, NoOutput< ISDFO, FR >, BufferedNormalOutput< FR >, SimpleOutput, SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >, and BufferedNormalOutput< StreamRepr >.

Definition at line 32 of file OutputBase.hpp.

template<class FR = FDRepr>
void OutputBase< FR >::popAll  )  [inline]
 

remove all items form the stack

Reimplemented in CacheDFDecoder< FR >, SimpleBufferedDFDecoder< FR >, bracz::NonOptDFOutput< FR >, and NoOutput< ISDFO, FR >.

Definition at line 92 of file OutputBase.hpp.

Referenced by NoOutput< ISDFO, FR >::popAll().

template<class FR = FDRepr>
void OutputBase< FR >::popItem  )  [inline]
 

Pop an item from the top of the stack.

Reimplemented in CacheDFDecoder< FR >, SimpleBufferedDFDecoder< FR >, bracz::NonOptDFOutput< FR >, NoOutput< ISDFO, FR >, and SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >.

Definition at line 87 of file OutputBase.hpp.

Referenced by NoOutput< ISDFO, FR >::popItem().

template<class FR = FDRepr>
void OutputBase< FR >::pushItem item_t  item  )  [inline]
 

Push an item to the top of the stack.

Reimplemented in CacheDFDecoder< FR >, SimpleBufferedDFDecoder< FR >, bracz::NonOptDFOutput< FR >, NoOutput< ISDFO, FR >, and SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >.

Definition at line 61 of file OutputBase.hpp.

Referenced by NoOutput< ISDFO, FR >::pushItem().

template<class FR = FDRepr>
void OutputBase< FR >::pushItemWithPrevSupport item_t  item  )  [inline]
 

Push an item to the top of the stack and write the content of it together with the previously used counter.

Reimplemented in CacheDFDecoder< FR >, SimpleBufferedDFDecoder< FR >, bracz::NonOptDFOutput< FR >, NoOutput< ISDFO, FR >, and SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >.

Definition at line 81 of file OutputBase.hpp.

Referenced by NoOutput< ISDFO, FR >::pushItemWithPrevSupport().

template<class FR = FDRepr>
void OutputBase< FR >::pushItemWithWrite item_t  item,
counter_t  support
[inline]
 

Push an item to the top of the stack and write the content of it together with a counter.

Reimplemented in CacheDFDecoder< FR >, SimpleBufferedDFDecoder< FR >, bracz::NonOptDFOutput< FR >, NoOutput< ISDFO, FR >, and SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >.

Definition at line 73 of file OutputBase.hpp.

Referenced by NoOutput< ISDFO, FR >::pushItemWithWrite().

template<class FR = FDRepr>
void OutputBase< FR >::write counter_t  support  )  [inline]
 

write the content of the stack together with a counter

Reimplemented in CacheDFDecoder< FR >, SimpleBufferedDFDecoder< FR >, bracz::NonOptDFOutput< FR >, NoOutput< ISDFO, FR >, and SimpleDFDecoder< BufferedNormalOutput< StreamRepr > >.

Definition at line 67 of file OutputBase.hpp.

Referenced by NoOutput< ISDFO, FR >::write().

template<class FR = FDRepr>
template<typename InputIterator>
void OutputBase< FR >::writeItemsetAndCounter InputIterator  first,
InputIterator  last,
counter_t  support
[inline]
 

Writes out one itemset and its counter.

Parameters:
first An input iterator.
last An input iterator.
support the support of the itemset
The elements of the itemset are in the range [first, last).

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 documentation for this class was generated from the following file:
Generated on Sun Sep 17 17:55:28 2006 for FIM environment by  doxygen 1.4.4