GlobeEngine
BalancedArrayTreeNode.h
Go to the documentation of this file.
1 //
2 // Created by Matthias Thöny on 1/11/12.
3 // Copyright (c) 2012 University of Zuerich. All rights reserved.
4 //
5 #ifndef VMML_BalancedArrayTreeNode_h
6 #define VMML_BalancedArrayTreeNode_h
7 
8 #include <vector>
9 #include "ArrayTreeNode.h"
10 
11 namespace geData {
12  template <short TREESIZE, class KEYTYPE, short HALFTREESIZE>
13  class BalancedArrayTreeNode : public ArrayTreeNode<TREESIZE, KEYTYPE, HALFTREESIZE>
14  {
15  public:
17  this->balance = 0;
18  }
20  inline short getBalance() const { return balance; }
21  inline void setBalance(short _balance) {
22  balance = _balance;
23  }
24 
25  void print(){
27  std::cout << this->balance << " | ";
28  }
29 
30  private:
31  short balance;
32  };
33 
36 
37 }
38 #endif
void print()
Definition: BalancedArrayTreeNode.h:25
BalancedArrayTreeNode< 4, geSpatial::CullableSpatialKey, 2 > BalancedArrayQuadTreeNode
Definition: BalancedArrayTreeNode.h:34
BalancedArrayTreeNode< 2, geSpatial::BinaryTreeKey, 1 > BalancedArrayBinTreeNode
Definition: BalancedArrayTreeNode.h:35
void print()
Definition: ArrayTreeNode.h:156
Definition: AvalancheTrainingSimulationEngine.h:39
~BalancedArrayTreeNode()
Definition: BalancedArrayTreeNode.h:19
void setBalance(short _balance)
Definition: BalancedArrayTreeNode.h:21
BalancedArrayTreeNode()
Definition: BalancedArrayTreeNode.h:16
Definition: ArrayTreeNode.h:14
short getBalance() const
Definition: BalancedArrayTreeNode.h:20
Definition: BalancedArrayTreeNode.h:13