Skip to content
Snippets Groups Projects
Commit 14e0fba9 authored by stefan.lazic's avatar stefan.lazic
Browse files

fix symmetry

parent 372fe774
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -119,7 +119,7 @@ void swap(quadtree *ptr1, quadtree *ptr2){
error_code quadtree_horizontal_symmmetry(quadtree p_quadtree){
error_code err = 0;
if(p_quadtree != NULL){
if(p_quadtree->child[0] != NULL){
for(int i = 0; i < 4; i++){
run_func(quadtree_horizontal_symmmetry(p_quadtree->child[i]));
}
......@@ -131,7 +131,7 @@ error_code quadtree_horizontal_symmmetry(quadtree p_quadtree){
error_code quadtree_vertical_symmmetry(quadtree p_quadtree){
error_code err = 0;
if(p_quadtree != NULL){
if(p_quadtree->child[0] != NULL){
for(int i = 0; i < 4; i++){
run_func(quadtree_vertical_symmmetry(p_quadtree->child[i]));
}
......
......@@ -71,7 +71,7 @@ int main(int argc, char *argv[]) {
run_func(matrix_to_quadtree(p_qtree1, &p_pgm1->mat, 0, n_max, p_pgm1->mat.m/2, p_pgm1->mat.m/2, p_pgm1->mat.n/2));
print_applying("horizontal symmetry qtree1");
//run_func(quadtree_horizontal_symmmetry(p_qtree1)); // symmetry
run_func(quadtree_horizontal_symmmetry(p_qtree1)); // symmetry
//print_applying("vertical symmetry qtree1");
//run_func(quadtree_vertical_symmmetry(p_qtree1)); // symmetry
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment