fork download
  1. class Node
  2. {
  3. public:
  4. Node(const int &_item):item(_item){}
  5. Node(const vector<int> &_itemset):itemset(_itemset){}
  6. //private:
  7. int item;
  8. vector<int> itemset;
  9. map<int, shared_ptr<Node>, item_cmp> children;
  10. map<int, double, item_cmp> util_list;
  11. };
  12.  
  13. class AM_Tree
  14. {
  15. public:
  16. AM_Tree(const vector<int> &itemset){
  17. root = make_shared<Node>(itemset);
  18. }
  19. void insert(const map<int, double, item_cmp> &);
  20. void printIUTable()
  21. void printNode(const shared_ptr<Node> &ptr)
  22. void printHeaderTable()
  23. //private:
  24. map< vector<int>, IUPair, item_cmp> IUTable;
  25. map<int, list<shared_ptr<Node>>, item_cmp> HeaderTable;
  26. shared_ptr<Node> root;
  27. };
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty