Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

QuadTreeNM.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 namespace ogdf {
37 namespace energybased {
38 namespace fmmm {
39 
43 {
44 
45 public:
47  QuadTreeNM();
48 
50  void delete_tree(QuadTreeNodeNM* node_ptr);
51 
53  void delete_tree_and_count_nodes(QuadTreeNodeNM* node_ptr,int& nodecounter);
54 
57  void cout_preorder(QuadTreeNodeNM* node_ptr);
58  void cout_preorder(QuadTreeNodeNM* node_ptr,int precision);
59 
61  void init_tree() {
62  root_ptr = new QuadTreeNodeNM();
63  act_ptr = root_ptr;
64  }
65 
68  {
69  act_ptr = root_ptr;
70  }
71 
73  void go_to_father()
74  {
75  if (act_ptr->get_father_ptr() != nullptr)
77  else
78  std::cout << "Error QuadTreeNM: No father Node exists";
79  }
80 
83  {
85  }
86 
89  {
91  }
92 
95  {
97  }
98 
101  {
103  }
104 
107  void create_new_lt_child();
108 
111  void create_new_rt_child();
112 
115  void create_new_lb_child();
116 
119  void create_new_rb_child();
120 
122  QuadTreeNodeNM* get_act_ptr() const { return act_ptr; }
123  QuadTreeNodeNM* get_root_ptr() const { return root_ptr; }
124 
126  void set_root_ptr(QuadTreeNodeNM* r_ptr) { root_ptr = r_ptr; }
127 
129  void set_act_ptr(QuadTreeNodeNM* a_ptr) { act_ptr = a_ptr; }
130 
133 
134 private:
137 
138 };
139 
140 }
141 }
142 }
QuadTreeNodeNM * get_child_lb_ptr() const
QuadTreeNodeNM * root_ptr
points to the root node
Definition: QuadTreeNM.h:135
void go_to_lb_child()
Sets act_ptr to the left_bottom_child_ptr.
Definition: QuadTreeNM.h:94
QuadTreeNodeNM * act_ptr
points to the actual node
Definition: QuadTreeNM.h:136
QuadTreeNodeNM * get_child_lt_ptr() const
Helping data structure that stores the information needed to represent a node of the reduced quad tre...
QuadTreeNodeNM * get_act_ptr() const
Returns the actual/root node pointer of the tree.
Definition: QuadTreeNM.h:122
void go_to_rb_child()
Sets act_ptr to the right_bottom_child_ptr.
Definition: QuadTreeNM.h:100
void set_root_node(QuadTreeNodeNM &r)
Sets the content of *root_ptr to r.
Definition: QuadTreeNM.h:132
QuadTreeNodeNM * get_father_ptr() const
void go_to_father()
Sets act_ptr to the father_ptr.
Definition: QuadTreeNM.h:73
Helping data structure that stores the information needed to represent the modified quadtree in the N...
Definition: QuadTreeNM.h:42
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
void go_to_rt_child()
Sets act_ptr to the right_top_child_ptr.
Definition: QuadTreeNM.h:88
Declaration of class QuadTreeNodeNM.
void set_root_ptr(QuadTreeNodeNM *r_ptr)
Sets root_ptr to r_ptr.
Definition: QuadTreeNM.h:126
QuadTreeNodeNM * get_child_rt_ptr() const
void set_act_ptr(QuadTreeNodeNM *a_ptr)
Sets act_ptr to a_ptr.
Definition: QuadTreeNM.h:129
void init_tree()
Creates the root node and lets act_ptr and root_ptr point to the root node.
Definition: QuadTreeNM.h:61
void start_at_root()
Sets act_ptr to the root_ptr.
Definition: QuadTreeNM.h:67
void delete_tree_and_count_nodes(QuadTreeNodeNM *node_ptr, int &nodecounter)
Deletes the tree starting at node_ptr and counts the nodes of the subtree.
QuadTreeNodeNM * get_root_ptr() const
Definition: QuadTreeNM.h:123
The namespace for all OGDF objects.
void delete_tree(QuadTreeNodeNM *node_ptr)
Deletes the tree starting at node_ptr.
void cout_preorder(QuadTreeNodeNM *node_ptr)
Pre_order traversal of the tree rooted at node_ptr (with or without output of the M...
void go_to_lt_child()
Sets act_ptr to the left_top_child_ptr.
Definition: QuadTreeNM.h:82
QuadTreeNodeNM * get_child_rb_ptr() const