xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
Node.h
Go to the documentation of this file.
1#ifndef DATA_STRUCTURE_NODE_H
2#define DATA_STRUCTURE_NODE_H
3
5
6#include <vector>
7#include <exception>
8#include <string>
9
10namespace Xale::DataStructure
11{
15 template<typename TKey, typename TValue>
16 struct Node {
17 explicit Node(bool leaf) : parent(nullptr), next(nullptr), isLeaf(leaf) {}
18
19 std::vector<TKey> keys;
20 std::vector<TValue> values; // leaf
21 std::vector<Node*> children; // inner
24 bool isLeaf;
25 };
26}
27
28#endif // DATA_STRUCTURE_NODE_H
Definition BPlusTree.h:9
Node * next
Definition Node.h:23
Node * parent
Definition Node.h:22
std::vector< Node * > children
Definition Node.h:21
bool isLeaf
Definition Node.h:24
std::vector< TValue > values
Definition Node.h:20
std::vector< TKey > keys
Definition Node.h:19
Node(bool leaf)
Definition Node.h:17