From f06671819213604e26778bf40113e22b8996c3ee Mon Sep 17 00:00:00 2001 From: anmoreau Date: Wed, 5 Aug 2015 13:36:42 +0000 Subject: several fixes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/copy_move@724 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8eb82645458ae536d1cba8682a50880ba377cb7f --- src/Simplex_tree/test/simplex_tree_unit_test.cpp | 36 +++++++----------------- 1 file changed, 10 insertions(+), 26 deletions(-) (limited to 'src/Simplex_tree/test') diff --git a/src/Simplex_tree/test/simplex_tree_unit_test.cpp b/src/Simplex_tree/test/simplex_tree_unit_test.cpp index 7ab5c24e..cd690b19 100644 --- a/src/Simplex_tree/test/simplex_tree_unit_test.cpp +++ b/src/Simplex_tree/test/simplex_tree_unit_test.cpp @@ -611,33 +611,17 @@ BOOST_AUTO_TEST_CASE( NSimplexAndSubfaces_tree_insertion ) std::cout << "********************************************************************" << std::endl; // TEST Edge_contraction - typeST st_copy_2 = st_copy_1, st_copy_3 = st_copy_1; - std::vector v1, v2; - v1.push_back(3); - v2.push_back(0); - typeST::Simplex_handle s1; - typeST::Simplex_handle s2; - s1 = st_copy_1.find(v1); - s2 = st_copy_1.find(v2); - st_copy_1.edge_contraction(s1, s2); - std::cout << "Printing a copy of st, with the edge (3, 0) contracted, 3 being contracted in 0" << std::endl; + typeST st_copy_2 = st_copy_1, st_copy_3 = st_copy_1, st_copy_4 = st_copy_1; + st_copy_1.edge_contraction(0, 3); + std::cout << "Printing a copy of st, with the edge (0, 3) contracted, 3 being contracted in 0" << std::endl; st_copy_1.print_tree(); - v1.clear(); - v2.clear(); - v1.push_back(3); - v2.push_back(1); - s1 = st_copy_2.find(v1); - s2 = st_copy_2.find(v2); - st_copy_2.edge_contraction(s1, s2); - std::cout << "Printing a copy of st, with the edge (3, 1) contracted, 3 being contracted in 1" << std::endl; + st_copy_2.edge_contraction(1, 3); + std::cout << "Printing a copy of st, with the edge (1, 3) contracted, 3 being contracted in 1" << std::endl; st_copy_2.print_tree(); - v1.clear(); - v2.clear(); - v1.push_back(4); - v2.push_back(3); - s1 = st_copy_3.find(v1); - s2 = st_copy_3.find(v2); - st_copy_3.edge_contraction(s1, s2); - std::cout << "Printing a copy of st, with the edge (4, 3) contracted, 4 being contracted in 3" << std::endl; + st_copy_3.edge_contraction(3, 4); + std::cout << "Printing a copy of st, with the edge (3, 4) contracted, 4 being contracted in 3" << std::endl; st_copy_3.print_tree(); + st_copy_4.edge_contraction(1, 6); + std::cout << "Printing a copy of st, with the edge (1, 6) contracted, 6 being contracted in 1" << std::endl; + st_copy_4.print_tree(); } -- cgit v1.2.3