Turi Create  4.0
turi::pattern_mining::fp_tree_header Class Reference

#include <toolkits/pattern_mining/fp_tree_header.hpp>

Public Member Functions

size_t get_index (const size_t &id) const
 
std::vector< std::pair< size_t, size_t > > sort_transaction (const std::vector< size_t > &new_transaction) const
 
std::vector< size_t > get_ids ()
 
bool has_id (const size_t &id) const
 

Detailed Description

Header for fp_tree

Vars headings (vector of fp_tree_heading) index_map (map of id to index) - hash for searching headings by item id

Definition at line 50 of file fp_tree_header.hpp.

Member Function Documentation

◆ get_ids()

std::vector<size_t> turi::pattern_mining::fp_tree_header::get_ids ( )

Extract vectors and maps from headings

◆ get_index()

size_t turi::pattern_mining::fp_tree_header::get_index ( const size_t &  id) const

Get index of id in headings

◆ has_id()

bool turi::pattern_mining::fp_tree_header::has_id ( const size_t &  id) const

Extract headings for specific id

◆ sort_transaction()

std::vector<std::pair<size_t, size_t> > turi::pattern_mining::fp_tree_header::sort_transaction ( const std::vector< size_t > &  new_transaction) const

Sort a transaction by heading's order


The documentation for this class was generated from the following file: