From 4cd9282f790727ed8b67b948bf5bec4e0d08b80e Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 23 Jul 2019 08:43:01 +0200 Subject: [PATCH] Start working on public API for alpha expansion --- .../Alpha_expansion_graph_cut.h | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) 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 2d25f8f4ad6..8e3c3f37d6f 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 @@ -809,5 +809,52 @@ public: #endif //CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE }//namespace internal /// @endcond + +struct Alpha_expansion_boost_adjacency_list { }; +struct Alpha_expansion_boost_compressed_sparse_row { }; +struct Alpha_expansion_MaxFlow { }; + + +template +double alpha_expansion_graph_cut (const InputGraph& input_graph, + Edge_weight_map edge_weight_map, + Vertex_index_map vertex_index_map, + Vertex_label_map vertex_label_map, + Vertex_label_probability_map vertex_label_probability_map, + const AlphaExpansionImplementation& = AlphaExpansionImplementation()) +{ + if (std::is_same::value) + return internal::Alpha_expansion_graph_cut_boost()(input_graph, + edge_weight_map, + vertex_index_map, + vertex_label_map, + vertex_label_probability_map); +} + +template +double alpha_expansion_graph_cut (const InputGraph& input_graph, + Edge_weight_map edge_weight_map, + Vertex_index_map vertex_index_map, + Vertex_label_map vertex_label_map, + Vertex_label_probability_map vertex_label_probability_map) +{ + return alpha_expansion_graph_cut + (input_graph, edge_weight_map, vertex_index_map, vertex_label_map, vertex_label_probability_map); +} + }//namespace CGAL #endif //CGAL_SURFACE_MESH_SEGMENTATION_ALPHA_EXPANSION_GRAPH_CUT_H