From c45a4897ee4bee39801efc7ce176f33b25a75fb0 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 20 Jan 2015 10:38:41 +0000 Subject: cpplint fixes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/TDA_dev_1.1.0@416 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 3644577a2a7a8798f5f53d33c49c4862e3ec6787 --- src/Skeleton_blocker/test/TestSimplifiable.cpp | 45 ++++++++++++++------------ 1 file changed, 24 insertions(+), 21 deletions(-) (limited to 'src/Skeleton_blocker/test/TestSimplifiable.cpp') diff --git a/src/Skeleton_blocker/test/TestSimplifiable.cpp b/src/Skeleton_blocker/test/TestSimplifiable.cpp index 78412754..8ac9594a 100644 --- a/src/Skeleton_blocker/test/TestSimplifiable.cpp +++ b/src/Skeleton_blocker/test/TestSimplifiable.cpp @@ -73,31 +73,33 @@ bool test_contraction1(){ enum { a, b, x, y, z, n }; Complex complex(n); build_complete(n,complex); - complex.remove_edge(Vertex_handle(b),Vertex_handle(z)); - complex.add_blocker(Simplex_handle(Vertex_handle(a),Vertex_handle(x),Vertex_handle(y))); - complex.add_blocker(Simplex_handle(Vertex_handle(b),Vertex_handle(x),Vertex_handle(y))); + complex.remove_edge(static_cast(b), static_cast(z)); + complex.add_blocker(Simplex_handle(static_cast(a), static_cast(x), + static_cast(y))); + complex.add_blocker(Simplex_handle(static_cast(b), static_cast(x), + static_cast(y))); // Print result cerr << "complex before complex"<< complex.to_string()<(a),static_cast(b)); // Print result cerr << "ContractEdge(0,1)\n"; PRINT(complex.to_string()); // verification for (int i=0;i<5;i++) - if (i!=1) assert_vertex(complex,Vertex_handle(i)); - bool test1 = !complex.contains_edge(Vertex_handle(a),Vertex_handle(b)); + if (i!=1) assert_vertex(complex, static_cast(i)); + bool test1 = !complex.contains_edge(static_cast(a),static_cast(b)); bool test2 = assert_blocker(complex,Root_vertex_handle(a),Root_vertex_handle(x),Root_vertex_handle(y)); bool test3 = complex.num_edges()==6; bool test4 = complex.num_blockers()==1; Simplex_handle sigma; - sigma.add_vertex(Vertex_handle(a)); - sigma.add_vertex(Vertex_handle(x)); - sigma.add_vertex(Vertex_handle(y)); - sigma.add_vertex(Vertex_handle(z)); + sigma.add_vertex(static_cast(a)); + sigma.add_vertex(static_cast(x)); + sigma.add_vertex(static_cast(y)); + sigma.add_vertex(static_cast(z)); bool test5 = !(complex.contains(sigma)); return test1&&test2&&test3&&test4&&test5; } @@ -107,18 +109,18 @@ bool test_contraction2(){ enum { a, b, x, y, z, n }; Complex complex(n); build_complete(n,complex); - complex.remove_edge(Vertex_handle(b),Vertex_handle(x)); + complex.remove_edge(static_cast(b),static_cast(x)); Simplex_handle blocker; - blocker.add_vertex(Vertex_handle(a)); - blocker.add_vertex(Vertex_handle(y)); - blocker.add_vertex(Vertex_handle(z)); + blocker.add_vertex(static_cast(a)); + blocker.add_vertex(static_cast(y)); + blocker.add_vertex(static_cast(z)); complex.add_blocker(blocker); // Print result cerr << "complex complex"<< complex.to_string(); cerr <(a),static_cast(b)); cerr << "complex.ContractEdge(a,b)"<< complex.to_string(); @@ -126,7 +128,8 @@ bool test_contraction2(){ // there should be one blocker (a,c,d,e) in the complex bool test ; - test = complex.contains_blocker(Simplex_handle(a,x,y,z)); + test = complex.contains_blocker(Simplex_handle(static_cast(a), static_cast(x), + static_cast(y),static_cast(z))); test = test && complex.num_blockers()==1; return test; } @@ -136,7 +139,7 @@ bool test_link_condition1(){ Complex complex(0); // Build the complexes build_complete(4,complex); - complex.add_blocker(Simplex_handle(Vertex_handle(0),Vertex_handle(1),Vertex_handle(2))); + complex.add_blocker(Simplex_handle(static_cast(0), static_cast(1), static_cast(2))); // Print result @@ -155,13 +158,13 @@ bool test_collapse0(){ Complex complex(5); build_complete(4,complex); complex.add_vertex(); - complex.add_edge(2,4); - complex.add_edge(3,4); + complex.add_edge(static_cast(2), static_cast(4)); + complex.add_edge(static_cast(3), static_cast(4)); // Print result cerr << "initial complex :\n"<< complex.to_string(); cerr <(1), static_cast(2), static_cast(3)); complex.remove_star(simplex_123); cerr << "complex.remove_star(1,2,3):\n"<< complex.to_string(); cerr <(2)); cerr << "complex after remove star of 2:\n"<< complex.to_string(); bool blocker134_here = complex.contains_blocker(Simplex_handle(Vertex_handle(1),Vertex_handle(3),Vertex_handle(4))); -- cgit v1.2.3