diff --git a/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h b/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h index 5e65b762f1e..fe68a977e41 100644 --- a/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h +++ b/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h @@ -9,8 +9,11 @@ * * Main differences between implementations are underlying max-flow algorithm and graph type (i.e. results are the same, performance differs). * - * For activating MAXFLOW software, define CGAL_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE. It activates Alpha_expansion_graph_cut_boykov_kolmogorov, - * and makes CGAL::internal::Surface_mesh_segmentation choose this implementation for graph-cut. + * By default, we use MAXFLOW and the class Alpha_expansion_graph_cut_boykov_kolmogorov. + * For deactivating MAXFLOW software and using boost implementation instead, define CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE. + * It deactivates Alpha_expansion_graph_cut_boykov_kolmogorov, activate boost versions + * and makes CGAL::internal::Surface_mesh_segmentation using Alpha_expansion_graph_cut_boost + * as default implementation for the graph-cut. * * Also algorithms can be used by their-own for applying alpha-expansion graph-cut on any graph. */ @@ -19,6 +22,7 @@ #include #include +#ifdef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE #include #include #if BOOST_VERSION >= 104400 // at this version kolmogorov_max_flow become depricated. @@ -26,14 +30,14 @@ #else #include #endif +#else +#include +#endif #include -//#define CGAL_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE -#ifdef CGAL_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE -#include -#endif + namespace CGAL { @@ -74,6 +78,7 @@ namespace internal // //////////////////////////////////////////////////////////////////////////////////////// +#ifdef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE /** * @brief Implements alpha-expansion graph cut algorithm. * @@ -481,7 +486,9 @@ public: return min_cut; } }; -#ifdef CGAL_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE +#endif + +#ifndef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE /** * @brief Implements alpha-expansion graph cut algorithm. * @@ -592,7 +599,7 @@ public: return min_cut; } }; -#endif //CGAL_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE +#endif //CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE }//namespace internal /// @endcond }//namespace CGAL diff --git a/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Surface_mesh_segmentation.h b/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Surface_mesh_segmentation.h index 564f5dde2ff..511df5ce3b2 100644 --- a/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Surface_mesh_segmentation.h +++ b/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Surface_mesh_segmentation.h @@ -181,7 +181,7 @@ template < class Polyhedron, class GeomTraits, bool fast_bbox_intersection = true, -#ifdef CGAL_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE +#ifndef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE class GraphCut = Alpha_expansion_graph_cut_boykov_kolmogorov, #else class GraphCut = Alpha_expansion_graph_cut_boost,