6 #ifndef TURI_FP_TREE_HEADER_H 7 #define TURI_FP_TREE_HEADER_H 17 #include <core/data/sframe/gl_sframe.hpp> 18 #include <core/data/sframe/gl_sarray.hpp> 20 #include <toolkits/feature_engineering/topk_indexer.hpp> 21 #include <toolkits/feature_engineering/statistics_tracker.hpp> 23 #include <toolkits/pattern_mining/fp_node.hpp> 26 namespace pattern_mining {
52 std::vector<fp_tree_heading> headings;
53 std::map<size_t, size_t> id_index_map;
58 const std::vector<size_t>& supports);
64 size_t get_index(
const size_t&
id)
const;
65 inline const size_t size()
const {
return headings.size();};
70 std::vector<std::pair<size_t, size_t>> sort_transaction( \
71 const std::vector<size_t>& new_transaction)
const;
76 std::vector<size_t> get_ids();
77 std::vector<size_t> get_supports();
78 std::map<size_t, fp_node*> get_pointers();
83 bool has_id(
const size_t&
id)
const;
90 std::ostream& operator<<(std::ostream& out,
const fp_tree_header& header);