From a2dc6f6cccf5eba6227aae15d883c73fedfa17e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 15 Oct 2014 16:23:47 +0200 Subject: [PATCH] rename clear_sequence_tree -> clear --- .../benchmark_shortest_paths.cpp | 2 +- .../Surface_mesh_shortest_path.h | 12 ++++++------ .../Surface_mesh_shortest_path_test_2.cpp | 8 ++++---- .../test/Surface_mesh_shortest_path/TestMesh.cpp | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Surface_mesh_shortest_path/benchmark/Surface_mesh_shortest_path/benchmark_shortest_paths.cpp b/Surface_mesh_shortest_path/benchmark/Surface_mesh_shortest_path/benchmark_shortest_paths.cpp index 65ffd979be5..f310cb657e7 100644 --- a/Surface_mesh_shortest_path/benchmark/Surface_mesh_shortest_path/benchmark_shortest_paths.cpp +++ b/Surface_mesh_shortest_path/benchmark/Surface_mesh_shortest_path/benchmark_shortest_paths.cpp @@ -215,7 +215,7 @@ void run_benchmarks(CGAL::Random& rand, size_t numTrials, size_t numSources, siz sourcePoints.push_back(Face_location(sourceFace, sourceLocation)); } - shortestPaths.clear_sequence_tree(); + shortestPaths.clear(); shortestPaths.add_source_points(sourcePoints.begin(), sourcePoints.end()); timer.start(); diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index ea66bbe1c73..f174ace30ac 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -158,7 +158,7 @@ public: \details An iterator becomes invalid if: - the corresponding point is removed (either with `Surface_mesh_shortest_path::remove_source_point()` or `Surface_mesh_shortest_path::remove_all_source_points()`). - the structure is re-built (triggered by a shortest path query or a call to `Surface_mesh_shortest_path::build_sequence_tree()`). - - the structure is cleared (`Surface_mesh_shortest_path::clear_sequence_tree()`). + - the structure is cleared (`Surface_mesh_shortest_path::clear()`). Dereferencing this iterator yields a `const Surface_mesh_shortest_path::Face_location&`. @@ -2158,7 +2158,7 @@ public: \details No change to the internal shortest paths data structure occurs until either `Surface_mesh_shortest_path::build_sequence_tree()` or the first shortest path query is done. - For a version which deletes all data immediately, use `clear_sequence_tree()` instead. + For a version which deletes all data immediately, use `clear()` instead. */ void remove_all_source_points() { @@ -2187,13 +2187,13 @@ public: } /*! - \brief Removes all source point from the sequence tree + \brief Removes all data, the class is as if it was constructed. - \details The entire container is reset to its default state and any current - sequence tree is deleted. For a version which defers deletion until + \details All internal containers are cleared and the internal + sequence tree is also cleared. For a version which defers deletion until it is necessary, use `Surface_mesh_shortest_path::remove_all_source_points()`. */ - void clear_sequence_tree() + void clear() { reset_algorithm(); } diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp index 28975e80672..279a672f476 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_2.cpp @@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE( test_a_to_b_vs_b_t_a_distances ) //startToEndShortestPaths.m_debugOutput = true; - startToEndShortestPaths.clear_sequence_tree(); + startToEndShortestPaths.clear(); startToEndShortestPaths.add_source_point(startVertex); startToEndShortestPaths.build_sequence_tree(); @@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE( test_a_to_b_vs_b_t_a_distances ) //endToStartShortestPaths.m_debugOutput = true; - endToStartShortestPaths.clear_sequence_tree(); + endToStartShortestPaths.clear(); endToStartShortestPaths.add_source_point(endVertex); endToStartShortestPaths.build_sequence_tree(); @@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE( test_a_to_b_vs_b_t_a_distances ) //shortestPaths.m_debugOutput = true; - startToEndShortestPaths.clear_sequence_tree(); + startToEndShortestPaths.clear(); startToEndShortestPaths.add_source_point(startFace, startLocation); startToEndShortestPaths.build_sequence_tree(); @@ -219,7 +219,7 @@ BOOST_AUTO_TEST_CASE( test_a_to_b_vs_b_t_a_distances ) CGAL::test::Edge_sequence_collector startToEndCollector(vertexIndexMap, halfedgeIndexMap, faceIndexMap); startToEndShortestPaths.shortest_path_sequence_to_source_points(endFace, endLocation, startToEndCollector); - endToStartShortestPaths.clear_sequence_tree(); + endToStartShortestPaths.clear(); endToStartShortestPaths.add_source_point(endFace, endLocation); endToStartShortestPaths.build_sequence_tree(); diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index 47f8d105d8e..13cd7d325e7 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -200,7 +200,7 @@ struct TestMeshProgramInstance std::cout << "STE(location): " << faceIndexMap[startLocation.first] << " , " << startLocation.second[0] << " " << startLocation.second[1] << " " << startLocation.second[2] << " " << std::endl; std::cout << "ETS(location): " << faceIndexMap[endLocation.first] << " , " << endLocation.second[0] << " " << endLocation.second[1] << " " << endLocation.second[2] << " " << std::endl; - startToEndShortestPaths.clear_sequence_tree(); + startToEndShortestPaths.clear(); startToEndShortestPaths.add_source_point(startLocation.first, startLocation.second); startToEndShortestPaths.build_sequence_tree(); @@ -210,7 +210,7 @@ struct TestMeshProgramInstance FT startToEnd = startToEndShortestPaths.shortest_distance_to_source_points(endLocation.first, endLocation.second).first; - endToStartShortestPaths.clear_sequence_tree(); + endToStartShortestPaths.clear(); endToStartShortestPaths.add_source_point(endLocation.first, endLocation.second); endToStartShortestPaths.build_sequence_tree();