From 183a092e6bd138c8425aed6fd6c9d45f7e63bba1 Mon Sep 17 00:00:00 2001 From: Lingjie Zhu Date: Fri, 25 May 2018 09:42:51 +0800 Subject: [PATCH] fix naming class name VSA_approximation to Variational_shape_approximation --- .../vsa_autoinit_timing_benchmark.cpp | 2 +- .../vsa_timing_benchmark.cpp | 2 +- .../PackageDescription.txt | 2 +- .../surface_mesh_approximation.txt | 4 ++-- .../vsa_class_interface_example.cpp | 2 +- .../vsa_isotropic_metric_example.cpp | 2 +- .../include/CGAL/Variational_shape_approximation.h | 14 +++++++------- .../include/CGAL/mesh_approximation.h | 2 +- .../vsa_class_interface_test.cpp | 2 +- .../vsa_correctness_test.cpp | 2 +- .../vsa_error_decrease_test.cpp | 2 +- .../vsa_meshing_manifold_test.cpp | 2 +- .../Surface_mesh_approximation/vsa_metric_test.cpp | 2 +- .../vsa_teleportation_test.cpp | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/vsa_autoinit_timing_benchmark.cpp b/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/vsa_autoinit_timing_benchmark.cpp index 48c9ac0055a..83d41b377d0 100644 --- a/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/vsa_autoinit_timing_benchmark.cpp +++ b/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/vsa_autoinit_timing_benchmark.cpp @@ -14,7 +14,7 @@ typedef Kernel::FT FT; typedef CGAL::Polyhedron_3 Polyhedron; typedef boost::property_map::type Vertex_point_map; -typedef CGAL::VSA_approximation L21_approx; +typedef CGAL::Variational_shape_approximation L21_approx; typedef L21_approx::Error_metric L21_metric; typedef CGAL::Timer Timer; diff --git a/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/vsa_timing_benchmark.cpp b/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/vsa_timing_benchmark.cpp index 7e2e32809af..7aa2c51ab28 100644 --- a/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/vsa_timing_benchmark.cpp +++ b/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/vsa_timing_benchmark.cpp @@ -13,7 +13,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; typedef boost::property_map::type Vertex_point_map; -typedef CGAL::VSA_approximation L21_apporx; +typedef CGAL::Variational_shape_approximation L21_apporx; typedef L21_approx::Error_metric L21_metric; typedef CGAL::Timer Timer; diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/PackageDescription.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/PackageDescription.txt index d3796e29ce1..431588d82ee 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/PackageDescription.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/PackageDescription.txt @@ -40,7 +40,7 @@ and provides the list of parameters used in this package. ## Classes ## - `CGAL::VSA::L21_metric_vector_proxy` - `CGAL::VSA::L2_metric_plane_proxy` -- `CGAL::VSA_approximation` +- `CGAL::Variational_shape_approximation` \todo add option to enforce guarantee of 2-manifold and oriented output mesh \todo add option to smooth frontiers of the partition diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt index 89a37d9aa1d..c10173dc4bf 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt @@ -164,7 +164,7 @@ Free function with \ref namedparameters options. - `CGAL::mesh_approximation()`: given a triangle mesh, approximate the geometry with default \f$ \mathcal{L}^{2,1} \f$ metric. Class interface: -- `CGAL::VSA_approximation`: allowing more customization of the proxy, metric and approximation process. +- `CGAL::Variational_shape_approximation`: allowing more customization of the proxy, metric and approximation process. The input of the algorithm is expected to be: - Triangulated @@ -192,7 +192,7 @@ The free function can be used for retrieving the segmentation via proxy ids outp \subsection sma_example3 Class Interface -The class interface `CGAL::VSA_approximation` offers a flexible means to control of the algorithm. The following example uses the `CGAL::L2_metric_planar_proxy` to approximate the shape. +The class interface `CGAL::Variational_shape_approximation` offers a flexible means to control of the algorithm. The following example uses the `CGAL::L2_metric_planar_proxy` to approximate the shape. \cgalExample{Surface_mesh_approximation/vsa_class_interface_example.cpp} diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp index b997b8cd519..d10e311d693 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp @@ -9,7 +9,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; typedef boost::property_map::type Vertex_point_map; -typedef CGAL::VSA_approximation Mesh_approximation; +typedef CGAL::Variational_shape_approximation Mesh_approximation; // L21 error metric typedef Mesh_approximation::Error_metric L21_metric; diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp index a3472d2783e..ffc6647cb13 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_isotropic_metric_example.cpp @@ -60,7 +60,7 @@ struct Compact_metric_point_proxy const Facet_area_map area_pmap; }; -typedef CGAL::VSA_approximation< +typedef CGAL::Variational_shape_approximation< Polyhedron, Vertex_point_map, Compact_metric_point_proxy> Approximation; int main() diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 05ccc9254ff..512a82285da 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -1,5 +1,5 @@ -#ifndef CGAL_VSA_APPROXIMATION_H -#define CGAL_VSA_APPROXIMATION_H +#ifndef CGAL_VARIATIONAL_SHAPE_APPROXIMATION_H +#define CGAL_VARIATIONAL_SHAPE_APPROXIMATION_H #include @@ -69,7 +69,7 @@ template -class VSA_approximation { +class Variational_shape_approximation { // public typedefs public: @@ -278,7 +278,7 @@ public: /*! * @brief %Default empty constructor. */ - VSA_approximation() : + Variational_shape_approximation() : m_ptm(NULL), m_metric(NULL), m_average_edge_length(0.0) { @@ -297,7 +297,7 @@ public: * @param tm `CGAL TriangleMesh` on which approximation operates. * @param vpoint_map vertex point map of the mesh */ - VSA_approximation(const TriangleMesh &tm, const VertexPointMap &vpoint_map) : + Variational_shape_approximation(const TriangleMesh &tm, const VertexPointMap &vpoint_map) : m_ptm(&tm), m_vpoint_map(vpoint_map), m_metric(NULL), @@ -319,7 +319,7 @@ public: } /// @} - ~VSA_approximation() { + ~Variational_shape_approximation() { if (m_ptm) { CGAL::internal::remove_property(m_vanchor_map, *(const_cast(m_ptm))); CGAL::internal::remove_property(m_fproxy_map, *(const_cast(m_ptm))); @@ -2114,4 +2114,4 @@ private: #undef CGAL_VSA_INVALID_TAG -#endif // CGAL_VSA_APPROXIMATION_H +#endif // CGAL_VARIATIONAL_SHAPE_APPROXIMATION_H diff --git a/Surface_mesh_approximation/include/CGAL/mesh_approximation.h b/Surface_mesh_approximation/include/CGAL/mesh_approximation.h index b58ead74e9f..6a4956dc9a5 100644 --- a/Surface_mesh_approximation/include/CGAL/mesh_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/mesh_approximation.h @@ -113,7 +113,7 @@ bool mesh_approximation(const TriangleMesh &tm, const NamedParameters &np) Vertex_point_map point_pmap = choose_param(get_param(np, sma_np::vertex_point), get_property_map(vertex_point, const_cast(tm))); - typedef CGAL::VSA_approximation L21_approx; + typedef CGAL::Variational_shape_approximation L21_approx; typedef typename L21_approx::Error_metric L21_metric; const Approximation_verbose_level vl = choose_param( diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_class_interface_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_class_interface_test.cpp index 0bea14f0369..5671af72e9f 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_class_interface_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_class_interface_test.cpp @@ -19,7 +19,7 @@ typedef boost::associative_property_map > Fa typedef boost::property_map::type Vertex_point_map; typedef CGAL::VSA::L2_metric_plane_proxy L2_metric_plane_proxy; -typedef CGAL::VSA_approximation L2_approx; +typedef CGAL::Variational_shape_approximation L2_approx; typedef L2_approx::Proxy Plane_proxy; /** diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp index df169923e4d..39e63c24467 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp @@ -13,7 +13,7 @@ typedef Kernel::FT FT; typedef CGAL::Polyhedron_3 Polyhedron; typedef boost::property_map::type Vertex_point_map; -typedef CGAL::VSA_approximation L21_approx; +typedef CGAL::Variational_shape_approximation L21_approx; typedef L21_approx::Error_metric L21_metric; bool test_shape(const char *file_name, const std::size_t target_num_proxies) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_error_decrease_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_error_decrease_test.cpp index 6894a807d5c..097f4111a8c 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_error_decrease_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_error_decrease_test.cpp @@ -13,7 +13,7 @@ typedef Kernel::FT FT; typedef CGAL::Polyhedron_3 Polyhedron; typedef boost::property_map::type Vertex_point_map; -typedef CGAL::VSA_approximation L21_approx; +typedef CGAL::Variational_shape_approximation L21_approx; typedef L21_approx::Error_metric L21_metric; bool check_strict_ordering(const std::vector &error) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_meshing_manifold_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_meshing_manifold_test.cpp index 7cdfa5f8817..6b3098bb689 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_meshing_manifold_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_meshing_manifold_test.cpp @@ -13,7 +13,7 @@ typedef Kernel::FT FT; typedef CGAL::Polyhedron_3 Polyhedron; typedef boost::property_map::type Vertex_point_map; -typedef CGAL::VSA_approximation L21_approx; +typedef CGAL::Variational_shape_approximation L21_approx; typedef L21_approx::Error_metric L21_metric; bool test_manifold(const char *file_name, const FT drop = FT(1e-8)) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp index 416197adfc3..4c00e630d05 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_metric_test.cpp @@ -60,7 +60,7 @@ struct Compact_metric_point_proxy { const Facet_area_map area_pmap; }; -typedef CGAL::VSA_approximation< +typedef CGAL::Variational_shape_approximation< Polyhedron, Vertex_point_map, Compact_metric_point_proxy> Compact_approx; /** diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp index d11bbd63bcf..20d9ed8cb97 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_teleportation_test.cpp @@ -23,7 +23,7 @@ typedef Polyhedron::Halfedge_handle Halfedge_handle; typedef boost::property_map::type Vertex_point_map; typedef boost::associative_property_map > Facet_proxy_map; -typedef CGAL::VSA_approximation L21_approx; +typedef CGAL::Variational_shape_approximation L21_approx; typedef L21_approx::Error_metric L21_metric; typedef L21_approx::Proxy Plane_proxies;