From 99e09bba7a58e5b4cec6b13e32b01dfad91ba608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 4 Sep 2018 15:38:37 +0200 Subject: [PATCH] use uppercase for enums and rephrasing --- .../NamedParameters.txt | 6 +-- .../vsa_approximation_example.cpp | 2 +- .../vsa_class_interface_example.cpp | 2 +- .../vsa_isotropic_metric_example.cpp | 2 +- .../vsa_simple_approximation_example.cpp | 2 +- .../include/CGAL/VSA/approximate_mesh.h | 40 +++++++------- .../CGAL/Variational_shape_approximation.h | 53 ++++++++++--------- .../vsa_approximation_test.cpp | 2 +- .../vsa_class_interface_test.cpp | 6 +-- .../vsa_correctness_test.cpp | 2 +- .../vsa_error_decrease_test.cpp | 2 +- .../vsa_meshing_manifold_test.cpp | 2 +- .../vsa_metric_test.cpp | 2 +- .../vsa_segmentation_test.cpp | 2 +- .../vsa_teleportation_test.cpp | 2 +- 15 files changed, 64 insertions(+), 63 deletions(-) diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt index 8ac67c558ef..ad63e2121e0 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt @@ -72,13 +72,13 @@ typename CGAL::Kernel_traits< \cgalNPBegin{verbose_level} \anchor VSA_verbose_level set the verbose level of the function.\n \b Type : \c CGAL::VSA::Verbose_level \n -\b Default value is `CGAL::VSA::Silent` +\b Default value is `CGAL::VSA::SILENT` \cgalNPEnd \cgalNPBegin{seeding_method} \anchor VSA_seeding_method the selection of seeding method.\n \b Type : \c CGAL::VSA::Seeding_method \n -\b Default value is `CGAL::VSA::Seeding_method::Hierarchical` +\b Default value is `CGAL::VSA::Seeding_method::HIERARCHICAL` \cgalNPEnd \cgalNPBegin{max_nb_of_proxies} \anchor VSA_max_nb_of_proxies @@ -111,7 +111,7 @@ the number of partitioning and fitting iterations after seeding.\n \cgalNPTableBegin \cgalNPBegin{subdivision_ratio} \anchor VSA_subdivision_ratio -the chord subdivision ratio threshold used by the meshing step.\n +the chord subdivision ratio threshold used in the meshing step.\n \b Type : `GeomTraits::FT` \n \b Default value is `5.0` \cgalNPEnd diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_example.cpp index 99721b98d00..664fb41bd5d 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_example.cpp @@ -25,7 +25,7 @@ int main() // free function interface with named parameters bool is_manifold = CGAL::VSA::approximate_mesh(input, - CGAL::VSA::parameters::seeding_method(CGAL::VSA::Hierarchical). // hierarchical seeding + CGAL::VSA::parameters::seeding_method(CGAL::VSA::HIERARCHICAL). // hierarchical seeding max_nb_of_proxies(200). // seeding with maximum number of proxies nb_of_iterations(30). // number of clustering iterations after seeding anchors(std::back_inserter(anchors)). // anchor vertices 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 0e3f6a040da..db794487d28 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 @@ -34,7 +34,7 @@ int main() error_metric); // seeds 100 random proxies - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Random) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::RANDOM) .max_nb_of_proxies(100)); // runs 30 iterations 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 46465185426..4b4fc6b511c 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 @@ -100,7 +100,7 @@ int main() error_metric); // approximates via 200 proxies and 30 iterations - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Hierarchical) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::HIERARCHICAL) .max_nb_of_proxies(200)); approx.run(30); diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_simple_approximation_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_simple_approximation_example.cpp index bd60e362301..2c93b9a0068 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_simple_approximation_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_simple_approximation_example.cpp @@ -21,7 +21,7 @@ int main() // free function interface with named parameters CGAL::VSA::approximate_mesh(input, - CGAL::VSA::parameters::verbose_level(CGAL::VSA::Main_steps). + CGAL::VSA::parameters::verbose_level(CGAL::VSA::MAIN_STEPS). max_nb_of_proxies(200). anchors(std::back_inserter(anchors)). // anchor points triangles(std::back_inserter(triangles))); // indexed triangles diff --git a/Surface_mesh_approximation/include/CGAL/VSA/approximate_mesh.h b/Surface_mesh_approximation/include/CGAL/VSA/approximate_mesh.h index 091681e4c65..53e18598340 100644 --- a/Surface_mesh_approximation/include/CGAL/VSA/approximate_mesh.h +++ b/Surface_mesh_approximation/include/CGAL/VSA/approximate_mesh.h @@ -23,11 +23,11 @@ namespace VSA { /// @brief Verbose level enumeration. enum Verbose_level { /// Silent - Silent, + SILENT, /// Main steps - Main_steps, + MAIN_STEPS, /// Verbose - Verbose + VERBOSE }; // the named parameter header being not documented the doc is put here for now @@ -81,9 +81,9 @@ unspecified_type all_default(); * \cgalParamBegin{relative_to_chord} if `true` the `subdivision_ratio` is the ratio of the * furthest vertex distance to the chord length, otherwise is the average edge length. * \cgalParamEnd - * \cgalParamBegin{with_dihedral_angle} if `true` the `subdivision_ratio` is weighted by dihedral angle, `false` otherwise. + * \cgalParamBegin{with_dihedral_angle} if set to `true` the `subdivision_ratio` is weighted by dihedral angle. * \cgalParamEnd - * \cgalParamBegin{optimize_anchor_location} if `true` optimize the anchor locations, `false` otherwise. + * \cgalParamBegin{optimize_anchor_location} if set to `true`, optimize the anchor locations. * \cgalParamEnd * \cgalParamBegin{pca_plane} set `true` if use PCA plane fitting, otherwise use the default area averaged plane parameters. * \cgalParamEnd @@ -120,9 +120,9 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) typedef typename L21_approx::Error_metric L21_metric; const Verbose_level vl = choose_param( - get_param(np, vsa_np::verbose_level), CGAL::VSA::Silent); + get_param(np, vsa_np::verbose_level), CGAL::VSA::SILENT); - if (vl == CGAL::VSA::Main_steps || vl == CGAL::VSA::Verbose) { + if (vl == CGAL::VSA::MAIN_STEPS || vl == CGAL::VSA::VERBOSE) { std::cout << "Variational shape approximation:" << "\n#f " << num_faces(tm) << "\n#v " << num_vertices(tm) << std::endl; @@ -133,16 +133,16 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) // hierarchical seeding by default CGAL::VSA::Seeding_method method = choose_param( - get_param(np, vsa_np::seeding_method), CGAL::VSA::Hierarchical); + get_param(np, vsa_np::seeding_method), CGAL::VSA::HIERARCHICAL); boost::optional max_nb_of_proxies = choose_param( get_param(np, vsa_np::max_nb_of_proxies), boost::optional()); boost::optional min_error_drop = choose_param( get_param(np, vsa_np::min_error_drop), boost::optional()); std::size_t nb_of_relaxations = choose_param(get_param(np, vsa_np::nb_of_relaxations), 5); - if (vl == CGAL::VSA::Verbose) { - std::cout << (method == CGAL::VSA::Random ? "Random" : - (method == CGAL::VSA::Incremental ? "Incremental" : "Hierarchical")) << " seeding."; + if (vl == CGAL::VSA::VERBOSE) { + std::cout << (method == CGAL::VSA::RANDOM ? "Random" : + (method == CGAL::VSA::INCREMENTAL ? "Incremental" : "Hierarchical")) << " seeding."; std::cout << "\n#max_nb_of_proxies = " << *max_nb_of_proxies << "\n#min_error_drop = " << *min_error_drop << "\nnb_of_relaxations " << nb_of_relaxations << std::endl; @@ -150,7 +150,7 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) approx.initialize_seeds(np); - if (vl == CGAL::VSA::Main_steps || vl == CGAL::VSA::Verbose) + if (vl == CGAL::VSA::MAIN_STEPS || vl == CGAL::VSA::VERBOSE) std::cout << "Seeding done." << std::endl; // default number of iterations @@ -160,12 +160,12 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) const std::size_t nb_of_iterations = choose_param( get_param(np, vsa_np::nb_of_iterations), nb_of_iterations_default); - if (vl == CGAL::VSA::Verbose) + if (vl == CGAL::VSA::VERBOSE) std::cout << "\n#nb_of_iterations = " << nb_of_iterations << std::endl; approx.run(nb_of_iterations); - if (vl == CGAL::VSA::Main_steps || vl == CGAL::VSA::Verbose) { + if (vl == CGAL::VSA::MAIN_STEPS || vl == CGAL::VSA::VERBOSE) { std::cout << "Approximation done." << "\n#proxies = " << approx.proxies_size() << std::endl; } @@ -180,7 +180,7 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) vsa_np::face_proxy_map_helper(approx, fproxymap); if (!boost::is_same::value - && (vl == CGAL::VSA::Main_steps || vl == CGAL::VSA::Verbose)) + && (vl == CGAL::VSA::MAIN_STEPS || vl == CGAL::VSA::VERBOSE)) std::cout << "Filling face proxy map done." << std::endl; // get proxies @@ -193,7 +193,7 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) vsa_np::proxies_helper(approx, pxies_out_itr); if (!boost::is_same::value - && (vl == CGAL::VSA::Main_steps || vl == CGAL::VSA::Verbose)) + && (vl == CGAL::VSA::MAIN_STEPS || vl == CGAL::VSA::VERBOSE)) std::cout << "Get proxies done." << std::endl; // meshing @@ -209,7 +209,7 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) bool is_manifold = false; if (!boost::is_same::value || !boost::is_same::value) { - if (vl == CGAL::VSA::Verbose) { + if (vl == CGAL::VSA::VERBOSE) { const FT subdivision_ratio = choose_param(get_param(np, vsa_np::subdivision_ratio), FT(5.0)); const bool relative_to_chord = choose_param(get_param(np, vsa_np::relative_to_chord), false); const bool with_dihedral_angle = choose_param(get_param(np, vsa_np::with_dihedral_angle), false); @@ -225,7 +225,7 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) is_manifold = approx.extract_mesh(np); - if (vl == CGAL::VSA::Main_steps || vl == CGAL::VSA::Verbose) + if (vl == CGAL::VSA::MAIN_STEPS || vl == CGAL::VSA::VERBOSE) std::cout << "Meshing done.\n" << (is_manifold ? "Can" : "Cannot") << " be built into 2-manifold surface." << std::endl; } @@ -236,7 +236,7 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) vsa_np::anchors_helper(approx, apts_out_itr); if (!boost::is_same::value - && (vl == CGAL::VSA::Main_steps || vl == CGAL::VSA::Verbose)) + && (vl == CGAL::VSA::MAIN_STEPS || vl == CGAL::VSA::VERBOSE)) std::cout << "Get anchors done." << std::endl; // get indexed triangles @@ -245,7 +245,7 @@ bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) vsa_np::triangles_helper(approx, tris_out_itr); if (!boost::is_same::value - && (vl == CGAL::VSA::Main_steps || vl == CGAL::VSA::Verbose)) + && (vl == CGAL::VSA::MAIN_STEPS || vl == CGAL::VSA::VERBOSE)) std::cout << "Get indexed triangles done." << std::endl; return is_manifold; diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 5fa5fabc556..c3989dbc906 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -51,16 +51,17 @@ namespace VSA { /// @brief Seeding method enumeration for Variational Shape Approximation algorithm. enum Seeding_method { /// Random seeding - Random, + RANDOM, /// Incremental seeding - Incremental, + INCREMENTAL, /// Hierarchical seeding - Hierarchical + HIERARCHICAL }; } // namespace VSA /// \ingroup PkgTSMA -/// @brief Main class for Variational Shape Approximation algorithm described in \cgalCite{cgal:cad-vsa-04}. +/// @brief Main class for Variational Shape Approximation algorithm. +/// It is based on \cgalCite{cgal:cad-vsa-04}. For simple use cases, the function `CGAL::VSA::approximate_mesh()` might be sufficient. /// @tparam TriangleMesh a model of `FaceListGraph` /// @tparam VertexPointMap a `ReadablePropertyMap` with `boost::graph_traits::%vertex_descriptor` as key and `GeomTraits::Point_3` as value type /// @tparam ErrorMetricProxy a model of `ErrorMetricProxy` @@ -343,7 +344,7 @@ public: namespace vsa_np = CGAL::VSA::internal_np; const CGAL::VSA::Seeding_method method = choose_param( - get_param(np, vsa_np::seeding_method), CGAL::VSA::Hierarchical); + get_param(np, vsa_np::seeding_method), CGAL::VSA::HIERARCHICAL); const boost::optional max_nb_of_proxies = choose_param( get_param(np, vsa_np::max_nb_of_proxies), boost::optional()); const boost::optional min_error_drop = choose_param( @@ -364,11 +365,11 @@ public: if (max_nb_of_proxies && *max_nb_of_proxies < nb_px && *max_nb_of_proxies > 0) max_nb_px_adjusted = *max_nb_of_proxies; switch (method) { - case VSA::Random: + case VSA::RANDOM: return init_random_error(max_nb_px_adjusted, *min_error_drop, nb_of_relaxations); - case VSA::Incremental: + case VSA::INCREMENTAL: return init_incremental_error(max_nb_px_adjusted, *min_error_drop, nb_of_relaxations); - case VSA::Hierarchical: + case VSA::HIERARCHICAL: return init_hierarchical_error(max_nb_px_adjusted, *min_error_drop, nb_of_relaxations); default: return 0; @@ -377,11 +378,11 @@ public: else if (max_nb_of_proxies && *max_nb_of_proxies < nb_px && *max_nb_of_proxies > 0) { // no valid min_error_drop provided, only max_nb_of_proxies switch (method) { - case VSA::Random: + case VSA::RANDOM: return init_random(*max_nb_of_proxies, nb_of_relaxations); - case VSA::Incremental: + case VSA::INCREMENTAL: return init_incremental(*max_nb_of_proxies, nb_of_relaxations); - case VSA::Hierarchical: + case VSA::HIERARCHICAL: return init_hierarchical(*max_nb_of_proxies, nb_of_relaxations); default: return 0; @@ -391,11 +392,11 @@ public: // both parameters are unspecified or out of range const FT e(0.1); switch (method) { - case VSA::Random: + case VSA::RANDOM: return init_random_error(nb_px, e, nb_of_relaxations); - case VSA::Incremental: + case VSA::INCREMENTAL: return init_incremental_error(nb_px, e, nb_of_relaxations); - case VSA::Hierarchical: + case VSA::HIERARCHICAL: return init_hierarchical_error(nb_px, e, nb_of_relaxations); default: return 0; @@ -422,13 +423,13 @@ public: } /*! - * @brief Calls `run` while error decrease is greater than the threshold. + * @brief Calls `run` while error decrease is greater than `cvg_threshold`. * @param cvg_threshold the percentage of error change between two successive runs, * should be in range (0, 1). * @param max_iterations maximum number of iterations allowed * @param avg_interval size of error average interval to have smoother convergence curve, * if 0 is assigned, 1 is used instead. - * @return `true` if converged before hitting the maximum iterations, `false` otherwise + * @return `true` if converged before hitting the maximum iterations. */ bool run_to_convergence(const FT cvg_threshold, const std::size_t max_iterations = 100, @@ -697,7 +698,7 @@ public: * @param if_test set `true` to activate the merge test. * The merge test is considered successful if the merged error change * is lower than half of the maximum proxy error. - * @return `true` if best merge pair found, `false` otherwise. + * @return `true` if best merge pair found, and `false` otherwise. */ bool find_best_merge(std::size_t &px_tobe_enlarged, std::size_t &px_tobe_merged, @@ -764,7 +765,7 @@ public: * @param px_idx proxy index. * @param n number of split sections. * @param nb_of_relaxations number of relaxation on the confined proxy area. (DEFINE CONFINED) - * @return `true` if split succeeds, `false` otherwise. + * @return `true` if split succeeds, and `false` otherwise. */ bool split(const std::size_t px_idx, const std::size_t n = 2, @@ -823,7 +824,7 @@ public: * @tparam NamedParameters a sequence of \ref vsa_namedparameters * * @param np optional sequence of \ref vsa_namedparameters among the ones listed below - * @return `true` if the extracted surface mesh is manifold, `false` otherwise. + * @return `true` if the extracted surface mesh is manifold, and `false` otherwise. * * \cgalNamedParamsBegin{Meshing Named Parameters} * \cgalParamBegin{subdivision_ratio} chord subdivision ratio threshold to the chord length or average edge length. @@ -831,9 +832,9 @@ public: * \cgalParamBegin{relative_to_chord} set `true` if the subdivision_ratio is the ratio of the * furthest vertex distance to the chord length, or to the average edge length otherwise. * \cgalParamEnd - * \cgalParamBegin{with_dihedral_angle} set `true` if subdivision_ratio is weighted by dihedral angle, `false` otherwise. + * \cgalParamBegin{with_dihedral_angle} set `true` if subdivision_ratio is weighted by dihedral angle. * \cgalParamEnd - * \cgalParamBegin{optimize_anchor_location} set `true` if optimize the anchor locations, `false` otherwise. + * \cgalParamBegin{optimize_anchor_location} if set to `true`, optimize the anchor locations. * \cgalParamEnd * \cgalParamBegin{pca_plane} set `true` if use PCA plane fitting, otherwise use the default area averaged plane parameters. * \cgalParamEnd @@ -1299,7 +1300,7 @@ private: /*! * @brief Adds a proxy seed at the face with the maximum fitting error. - * @return `true` add successfully, `false` otherwise + * @return `true` if add is successfully, and `false` otherwise */ bool add_to_furthest_proxy() { #ifdef CGAL_SURFACE_MESH_APPROXIMATION_DEBUG @@ -1409,7 +1410,7 @@ private: * @brief Picks a number of non-seed faces into an empty vector randomly. * @param nb_requested requested number of faces * @param[out] picked_faces shuffled faces vector - * @return `true` if requested number of faces are selected, `false` otherwise + * @return `true` if the requested number of faces are selected, and `false` otherwise */ bool random_pick_non_seed_faces(const std::size_t nb_requested, std::vector &picked_faces) { @@ -1561,7 +1562,7 @@ private: * @param subdivision_ratio boundary chord approximation recursive split creterion * @param relative_to_chord set `true` if the subdivision_ratio is relative to the chord length (relative sense), * otherwise it's relative to the average edge length (absolute sense). - * @param with_dihedral_angle set `true` if add dihedral angle weight to the distance, `false` otherwise + * @param with_dihedral_angle if set to `true`, add dihedral angle weight to the distance. */ void find_edges(const FT subdivision_ratio, const bool relative_to_chord, @@ -1855,7 +1856,7 @@ private: * @param subdivision_ratio the chord recursive split error threshold * @param relative_to_chord set `true` if the subdivision_ratio is relative to the the chord length (relative sense), * otherwise it's relative to the average edge length (absolute sense). - * @param with_dihedral_angle set `true` if add dihedral angle weight to the distance, `false` otherwise + * @param with_dihedral_angle if set to `true` add dihedral angle weight to the distance. * @return the number of anchors of the chord apart from the first one */ std::size_t subdivide_chord( @@ -2045,7 +2046,7 @@ private: * if the indexed triangle surface is manifold. * @tparam PolyhedronSurface should be `CGAL::Polyhedron_3` * @param[out] poly input polyhedorn mesh - * @return `true` if build manifold surface successfully, `false` otherwise + * @return `true` if build manifold surface successfully, and `false` otherwise */ template bool build_polyhedron_surface(PolyhedronSurface &poly) { diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_approximation_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_approximation_test.cpp index f58404ea58f..8e4aac4d684 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_approximation_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_approximation_test.cpp @@ -30,7 +30,7 @@ int main() std::vector > triangles; CGAL::VSA::approximate_mesh(mesh, - CGAL::VSA::parameters::seeding_method(CGAL::VSA::Incremental). + CGAL::VSA::parameters::seeding_method(CGAL::VSA::INCREMENTAL). max_nb_of_proxies(6). nb_of_iterations(30). nb_of_relaxations(5). 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 0bc3ac7b4ab..7c4fd4bd9b7 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 @@ -52,7 +52,7 @@ int main() // random seeding and run std::cout << "random seeding and run" << std::endl; - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Random) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::RANDOM) .max_nb_of_proxies(10)); approx.run(10); if (approx.proxies_size() != 10) @@ -121,14 +121,14 @@ int main() const FT drop(0.001); const std::size_t iterations = 5; std::cout << "re-initialize and hierarchical seeding" << std::endl; - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Hierarchical) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::HIERARCHICAL) .min_error_drop(drop) .nb_of_relaxations(iterations)); approx.run(10); std::cout << "#proxies " << approx.proxies_size() << std::endl; std::cout << "re-initialize and incremental seeding" << std::endl; - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Incremental) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::INCREMENTAL) .min_error_drop(drop) .nb_of_relaxations(iterations)); approx.run(10); 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 ec5cfb8e2bf..ed4a23d56aa 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 @@ -38,7 +38,7 @@ bool test_shape(const char *file_name, const std::size_t target_num_proxies) const FT drop(1e-8); const std::size_t num_iterations = 20; const std::size_t inner_iterations = 10; - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Incremental) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::INCREMENTAL) .min_error_drop(drop) .nb_of_relaxations(inner_iterations)); approx.run(num_iterations); 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 e26f65d1b42..8a1aef53194 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 @@ -49,7 +49,7 @@ int main() get(boost::vertex_point, const_cast(mesh)), error_metric); - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Random) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::RANDOM) .max_nb_of_proxies(100)); std::vector error; for (std::size_t i = 0; i < 30; ++i) { 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 221d642aa41..b7200a43cfe 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 @@ -36,7 +36,7 @@ bool test_manifold(const char *file_name, const FT drop = FT(1e-8)) // approximation, seeding from error, drop to the target error incrementally const std::size_t num_iterations = 20; const std::size_t inner_iterations = 5; - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Incremental) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::INCREMENTAL) .min_error_drop(drop) .nb_of_relaxations(inner_iterations)); approx.run(num_iterations); 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 668675f4b6c..5ada5b9b877 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 @@ -99,7 +99,7 @@ int main() error_metric); std::cout << "random seeding and run" << std::endl; - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Random) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::RANDOM) .max_nb_of_proxies(20)); approx.run(20); if (approx.proxies_size() != 20) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_segmentation_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_segmentation_test.cpp index c6e3cebfff3..ab5f478292e 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_segmentation_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_segmentation_test.cpp @@ -32,7 +32,7 @@ int main() // free function interface with named parameters CGAL::VSA::approximate_mesh(input, - CGAL::VSA::parameters::seeding_method(CGAL::VSA::Hierarchical). // hierarchical seeding + CGAL::VSA::parameters::seeding_method(CGAL::VSA::HIERARCHICAL). // hierarchical seeding max_nb_of_proxies(200). // both maximum number of proxies stop criterion, min_error_drop(0.05). // and minimum error drop stop criterion are specified nb_of_iterations(30). // number of clustering iterations after seeding 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 cb24a27142f..39366a242d8 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 @@ -67,7 +67,7 @@ int main() std::cout << "Random seeding by number." << std::endl; std::srand(static_cast(std::time(0))); - approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::Random) + approx.initialize_seeds(CGAL::VSA::parameters::seeding_method(CGAL::VSA::RANDOM) .max_nb_of_proxies(50)); if (approx.proxies_size() != 50) return EXIT_FAILURE;