⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 candidates.hh

📁 this will produce the dci program in the src/ directory, or in /path/to/your/installation/bin if y
💻 HH
字号:
// Copyright (C) 2003 salvatore orlando <salvatore.orlando@unive.it>//  // This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.// // This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// // You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.#ifndef __CANDIDATES_H#define __CANDIDATES_H#include <string>#include "direct_count.hh"#include "items.hh"#include "transaction.hh"#include "frequents.hh"template <class T> class cand_2_iter {public:  cand_2_iter(int m1)  {    sz = m1*(m1-1)/2;    buf = new T[sz];    bzero(buf, sz * sizeof(T));  }  ~cand_2_iter() {delete [] buf;}  inline void incr_cand_count(int i) {buf[i]++;}  inline int get_cand_count(int i) {return ((int) buf[i]);}  inline int get_sz() {return sz;}private:  T *buf;  int sz;  };template <class T, class T1>class DCP_candidates : public set_of_itemsets<T,T1>  {public:  DCP_candidates(int iter) : set_of_itemsets<T, T1>(iter) {}  inline int  get_num_candidates() {return num_itemsets;}  void        init_prefix_table(int m);  inline void subset_and_count_and_prune_local(dci_transaction<T>& t);  inline int  get_count(int ind) {return ((int) counters[ind]);}  void printf_candidates() {printf_itemsets();}private:  int         m1;  vector<int> buf;  int         sz;  inline void scan_candidates3(dci_transaction<T> &t, int t0, int t1,			       int start, int end);  inline void scan_candidates (dci_transaction<T> &t, int t0, int t1,			       int start, int end);}; template <class T, class T1>void gen_candidates(set_of_frequents<T,T1>& set_freq, 		    DCP_candidates<T,T1>& cand_set,		    dci_items& counters, 		    int iter, cand_2_iter<T1>& c);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -