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

📄 qtree.h

📁 在n维空间(每维范围为0-1)内对插入的数值根据坐标进行分区。从一个没有分区的空间开始插入
💻 H
字号:
#ifndef _QTREE_H
#define _QTREE_H

#include <string>
#include <iostream>
#include <cmath>

#include "Cache.h"
#include "BFile.h"
#include "generaldef.h"
#include "utility.h"

class CacheBlock;


class qtree_node {
     public:
             float coor_upper[DIMENSION];      //range coordinates
             float coor_lower[DIMENSION];

             
             int level;  // level=0 is root
			 bool enable_split;
             bool is_leaf;
             int num_pts;
             CacheBlock* ptr_to_cache;
//             static Cache cache_memory;
             string node_id; //initically "", append "00" for child_0, "01" for child_1...etc.
                             // node_id and block_id refer to the same thing
             qtree_node* child[2*DIMENSION];
                                 // 1(01) 3(11) 
                                 // 0(00) 2(10)    read y-axis first
      
             qtree_node (int lv);
             ~qtree_node ();
             void split ();
             bool insert_one_data (Entry* data);
             void move_data(CacheBlock* dest, int child_i);
			 int move_data_m2f(int child_i);
      };



#endif

⌨️ 快捷键说明

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