Voxeloop  0.1.0
Musical Loop Generation in Voxel World
Tree.hpp
Go to the documentation of this file.
1 #ifndef VOXELOOP_TREE_HPP
2 #define VOXELOOP_TREE_HPP
3 
4 #include "LinkedList.hpp"
5 
6 typedef struct {
7  char key;
8  float mvmt;
9 } TreeData;
10 
11 struct TreeNode {
13  struct TreeNode *left, *right, *prev;
14 };
15 
16 typedef struct TreeNode TreeNode;
17 
18 class Tree {
19 public:
20  Tree();
21 
23  TreeNode *addNode(char key, float mvmt, TreeNode *troot);
24  void flatten(TreeNode *node);
25 
26  TreeNode *createNode(char key, float mvmt);
27 };
28 
29 #endif // VOXELOOP_AVLTREE_HPP
Definition: Tree.hpp:18
TreeNode * addNode(char key, float mvmt, TreeNode *troot)
Definition: Tree.cpp:5
void flatten(TreeNode *node)
Definition: Tree.cpp:22
TreeNode * createNode(char key, float mvmt)
Definition: Tree.cpp:44
Tree()
Definition: Tree.cpp:3
TreeNode * root
Definition: Tree.hpp:22
Definition: Tree.hpp:6
float mvmt
Definition: Tree.hpp:8
char key
Definition: Tree.hpp:7
Definition: Tree.hpp:11
TreeData * value
Definition: Tree.hpp:12
struct TreeNode * right
Definition: Tree.hpp:13
struct TreeNode * prev
Definition: Tree.hpp:13
struct TreeNode * left
Definition: Tree.hpp:13