btree insert finished!

This commit is contained in:
YuhangQ 2021-10-25 23:15:15 +08:00
parent ab822882ba
commit b26cf470d1
2 changed files with 3 additions and 3 deletions

View File

@ -103,8 +103,8 @@ public:
page.save();
}
static const int m = 28;
std::string key[m+100];
int val[m+200];
std::string key[m];
int val[m+1];
int parent;
private:
static std::map<int, BTreeNodeUUID*> map;

View File

@ -13,8 +13,8 @@ public:
~BTreeUUID() { delete root; };
void insert(const char* uuid, int address);
void print();
void innerPrint(BTreeNodeUUID* cur);
private:
void innerPrint(BTreeNodeUUID* cur);
void split(std::string uuid, int address, BTreeNodeUUID* parent, BTreeNodeUUID* cur);
void insertInternal(std::string uuid, BTreeNodeUUID* cur, BTreeNodeUUID* lLeaf, BTreeNodeUUID* rLeaf);
BTreeNodeUUID *root;