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

Trie.hpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           Trie.hpp  -  description
00003                              -------------------
00004     begin                : cs dec 26 2002
00005     copyright            : (C) 2002 by Ferenc Bodon
00006     email                : bodon@cs.bme.hu
00007  ***************************************************************************/
00008 
00009 #ifndef Trie_HPP
00010 #define Trie_HPP
00011 
00016 #include "common.hpp"
00017 #include <vector>
00018 #include <set>
00019 
00020 using namespace std;
00021 
00022 class Apriori_Trie;
00023 class Trie;
00024 
00029 struct Edge
00030 {
00031    itemtype label;
00032    Trie* subtrie;
00033 };
00034 
00045 class Trie
00046 {
00047 friend class Apriori_Trie;
00048 
00049 public:
00053    Trie( const countertype init_counter ):counter(init_counter){}
00054 
00056    const Trie* is_included( const set<itemtype>& an_itemset, 
00057                             set<itemtype>::const_iterator item_it ) const;
00058 
00061    void find_candidate( vector<itemtype>::const_iterator it_basket_upper_bound,
00062                            vector<itemtype>::const_iterator it_basket, 
00063                         const countertype counter_incr );
00064 
00066    void delete_infrequent( const double min_occurrence );
00067 
00068    ~Trie();
00069 
00070 private:
00071 
00073    void add_empty_state( const itemtype item, 
00074                          const countertype init_counter=0 );
00075 
00076 public:
00077    // No public members
00078 
00079 private:
00080 
00082    countertype counter;
00083 
00088    vector<Edge> edgevector;
00089    
00090 };
00091 
00092 
00093 #endif

Generated on Fri Mar 11 14:48:06 2005 for APRIORI algorithm by  doxygen 1.3.9.1