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

bracz::NonOptDFOutput< FR > Class Template Reference

A DF style output manager that does not write anything, only keeps the compiler from optimizing away output routines. More...

#include <NonOptDFOutput.hpp>

Inheritance diagram for bracz::NonOptDFOutput< FR >:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef OutputBase< FR
>::params_t 
params_t

Public Member Functions

 NonOptDFOutput (const params_t *par)
 ~NonOptDFOutput ()
void pushItem (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 ()
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 ()

Private Attributes

int dummysum
counter_t last_support

Detailed Description

template<class FR>
class bracz::NonOptDFOutput< FR >

A DF style output manager that does not write anything, only keeps the compiler from optimizing away output routines.

Definition at line 26 of file NonOptDFOutput.hpp.


Member Typedef Documentation

template<class FR>
typedef OutputBase<FR>::params_t bracz::NonOptDFOutput< FR >::params_t
 

Reimplemented from OutputBase< FR >.

Definition at line 30 of file NonOptDFOutput.hpp.


Constructor & Destructor Documentation

template<class FR>
bracz::NonOptDFOutput< FR >::NonOptDFOutput const params_t par  )  [inline]
 

Definition at line 31 of file NonOptDFOutput.hpp.

template<class FR>
bracz::NonOptDFOutput< FR >::~NonOptDFOutput  )  [inline]
 

Definition at line 35 of file NonOptDFOutput.hpp.

References bracz::NonOptDFOutput< FR >::dummysum.


Member Function Documentation

template<class FR>
static bool DINLINE bracz::NonOptDFOutput< FR >::isDFO  )  [inline, static]
 

Reimplemented from OutputBase< FR >.

Definition at line 39 of file NonOptDFOutput.hpp.

template<class FR>
void bracz::NonOptDFOutput< FR >::popAll  )  [inline]
 

Reimplemented from OutputBase< FR >.

Definition at line 71 of file NonOptDFOutput.hpp.

References bracz::NonOptDFOutput< FR >::dummysum.

template<class FR>
void bracz::NonOptDFOutput< FR >::popItem  )  [inline]
 

Reimplemented from OutputBase< FR >.

Definition at line 66 of file NonOptDFOutput.hpp.

References bracz::NonOptDFOutput< FR >::dummysum.

template<class FR>
void bracz::NonOptDFOutput< FR >::pushItem item_t  item  )  [inline]
 

Reimplemented from OutputBase< FR >.

Definition at line 44 of file NonOptDFOutput.hpp.

References bracz::NonOptDFOutput< FR >::dummysum.

Referenced by bracz::NonOptDFOutput< FR >::pushItemWithWrite().

template<class FR>
void bracz::NonOptDFOutput< FR >::pushItemWithPrevSupport item_t  item  )  [inline]
 

Reimplemented from OutputBase< FR >.

Definition at line 61 of file NonOptDFOutput.hpp.

References bracz::NonOptDFOutput< FR >::last_support, and bracz::NonOptDFOutput< FR >::pushItemWithWrite().

template<class FR>
void bracz::NonOptDFOutput< FR >::pushItemWithWrite item_t  item,
counter_t  support
[inline]
 

Reimplemented from OutputBase< FR >.

Definition at line 55 of file NonOptDFOutput.hpp.

References bracz::NonOptDFOutput< FR >::pushItem(), and bracz::NonOptDFOutput< FR >::write().

Referenced by bracz::NonOptDFOutput< FR >::pushItemWithPrevSupport().

template<class FR>
void bracz::NonOptDFOutput< FR >::write counter_t  support  )  [inline]
 

Reimplemented from OutputBase< FR >.

Definition at line 49 of file NonOptDFOutput.hpp.

References bracz::NonOptDFOutput< FR >::dummysum, and bracz::NonOptDFOutput< FR >::last_support.

Referenced by bracz::NonOptDFOutput< FR >::pushItemWithWrite().

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

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().


Member Data Documentation

template<class FR>
int bracz::NonOptDFOutput< FR >::dummysum [private]
 

Definition at line 76 of file NonOptDFOutput.hpp.

Referenced by bracz::NonOptDFOutput< FR >::popAll(), bracz::NonOptDFOutput< FR >::popItem(), bracz::NonOptDFOutput< FR >::pushItem(), bracz::NonOptDFOutput< FR >::write(), and bracz::NonOptDFOutput< FR >::~NonOptDFOutput().

template<class FR>
counter_t bracz::NonOptDFOutput< FR >::last_support [private]
 

Definition at line 77 of file NonOptDFOutput.hpp.

Referenced by bracz::NonOptDFOutput< FR >::pushItemWithPrevSupport(), and bracz::NonOptDFOutput< FR >::write().


The documentation for this class was generated from the following file:
Generated on Sun Sep 17 17:57:38 2006 for FIM environment by  doxygen 1.4.4