Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
QuadTreeNM.h
Go to the documentation of this file.
1
32#pragma once
33
35
36#include <iostream>
37
39class ParticleInfo;
40} // namespace ogdf::energybased::fmmm
41
42namespace ogdf {
43template<class E>
44class List;
45
46namespace energybased {
47namespace fmmm {
48
52public:
55
57 void delete_tree(QuadTreeNodeNM* node_ptr);
58
60 void delete_tree_and_count_nodes(QuadTreeNodeNM* node_ptr, int& nodecounter);
61
65 void cout_preorder(QuadTreeNodeNM* node_ptr, int precision);
66
68 void init_tree() {
71 }
72
75
77 void go_to_father() {
78 if (act_ptr->get_father_ptr() != nullptr) {
80 } else {
81 std::cout << "Error QuadTreeNM: No father Node exists";
82 }
83 }
84
87
90
93
96
100
104
108
112
114 QuadTreeNodeNM* get_act_ptr() const { return act_ptr; }
115
117
119 void set_root_ptr(QuadTreeNodeNM* r_ptr) { root_ptr = r_ptr; }
120
122 void set_act_ptr(QuadTreeNodeNM* a_ptr) { act_ptr = a_ptr; }
123
126
127private:
130};
131
132}
133}
134}
Declaration of class QuadTreeNodeNM.
Doubly linked lists (maintaining the length of the list).
Definition List.h:1451
Helping data structure that stores the information needed to represent the modified quadtree in the N...
Definition QuadTreeNM.h:51
void create_new_rb_child(List< ParticleInfo > *L_x_ptr, List< ParticleInfo > *L_y_ptr)
Creates a new right_bottom_child of the actual node(importing L_x(y)_ptr).
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.
void set_root_ptr(QuadTreeNodeNM *r_ptr)
Sets root_ptr to r_ptr.
Definition QuadTreeNM.h:119
void go_to_lt_child()
Sets act_ptr to the left_top_child_ptr.
Definition QuadTreeNM.h:86
void go_to_lb_child()
Sets act_ptr to the left_bottom_child_ptr.
Definition QuadTreeNM.h:92
void start_at_root()
Sets act_ptr to the root_ptr.
Definition QuadTreeNM.h:74
void set_act_ptr(QuadTreeNodeNM *a_ptr)
Sets act_ptr to a_ptr.
Definition QuadTreeNM.h:122
void create_new_lt_child(List< ParticleInfo > *L_x_ptr, List< ParticleInfo > *L_y_ptr)
Creates a new left_top_child of the actual node (importing L_x(y)_ptr).
QuadTreeNodeNM * root_ptr
points to the root node
Definition QuadTreeNM.h:128
void go_to_rt_child()
Sets act_ptr to the right_top_child_ptr.
Definition QuadTreeNM.h:89
void cout_preorder(QuadTreeNodeNM *node_ptr)
Pre_order traversal of the tree rooted at node_ptr (with or without output of the M,...
void init_tree()
Creates the root node and lets act_ptr and root_ptr point to the root node.
Definition QuadTreeNM.h:68
void set_root_node(QuadTreeNodeNM &r)
Sets the content of *root_ptr to r.
Definition QuadTreeNM.h:125
void create_new_lb_child(List< ParticleInfo > *L_x_ptr, List< ParticleInfo > *L_y_ptr)
Creates a new left_bottom_child of the actual node (importing L_x(y)_ptr).
QuadTreeNodeNM * act_ptr
points to the actual node
Definition QuadTreeNM.h:129
void delete_tree(QuadTreeNodeNM *node_ptr)
Deletes the tree starting at node_ptr.
void create_new_rt_child(List< ParticleInfo > *L_x_ptr, List< ParticleInfo > *L_y_ptr)
Creates a new right_top_child of the actual node (importing L_x(y)_ptr).
void go_to_rb_child()
Sets act_ptr to the right_bottom_child_ptr.
Definition QuadTreeNM.h:95
QuadTreeNodeNM * get_act_ptr() const
Returns the actual/root node pointer of the tree.
Definition QuadTreeNM.h:114
void cout_preorder(QuadTreeNodeNM *node_ptr, int precision)
void go_to_father()
Sets act_ptr to the father_ptr.
Definition QuadTreeNM.h:77
QuadTreeNodeNM * get_root_ptr() const
Definition QuadTreeNM.h:116
Helping data structure that stores the information needed to represent a node of the reduced quad tre...
QuadTreeNodeNM * get_child_lb_ptr() const
QuadTreeNodeNM * get_child_rt_ptr() const
QuadTreeNodeNM * get_father_ptr() const
QuadTreeNodeNM * get_child_lt_ptr() const
QuadTreeNodeNM * get_child_rb_ptr() const
The namespace for all OGDF objects.