diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h index b78d97f5af8..9e445ff07a9 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h @@ -38,8 +38,8 @@ protected: public: Generic_facegraph_builder(std::istream& in_) : m_is(in_) { } - template - bool operator()(Graph& g, const NamedParameters& np) + template + bool operator()(Graph& g, const NamedParameters& np = parameters::use_default_values()) { typedef typename GetK::Kernel Kernel; typedef typename Kernel::Vector_3 Vector; @@ -154,8 +154,6 @@ public: return is_valid(g); } - bool operator()(Graph& g) { return operator()(g, parameters::all_default()); } - protected: std::istream& m_is; diff --git a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h index c78861a855d..10dbf061a37 100644 --- a/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h +++ b/BGL/include/CGAL/boost/graph/IO/Generic_facegraph_printer.h @@ -88,9 +88,9 @@ public: Generic_facegraph_printer(Stream& os) : m_os(os) { } Generic_facegraph_printer(Stream& os, FileWriter writer) : m_os(os), m_writer(writer) { } - template + template bool operator()(const Graph& g, - const NamedParameters& np) + const NamedParameters& np = parameters::use_default_values()) { typedef typename GetVertexPointMap::const_type VPM; typedef typename boost::property_traits::reference Point_ref; @@ -193,8 +193,6 @@ public: return m_os.good(); } - bool operator()(const Graph& g) { return operator()(g, parameters::all_default()); } - protected: Stream& m_os; FileWriter m_writer; diff --git a/BGL/include/CGAL/boost/graph/IO/INP.h b/BGL/include/CGAL/boost/graph/IO/INP.h index 9194174dd9b..5c12b889441 100644 --- a/BGL/include/CGAL/boost/graph/IO/INP.h +++ b/BGL/include/CGAL/boost/graph/IO/INP.h @@ -32,7 +32,7 @@ bool write_INP(std::ostream& os, const std::string& name, const std::string& type, const Graph& g, - const CGAL_BGL_NP_CLASS& np) + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; @@ -80,24 +80,12 @@ template bool write_INP(const std::string& fname, const std::string& type, const Graph& g, - const CGAL_BGL_NP_CLASS& np) + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() ) { std::ofstream os(fname); return write_INP(os, fname, type, g, np); } -template -bool write_INP(std::ostream& os, const std::string& name, const std::string& type, const Graph& g) -{ - return write_INP(os, name, type, g, parameters::all_default()); -} - -template -bool write_INP(const std::string& fname, const std::string& type, const Graph& g) -{ - return write_INP(fname, type, g, parameters::all_default()); -} - #ifndef CGAL_NO_DEPRECATED_CODE template CGAL_DEPRECATED bool write_inp(std::ostream& os, diff --git a/BGL/include/CGAL/boost/graph/IO/OBJ.h b/BGL/include/CGAL/boost/graph/IO/OBJ.h index 0ffe48c5f49..84262d3d056 100644 --- a/BGL/include/CGAL/boost/graph/IO/OBJ.h +++ b/BGL/include/CGAL/boost/graph/IO/OBJ.h @@ -107,7 +107,7 @@ template bool read_OBJ(std::istream& is, Graph& g, - const CGAL_BGL_NP_CLASS& np + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() #ifndef DOXYGEN_RUNNING , typename boost::disable_if >::type* = nullptr #endif @@ -120,17 +120,6 @@ bool read_OBJ(std::istream& is, return builder(g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool read_OBJ(std::istream& is, Graph& g, - typename boost::disable_if >::type* = nullptr) -{ - return read_OBJ(is, g, parameters::all_default()); -} - -/// \endcond - /*! \ingroup PkgBGLIoFuncsOBJ @@ -174,7 +163,7 @@ template bool read_OBJ(const std::string& fname, Graph& g, - const CGAL_BGL_NP_CLASS& np + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() #ifndef DOXYGEN_RUNNING , typename boost::disable_if >::type* = nullptr #endif @@ -185,17 +174,6 @@ bool read_OBJ(const std::string& fname, return read_OBJ(is, g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool read_OBJ(const std::string& fname, Graph& g, - typename boost::disable_if >::type* = nullptr) -{ - return read_OBJ(fname, g, parameters::all_default()); -} - -/// \endcond - //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // Write @@ -237,7 +215,7 @@ template bool write_OBJ(std::ostream& os, const Graph& g, - const CGAL_BGL_NP_CLASS& np + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() #ifndef DOXYGEN_RUNNING , typename boost::disable_if >::type* = nullptr #endif @@ -247,17 +225,6 @@ bool write_OBJ(std::ostream& os, return printer(g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool write_OBJ(std::ostream& os, const Graph& g, - typename boost::disable_if >::type* = nullptr) -{ - return write_OBJ(os, g, parameters::all_default()); -} - -/// \endcond - /*! \ingroup PkgBGLIoFuncsOBJ @@ -294,7 +261,7 @@ template bool write_OBJ(const std::string& fname, const Graph& g, - const CGAL_BGL_NP_CLASS& np + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() #ifndef DOXYGEN_RUNNING , typename boost::disable_if >::type* = nullptr #endif @@ -305,17 +272,6 @@ bool write_OBJ(const std::string& fname, return write_OBJ(os, g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool write_OBJ(const std::string& fname, const Graph& g, - typename boost::disable_if >::type* = nullptr) -{ - return write_OBJ(fname, g, parameters::all_default()); -} - -/// \endcond - }} // namespace CGAL::IO #endif // CGAL_BGL_IO_OBJ_H diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index 1d5516ef4a2..2603b51b821 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -153,7 +153,7 @@ template bool read_OFF(std::istream& is, Graph& g, - const CGAL_BGL_NP_CLASS& np + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() #ifndef DOXYGEN_RUNNING , typename boost::disable_if >::type* = nullptr #endif @@ -162,17 +162,6 @@ bool read_OFF(std::istream& is, return internal::read_OFF_BGL(is, g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool read_OFF(std::istream& is, Graph& g, - typename boost::disable_if >::type* = nullptr) -{ - return read_OFF(is, g, parameters::all_default()); -} - -/// \endcond - /*! \ingroup PkgBGLIoFuncsOFF @@ -248,7 +237,7 @@ template bool read_OFF(const std::string& fname, Graph& g, - const CGAL_BGL_NP_CLASS& np + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() #ifndef DOXYGEN_RUNNING , typename boost::disable_if >::type* = nullptr #endif @@ -258,17 +247,6 @@ bool read_OFF(const std::string& fname, return read_OFF(is, g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool read_OFF(const std::string& fname, Graph& g, - typename boost::disable_if >::type* = nullptr) -{ - return read_OFF(fname, g, parameters::all_default()); -} - -/// \endcond - } // namespace IO #ifndef CGAL_NO_DEPRECATED_CODE @@ -279,7 +257,7 @@ bool read_OFF(const std::string& fname, Graph& g, \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF()` should be used instead. */ template -CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g, const CGAL_BGL_NP_CLASS& np) +CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { return IO::read_OFF(is, g, np); } @@ -290,29 +268,11 @@ CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g, const CGAL_BGL_NP_CLAS \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF()` should be used instead. */ template -CGAL_DEPRECATED bool read_off(const char* fname, Graph& g, const CGAL_BGL_NP_CLASS& np) +CGAL_DEPRECATED bool read_off(const char* fname, Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { return IO::read_OFF(fname, g, np); } -template -CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g) -{ - return read_off(is, g, parameters::all_default()); -} - -template -CGAL_DEPRECATED bool read_off(const char* fname, Graph& g) -{ - return read_off(fname, g, parameters::all_default()); -} - -template -CGAL_DEPRECATED bool read_off(const std::string& fname, Graph& g) -{ - return read_off(fname.c_str(), g, parameters::all_default()); -} - #endif // CGAL_NO_DEPRECATED_CODE //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -398,7 +358,7 @@ template bool write_OFF(std::ostream& os, const Graph& g, - const CGAL_BGL_NP_CLASS& np + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() #ifndef DOXYGEN_RUNNING , typename boost::disable_if >::type* = nullptr #endif @@ -407,17 +367,6 @@ bool write_OFF(std::ostream& os, return internal::write_OFF_BGL(os, g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool write_OFF(std::ostream& os, const Graph& g, - typename boost::disable_if >::type* = nullptr) -{ - return write_OFF(os, g, parameters::all_default()); -} - -/// \endcond - /*! \ingroup PkgBGLIoFuncsOFF @@ -483,7 +432,7 @@ template bool write_OFF(const std::string& fname, const Graph& g, - const CGAL_BGL_NP_CLASS& np + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values() #ifndef DOXYGEN_RUNNING , typename boost::disable_if >::type* = nullptr #endif @@ -499,17 +448,6 @@ bool write_OFF(const std::string& fname, return write_OFF(os, g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool write_OFF(const std::string& fname, const Graph& g, - typename boost::disable_if >::type* = nullptr) -{ - return write_OFF(fname, g, parameters::all_default()); -} - -/// \endcond - } // namespace IO #ifndef CGAL_NO_DEPRECATED_CODE @@ -520,32 +458,22 @@ bool write_OFF(const std::string& fname, const Graph& g, \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF()` should be used instead. */ template -CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np) +CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { return IO::write_OFF(os, g, np); } -template -CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g) -{ - return write_off(os, g, CGAL::parameters::all_default()); -} /*! \ingroup PkgBGLIOFctDeprecated \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF()` should be used instead. */ template -CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g, const CGAL_BGL_NP_CLASS& np) +CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { return IO::write_OFF(fname, g, np); } -template -CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g) -{ - return write_off(fname, g, parameters::all_default()); -} #endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/IO/STL.h b/BGL/include/CGAL/boost/graph/IO/STL.h index d7bfdec82a6..099216010f9 100644 --- a/BGL/include/CGAL/boost/graph/IO/STL.h +++ b/BGL/include/CGAL/boost/graph/IO/STL.h @@ -158,7 +158,7 @@ bool read_STL(std::istream& is, template bool read_STL(const std::string& fname, Graph& g, const - CGAL_BGL_NP_CLASS& np) + CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { using parameters::choose_parameter; using parameters::get_parameter; @@ -185,15 +185,6 @@ bool read_STL(const std::string& fname, return read_STL(is, g, CGAL::parameters::use_binary_mode(false).vertex_point_map(vpm).verbose(v)); } -/// \cond SKIP_IN_MANUAL - -template -bool read_STL(std::istream& is, Graph& g) { return read_STL(is, g, parameters::all_default()); } -template -bool read_STL(const std::string& fname, Graph& g) { return read_STL(fname, g, parameters::all_default()); } - -/// \endcond - //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // Write @@ -354,7 +345,7 @@ bool write_STL(std::ostream& os, \sa Overloads of this function for specific models of the concept `FaceGraph`. */ template -bool write_STL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np) +bool write_STL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { const bool binary = CGAL::parameters::choose_parameter(CGAL::parameters::get_parameter(np, internal_np::use_binary_mode), true); if(binary) @@ -372,15 +363,6 @@ bool write_STL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS } } -/// \cond SKIP_IN_MANUAL - -template -bool write_STL(std::ostream& os, const Graph& g) { return write_STL(os, g, parameters::all_default()); } -template -bool write_STL(const std::string& fname, const Graph& g) { return write_STL(fname, g, parameters::all_default()); } - -/// \endcond - }} // namespace CGAL::IO #endif // CGAL_BGL_IO_STL_H diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index 54f32e59b03..5734496e985 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -143,7 +143,7 @@ template bool read_VTP(const std::string& fname, Graph& g, - const CGAL_BGL_NP_CLASS& np) + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { std::ifstream test(fname); if(!test.good()) @@ -162,13 +162,6 @@ bool read_VTP(const std::string& fname, return internal::vtkPointSet_to_polygon_mesh(data, g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool read_VTP(const std::string& fname, Graph& g) { return read_VTP(fname, g, parameters::all_default()); } - -/// \endcond - //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // Write @@ -422,7 +415,7 @@ void write_polys_points(std::ostream& os, template bool write_VTP(std::ostream& os, const Graph& g, - const CGAL_BGL_NP_CLASS& np) + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { using parameters::get_parameter; using parameters::choose_parameter; @@ -519,7 +512,7 @@ bool write_VTP(std::ostream& os, * \returns `true` if writing was successful, `false` otherwise. */ template -bool write_VTP(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np) +bool write_VTP(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { const bool binary = CGAL::parameters::choose_parameter(CGAL::parameters::get_parameter(np, internal_np::use_binary_mode), true); std::ofstream os; @@ -533,14 +526,6 @@ bool write_VTP(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS return write_VTP(os, g, np); } -/// \cond SKIP_IN_MANUAL - -template -bool write_VTP(std::ostream& os, const Graph& g) { return write_VTP(os, g, CGAL::parameters::all_default()); } -template -bool write_VTP(const std::string& fname, const Graph& g) { return write_VTP(fname, g, parameters::all_default()); } - -/// \endcond } // namespace IO @@ -552,17 +537,11 @@ bool write_VTP(const std::string& fname, const Graph& g) { return write_VTP(fnam \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_VTP()` should be used instead. */ template -CGAL_DEPRECATED bool write_vtp(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np) +CGAL_DEPRECATED bool write_vtp(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { return IO::write_VTP(os, g, np); } -template -CGAL_DEPRECATED bool write_vtp(std::ostream& os, const Graph& g) -{ - return write_vtp(os, g, parameters::all_default()); -} - #endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/IO/WRL.h b/BGL/include/CGAL/boost/graph/IO/WRL.h index 26ea7f47ef6..d8804300f6e 100644 --- a/BGL/include/CGAL/boost/graph/IO/WRL.h +++ b/BGL/include/CGAL/boost/graph/IO/WRL.h @@ -64,7 +64,7 @@ namespace IO { template bool write_WRL(std::ostream& os, const Graph& g, - const CGAL_BGL_NP_CLASS& np) + const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { CGAL::VRML_2_ostream vos(os); internal::Generic_facegraph_printer printer(vos); @@ -103,17 +103,12 @@ bool write_WRL(std::ostream& os, \returns `true` if writing was successful, `false` otherwise. */ template -bool write_WRL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np) +bool write_WRL(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { std::ofstream os(fname); return write_WRL(os, g, np); } -template -bool write_WRL(std::ostream& os, const Graph& g) { return write_WRL(os, g, parameters::all_default()); } -template -bool write_WRL(const std::string& fname, const Graph& g) { return write_WRL(fname, g, parameters::all_default()); } - } // namespace IO #ifndef CGAL_NO_DEPRECATED_CODE @@ -124,17 +119,11 @@ bool write_WRL(const std::string& fname, const Graph& g) { return write_WRL(fnam \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_WRL()` should be used instead. */ template -CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np) +CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np = parameters::use_default_values()) { return IO::write_WRL(os, g, np); } -template -CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g) -{ - return write_wrl(os, g, parameters::all_default()); -} - #endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h b/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h index 958982f28b0..e903ca45557 100644 --- a/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h +++ b/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h @@ -36,10 +36,10 @@ namespace IO { //not for now : some readers will return "ok" despite not managing to read anything /* -template +template bool read_polygon_mesh(std::istream& is, Graph& g, - const NamedParameters& np) + const NamedParameters& np = parameters::use_default_values()) { bool ok = false; ok = read_OFF(is, g, np, false); @@ -70,12 +70,6 @@ bool read_polygon_mesh(std::istream& is, return ok; } -template -bool read_polygon_mesh(std::istream& is, - Graph& g) -{ - return read_polygon_mesh(is, g, parameters::all_default()); -} */ /*! @@ -125,10 +119,10 @@ bool read_polygon_mesh(std::istream& is, * * \sa \link PMP_IO_grp `CGAL::Polygon_mesh_processing::IO::read_polygon_mesh()`\endlink if the data is not 2-manifold */ -template +template bool read_polygon_mesh(const std::string& fname, Graph& g, - const NamedParameters& np) + const NamedParameters& np = parameters::use_default_values()) { const bool verbose = parameters::choose_parameter(parameters::get_parameter(np, internal_np::verbose), false); @@ -164,16 +158,6 @@ bool read_polygon_mesh(const std::string& fname, return false; } -/// \cond SKIP_IN_MANUAL - -template -bool read_polygon_mesh(const std::string& fname, Graph& g) -{ - return read_polygon_mesh(fname, g, parameters::all_default()); -} - -/// \endcond - //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // Write @@ -228,10 +212,10 @@ bool read_polygon_mesh(const std::string& fname, Graph& g) * * \return `true` if writing was successful, `false` otherwise. */ -template +template bool write_polygon_mesh(const std::string& fname, Graph& g, - const NamedParameters& np) + const NamedParameters& np = parameters::use_default_values()) { const bool verbose = parameters::choose_parameter(parameters::get_parameter(np, internal_np::verbose), false); @@ -267,16 +251,6 @@ bool write_polygon_mesh(const std::string& fname, return false; } -/// \cond SKIP_IN_MANUAL - -template -bool write_polygon_mesh(const std::string& fname, Graph& g) -{ - return write_polygon_mesh(fname, g, parameters::all_default()); -} - -/// \endcond - }} // namespace CGAL::IO #endif // CGAL_BOOST_GRAPH_POLYGON_MESH_IO_H diff --git a/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h b/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h index 69e31c2eb95..59f8d9ce494 100644 --- a/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h +++ b/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h @@ -184,20 +184,14 @@ void partition_dual_graph(const TriangleMesh& tm, int nparts, /// /// \pre `tm` is a pure triangular surface mesh: there are no edges /// without at least one incident face -template -void partition_dual_graph(const TriangleMesh& tm, int nparts, const NamedParameters& np) +template +void partition_dual_graph(const TriangleMesh& tm, int nparts, const NamedParameters& np = parameters::use_default_values()) { using parameters::get_parameter; return partition_dual_graph(tm, nparts, get_parameter(np, internal_np::METIS_options), np); } -template -void partition_dual_graph(const TriangleMesh& tm, const int nparts) -{ - return partition_dual_graph(tm, nparts, CGAL::parameters::all_default()); -} - } // end namespace METIS } // end namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/METIS/partition_graph.h b/BGL/include/CGAL/boost/graph/METIS/partition_graph.h index ae1058c3917..de88aece1fa 100644 --- a/BGL/include/CGAL/boost/graph/METIS/partition_graph.h +++ b/BGL/include/CGAL/boost/graph/METIS/partition_graph.h @@ -217,20 +217,14 @@ void partition_graph(const TriangleMesh& tm, int nparts, /// /// \pre `tm` is a pure triangular surface mesh: there are no edges /// without at least one incident face -template -void partition_graph(const TriangleMesh& tm, int nparts, const NamedParameters& np) +template +void partition_graph(const TriangleMesh& tm, int nparts, const NamedParameters& np = parameters::use_default_values()) { using parameters::get_parameter; return partition_graph(tm, nparts, get_parameter(np, internal_np::METIS_options), np); } -template -void partition_graph(const TriangleMesh& tm, const int nparts) -{ - return partition_graph(tm, nparts, CGAL::parameters::all_default()); -} - } // end namespace METIS } // end namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/Named_function_parameters.h b/BGL/include/CGAL/boost/graph/Named_function_parameters.h index 4d3eaffbd0e..a4fe0fe8229 100644 --- a/BGL/include/CGAL/boost/graph/Named_function_parameters.h +++ b/BGL/include/CGAL/boost/graph/Named_function_parameters.h @@ -21,9 +21,9 @@ #include #include -#define CGAL_BGL_NP_TEMPLATE_PARAMETERS T=bool, typename Tag=CGAL::internal_np::all_default_t, typename Base=CGAL::internal_np::No_property -#define CGAL_BGL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT T, typename Tag, typename Base -#define CGAL_BGL_NP_CLASS CGAL::Named_function_parameters +#define CGAL_BGL_NP_TEMPLATE_PARAMETERS NP_T=bool, typename NP_Tag=CGAL::internal_np::all_default_t, typename NP_Base=CGAL::internal_np::No_property +#define CGAL_BGL_NP_TEMPLATE_PARAMETERS_NO_DEFAULT NP_T, typename NP_Tag, typename NP_Base +#define CGAL_BGL_NP_CLASS CGAL::Named_function_parameters namespace CGAL { @@ -257,11 +257,13 @@ namespace parameters { typedef Named_function_parameters Default_named_parameters; +#ifndef CGAL_NO_DEPRECATED_CODE Default_named_parameters inline all_default() { return Default_named_parameters(); } +#endif Default_named_parameters inline use_default_values() diff --git a/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h b/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h index 308da82f6d0..63943845c54 100644 --- a/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h +++ b/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h @@ -508,12 +508,12 @@ template + typename NamedParameters = parameters::Default_named_parameters> double alpha_expansion_graphcut (const InputGraph& input_graph, EdgeCostMap edge_cost_map, VertexLabelCostMap vertex_label_cost_map, VertexLabelMap vertex_label_map, - const NamedParameters& np) + const NamedParameters& np = parameters::use_default_values()) { using parameters::choose_parameter; using parameters::get_parameter; @@ -661,22 +661,6 @@ double alpha_expansion_graphcut (const InputGraph& input_graph, } -/// \cond SKIP_IN_MANUAL -// variant with default NP -template -double alpha_expansion_graphcut (const InputGraph& input_graph, - EdgeCostMap edge_cost_map, - VertexLabelCostMap vertex_label_cost_map, - VertexLabelMap vertex_label_map) -{ - return alpha_expansion_graphcut (input_graph, edge_cost_map, - vertex_label_cost_map, vertex_label_map, - CGAL::parameters::all_default()); -} - // Old API inline double alpha_expansion_graphcut (const std::vector >& edges, const std::vector& edge_costs, diff --git a/BGL/include/CGAL/boost/graph/copy_face_graph.h b/BGL/include/CGAL/boost/graph/copy_face_graph.h index 19755ac8e46..896c37a790c 100644 --- a/BGL/include/CGAL/boost/graph/copy_face_graph.h +++ b/BGL/include/CGAL/boost/graph/copy_face_graph.h @@ -351,21 +351,12 @@ inline Emptyset_iterator make_functor(const internal_np::Param_not_found&) Other properties are not copied. */ template void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, - #ifndef DOXYGEN_RUNNING - const CGAL::Named_function_parameters& np1, - const CGAL::Named_function_parameters& np2 - #else - const NamedParameters1& np1, - const NamedParameters2& np2 - #endif + const NamedParameters1& np1 = parameters::use_default_values(), + const NamedParameters2& np2 = parameters::use_default_values() ) { using parameters::choose_parameter; @@ -384,55 +375,6 @@ void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, get(vertex_point, tm))); } -template -void copy_face_graph(const SourceMesh& sm, TargetMesh& tm) -{ - copy_face_graph(sm, tm, parameters::all_default(), parameters::all_default()); -} - -template -void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, - const CGAL::Named_function_parameters& np) -{ - copy_face_graph(sm, tm, np, parameters::all_default()); -} - -#if !defined(DOXYGEN_RUNNING) && !defined(CGAL_NO_DEPRECATED_CODE) -template -void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, - V2V v2v, H2H h2h, F2F f2f, - Src_vpm sm_vpm, Tgt_vpm tm_vpm ) -{ - internal::copy_face_graph_impl(sm, tm, - v2v, h2h, f2f, - sm_vpm, tm_vpm); -} - - -template -void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, V2V v2v) -{ copy_face_graph(sm, tm, v2v, Emptyset_iterator(), Emptyset_iterator(), - get(vertex_point, sm), get(vertex_point, tm)); } - -template -void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, V2V v2v, H2H h2h) -{ copy_face_graph(sm, tm, v2v, h2h, Emptyset_iterator(), - get(vertex_point, sm), get(vertex_point, tm)); } - -template -void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, V2V v2v, H2H h2h, F2F f2f) -{ copy_face_graph(sm, tm, v2v, h2h, f2f, - get(vertex_point, sm), get(vertex_point, tm)); } - -template -void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, V2V v2v, H2H h2h, F2F f2f, Src_vpm sm_vpm) -{ copy_face_graph(sm, tm, v2v, h2h, f2f, - sm_vpm, get(vertex_point, tm)); } -#endif - } // namespace CGAL #endif // CGAL_BOOST_GRAPH_COPY_FACE_GRAPH_H diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 1f307054cfc..cdd79c9c507 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -189,8 +189,7 @@ namespace CGAL { #define CGAL_DEF_GET_INDEX_TYPE(CTYPE, DTYPE, STYPE) \ template > \ + typename NamedParameters = parameters::Default_named_parameters> \ struct GetInitialized##CTYPE##IndexMap \ : public BGL::internal::GetInitializedIndexMap::faces_s #define CGAL_DEF_GET_INITIALIZED_INDEX_MAP(DTYPE, STYPE) \ template \ + typename NamedParameters = parameters::Default_named_parameters> \ typename BGL::internal::GetInitializedIndexMap, \ Graph, NamedParameters>::const_type \ get_initialized_##DTYPE##_index_map(const Graph& g, \ - const NamedParameters& np) \ + const NamedParameters& np = parameters::use_default_values()) \ { \ typedef BGL::internal::GetInitializedIndexMap Index_map_getter; \ return Index_map_getter::get_const(CGAL::internal_np::DTYPE##_index_t{}, g, np); \ } \ -template \ -typename BGL::internal::GetInitializedIndexMap, \ - Graph>::const_type \ -get_initialized_##DTYPE##_index_map(const Graph& g) \ -{ \ - return get_initialized_##DTYPE##_index_map(g, CGAL::parameters::all_default()); \ -} \ /* same as above, non-const version*/ \ template ::type>::value, int> = 0> \ @@ -253,7 +243,7 @@ typename BGL::internal::GetInitializedIndexMap, \ Graph, NamedParameters>::type \ get_initialized_##DTYPE##_index_map(Graph& g, \ - const NamedParameters& np) \ + const NamedParameters& np = parameters::use_default_values()) \ { \ typedef BGL::internal::GetInitializedIndexMap Index_map_getter; \ return Index_map_getter::get(CGAL::internal_np::DTYPE##_index_t{}, g, np); \ } \ -template ::type>::value, int> = 0> \ -typename BGL::internal::GetInitializedIndexMap, \ - Graph>::type \ -get_initialized_##DTYPE##_index_map(Graph& g) \ -{ \ - return get_initialized_##DTYPE##_index_map(g, CGAL::parameters::all_default()); \ -} CGAL_DEF_GET_INITIALIZED_INDEX_MAP(vertex, typename boost::graph_traits::vertices_size_type) CGAL_DEF_GET_INITIALIZED_INDEX_MAP(halfedge, typename boost::graph_traits::halfedges_size_type) diff --git a/BGL/include/CGAL/boost/graph/selection.h b/BGL/include/CGAL/boost/graph/selection.h index b63bb387efe..f76e27eb48c 100644 --- a/BGL/include/CGAL/boost/graph/selection.h +++ b/BGL/include/CGAL/boost/graph/selection.h @@ -498,13 +498,13 @@ reduce_face_selection( \cgalParamNEnd \cgalNamedParamsEnd */ -template +template void regularize_face_selection_borders( TriangleMesh& mesh, IsSelectedMap is_selected, double weight, - const NamedParameters& np) + const NamedParameters& np = parameters::use_default_values()) { using parameters::choose_parameter; using parameters::get_parameter; @@ -546,20 +546,6 @@ regularize_face_selection_borders( put(is_selected, fd, graph.labels[get(face_index_map,fd)]); } -/// \cond SKIP_IN_MANUAL -// variant with default np -template -void -regularize_face_selection_borders( - TriangleMesh& fg, - IsSelectedMap is_selected, - double weight) -{ - regularize_face_selection_borders (fg, is_selected, weight, - CGAL::parameters::all_default()); -} -/// \endcond - /// \cond SKIP_IN_MANUAL namespace experimental {