90 likes | 247 Views
HTPR*-Tree Implementation. IIS Lab ( 이병기 교수님 ) 컴공 19981234 김승준. Contents. Entry class implementation Node class implementation Tree class implementation HTPRTree class implementation Reinsertion issue Memory issue To-do. class Entry { public: //--===on disk===-- int son;
E N D
HTPR*-Tree Implementation IIS Lab (이병기 교수님) 컴공 19981234 김승준
Contents • Entry class implementation • Node class implementation • Tree class implementation • HTPRTree class implementation • Reinsertion issue • Memory issue • To-do
class Entry { public: //--===on disk===-- int son; float *bounces; float *velocity; unsigned char t_start; unsigned char t_end; //--===others===-- int time_ref; int dimension; int level; RTree *my_tree; RTNode *son_ptr; //--===functions===-- … member variables son => file block position of content bounces => MBR of entry velocity => VBR of entry t_start, t_end => relative timestamp time_ref => timestamp (when input) dimension => entry dimension level => tree level of entry my_tree => own tree pointer son_ptr => content node pointer Entry class implementation
class RTNode { public: //--===on disk===-- char level; int block; int num_entries; Entry *entries; //--===others===-- bool dirty; int capacity; int dimension; RTree *my_tree; //--===functions===-- … member variables level => tree level of node (it is ‘on-disk’ variable. So it’s type is char) block => file block position of this node num_entries => number of entries in this node entries => entry list of this node dirty => dirty bit (when delete from memory, use it to decide whether store or not) capacity => node capacity (normally decide from block size) Node class implementation
class RTree : public Cacheable { public: //--===on disk===-- int dimension; int num_of_data; int num_of_dnodes; int num_of_inodes; int root; bool root_is_data; int time_ref; //--===others===-- RTNode *root_ptr; bool *re_level; LinList *re_data_cands; //--===functions===-- … member variables root => file block position of root root_is_data => if root is data, use this flag time_ref => tree initial time reference root_ptr => pointer of root node re_level => re-insertion flag list re_data_cands => re-insertion candidate list Tree class implementation
class HTPRTree : public Cacheable { public: //--===on disk===-- int dimension; int num_of_data; int num_of_root; //--===others===-- LinkedList *root_list; //--===functions===-- … member variables num_of_root => number of root in whole tree root_list => root list of whole tree HTPRTree class implementation
Reinsertion issue • TPR* tree manage re-insertion list when overflow while inserting entry • HTPR* tree must duplicate entry when re-insert it. • Then how?
Memory issue • Memory has limitation. We must use as small as we can. • How can we make node size smaller?
To-Do • Fix algorithm • Implementation query function • Use smaller memory • Prepare data set, and query • Test and Debugging