62 Tree tree(0, 100, 0, 100, 4);
75 assert(
root->is_leaf());
76 assert(
root->get_num_points() == 4);
85 assert(not
root->is_leaf());
86 assert(
root->get_num_points() == 5);
89 assert(root_nw_child !=
nullptr);
90 assert(root_nw_child->
is_leaf());
94 assert(root_ne_child !=
nullptr);
95 assert(root_ne_child->
is_leaf());
99 assert(root_sw_child !=
nullptr);
100 assert(root_sw_child->
is_leaf());
104 assert(root_se_child !=
nullptr);
105 assert(root_se_child->
is_leaf());
124 assert(
root->get_num_points() == 8);
131 assert(not
root->is_leaf());
132 assert(not root_nw_child->
is_leaf());
133 assert(root_ne_child->
is_leaf());
134 assert(root_sw_child->
is_leaf());
135 assert(root_se_child->
is_leaf());
138 assert(root_nw_child_nw_child !=
nullptr);
139 assert(root_nw_child_nw_child->
is_leaf());
143 assert(root_nw_child_ne_child !=
nullptr);
144 assert(root_nw_child_ne_child->
is_leaf());
148 assert(root_nw_child_sw_child !=
nullptr);
149 assert(root_nw_child_sw_child->
is_leaf());
153 assert(root_nw_child_se_child !=
nullptr);
154 assert(root_nw_child_se_child->
is_leaf());
171 root_nw_child_nw_child =
NW_CHILD(root_nw_child);
172 root_nw_child_ne_child =
NE_CHILD(root_nw_child);
173 root_nw_child_sw_child =
SW_CHILD(root_nw_child);
174 root_nw_child_se_child =
SE_CHILD(root_nw_child);
176 assert(not
root->is_leaf());
177 assert(not root_nw_child->
is_leaf());
178 assert(root_nw_child_nw_child->
is_leaf());
179 assert(root_nw_child_ne_child->
is_leaf());
180 assert(root_nw_child_sw_child->
is_leaf());
181 assert(not root_nw_child_se_child->
is_leaf());
182 assert(root_ne_child->
is_leaf());
183 assert(root_sw_child->
is_leaf());
184 assert(root_se_child->
is_leaf());
186 assert(
root->get_num_points() == 12);
190 Tree::Node * root_nw_child_se_child_nw_child =
192 assert(root_nw_child_se_child_nw_child !=
nullptr);
193 assert(root_nw_child_se_child_nw_child->
is_leaf());
196 Tree::Node * root_nw_child_se_child_ne_child =
198 assert(root_nw_child_se_child_ne_child !=
nullptr);
199 assert(root_nw_child_se_child_ne_child->
is_leaf());
202 Tree::Node * root_nw_child_se_child_sw_child =
204 assert(root_nw_child_se_child_sw_child !=
nullptr);
205 assert(root_nw_child_se_child_sw_child->
is_leaf());
208 Tree::Node * root_nw_child_se_child_se_child =
210 assert(root_nw_child_se_child_se_child !=
nullptr);
211 assert(root_nw_child_se_child_se_child->
is_leaf());
225 root_nw_child_nw_child =
NW_CHILD(root_nw_child);
226 root_nw_child_ne_child =
NE_CHILD(root_nw_child);
227 root_nw_child_sw_child =
SW_CHILD(root_nw_child);
228 root_nw_child_se_child =
SE_CHILD(root_nw_child);
230 assert(not
root->is_leaf());
231 assert(not root_nw_child->
is_leaf());
232 assert(root_nw_child_nw_child->
is_leaf());
233 assert(root_nw_child_ne_child->
is_leaf());
234 assert(root_nw_child_sw_child->
is_leaf());
235 assert(not root_nw_child_se_child->
is_leaf());
236 assert(root_ne_child->
is_leaf());
237 assert(root_sw_child->
is_leaf());
238 assert(root_se_child->
is_leaf());
240 assert(
root->get_num_points() == 11);
243 assert(root_nw_child_se_child_nw_child->
is_leaf());
245 assert(root_nw_child_se_child_ne_child->
is_leaf());
247 assert(root_nw_child_se_child_sw_child->
is_leaf());
249 assert(root_nw_child_se_child_se_child->
is_leaf());
263 root_nw_child_nw_child =
NW_CHILD(root_nw_child);
264 root_nw_child_ne_child =
NE_CHILD(root_nw_child);
265 root_nw_child_sw_child =
SW_CHILD(root_nw_child);
266 root_nw_child_se_child =
SE_CHILD(root_nw_child);
268 assert(not
root->is_leaf());
269 assert(not root_nw_child->
is_leaf());
270 assert(root_nw_child_nw_child->
is_leaf());
271 assert(root_nw_child_ne_child->
is_leaf());
272 assert(root_nw_child_sw_child->
is_leaf());
273 assert(root_nw_child_se_child->
is_leaf());
274 assert(root_ne_child->
is_leaf());
275 assert(root_sw_child->
is_leaf());
276 assert(root_se_child->
is_leaf());
278 assert(
root->get_num_points() == 10);
285 cout <<
"\nQuadtree ok!\n";