summaryrefslogtreecommitdiff
path: root/src/Simplex_tree/test/simplex_tree_unit_test.cpp
diff options
context:
space:
mode:
authoranmoreau <anmoreau@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-08-05 13:36:42 +0000
committeranmoreau <anmoreau@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-08-05 13:36:42 +0000
commitf06671819213604e26778bf40113e22b8996c3ee (patch)
treeb7a0b707943d2dc94128377fe51842e7bade85c5 /src/Simplex_tree/test/simplex_tree_unit_test.cpp
parente290cf6b6872e6a2eac136feb87fddc77d24c9d2 (diff)
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
Diffstat (limited to 'src/Simplex_tree/test/simplex_tree_unit_test.cpp')
-rw-r--r--src/Simplex_tree/test/simplex_tree_unit_test.cpp36
1 files changed, 10 insertions, 26 deletions
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<Vertex_handle> 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();
}