diff options
Diffstat (limited to 'src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp')
-rw-r--r-- | src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp b/src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp index c89f84e2..f7bf289a 100644 --- a/src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp +++ b/src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp @@ -1,3 +1,24 @@ + /* This file is part of the Gudhi Library. The Gudhi library + * (Geometric Understanding in Higher Dimensions) is a generic C++ + * library for computational topology. + * + * Author(s): David Salinas + * + * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #include <stdio.h> #include <stdlib.h> #include <string> @@ -203,7 +224,7 @@ bool test_iterator_triangles(){ complex.add_vertex(); complex.add_edge(Vertex_handle(4),Vertex_handle(7)); complex.add_edge(Vertex_handle(3),Vertex_handle(7)); - complex.add_blocker(Vertex_handle(0),Vertex_handle(1),Vertex_handle(6)); + complex.add_blocker(Simplex_handle(Vertex_handle(0),Vertex_handle(1),Vertex_handle(6))); num_triangles_seen=0; TEST("triangles (should be 6 of them):"); @@ -234,7 +255,7 @@ bool test_iterator_simplices(){ complex.add_edge(Vertex_handle(4),Vertex_handle(5)); complex.add_edge(Vertex_handle(3),Vertex_handle(4)); - complex.add_blocker(Vertex_handle(2),Vertex_handle(3),Vertex_handle(4),Vertex_handle(5)); + complex.add_blocker(Simplex_handle(Vertex_handle(2),Vertex_handle(3),Vertex_handle(4),Vertex_handle(5))); bool correct_number_simplices = true; @@ -301,7 +322,7 @@ bool test_iterator_simplices3(){ complex.add_edge(Vertex_handle(0),Vertex_handle(1)); complex.add_edge(Vertex_handle(1),Vertex_handle(2)); complex.add_edge(Vertex_handle(2),Vertex_handle(0)); - complex.add_blocker(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2)); + complex.add_blocker(Simplex_handle(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2))); unsigned num_simplices = 0 ; @@ -449,7 +470,7 @@ bool test_link2(){ for (int j=i+1;j<15;j++) complex.add_edge(Vertex_handle(i),Vertex_handle(j)); } - complex.add_blocker(Vertex_handle(10),Vertex_handle(11),Vertex_handle(13)); + complex.add_blocker(Simplex_handle(Vertex_handle(10),Vertex_handle(11),Vertex_handle(13))); alpha = Simplex_handle(Vertex_handle(12),Vertex_handle(14)); Skeleton_blocker_link_complex<Complex> L(complex,alpha); // Complexes built @@ -487,7 +508,7 @@ bool test_link3(){ for (int j=i+1;j<15;j++) complex.add_edge(Vertex_handle(i),Vertex_handle(j)); } - complex.add_blocker(Vertex_handle(10),Vertex_handle(11),Vertex_handle(12)); + complex.add_blocker(Simplex_handle(Vertex_handle(10),Vertex_handle(11),Vertex_handle(12))); alpha = Simplex_handle(Vertex_handle(12),Vertex_handle(14)); Skeleton_blocker_link_complex<Complex> L(complex,alpha); // Complexes built @@ -519,7 +540,7 @@ bool test_link4(){ for (int j=i+1;j<15;j++) complex.add_edge(Vertex_handle(i),Vertex_handle(j)); } - complex.add_blocker(Vertex_handle(10),Vertex_handle(11),Vertex_handle(12),Vertex_handle(13)); + complex.add_blocker(Simplex_handle(Vertex_handle(10),Vertex_handle(11),Vertex_handle(12),Vertex_handle(13))); Simplex_handle alpha(Vertex_handle(12),Vertex_handle(14)); Skeleton_blocker_link_complex<Complex> L(complex,alpha); // Complexes built @@ -544,7 +565,7 @@ bool test_link5(){ Complex complex(0,new Print_complex_visitor<Vertex_handle>()); // Build the complexes build_complete(4,complex); - complex.add_blocker(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2),Vertex_handle(3)); + complex.add_blocker(Simplex_handle(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2),Vertex_handle(3))); Simplex_handle alpha(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2)); @@ -564,7 +585,7 @@ bool test_link6(){ Complex complex(0,new Print_complex_visitor<Vertex_handle>()); // Build the complexes build_complete(4,complex); - complex.add_blocker(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2)); + complex.add_blocker(Simplex_handle(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2))); Simplex_handle alpha(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2)); @@ -593,8 +614,8 @@ bool test_link7(){ complex.add_edge(Vertex_handle(i),Vertex_handle(7)); } complex.add_edge(Vertex_handle(6),Vertex_handle(7)); - complex.add_blocker(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2)); - complex.add_blocker(Vertex_handle(3),Vertex_handle(4),Vertex_handle(5)); + complex.add_blocker(Simplex_handle(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2))); + complex.add_blocker(Simplex_handle(Vertex_handle(3),Vertex_handle(4),Vertex_handle(5))); Simplex_handle alpha(Vertex_handle(3),Vertex_handle(4),Vertex_handle(5)); |