@@ -2368,6 +2368,32 @@ rmm::device_uvector<vertex_t> vertex_coloring(
23682368 graph_view_t <vertex_t , edge_t , false , multi_gpu> const & graph_view,
23692369 raft::random::RngState& rng_state);
23702370
2371+ /*
2372+ * @brief Approximate Weighted Matching
2373+ *
2374+ * A matching in an undirected graph G = (V, E) is a pairing of adjacent vertices
2375+ * such that each vertex is matched with at most one other vertex, the objective
2376+ * being to match as many vertices as possible or to maximise the sum of the
2377+ * weights of the matched edges. Here we provide an implementation of an
2378+ * approximation algorithm to the weighted Maximum matching. See
2379+ * https://web.archive.org/web/20081031230449id_/http://www.ii.uib.no/~fredrikm/fredrik/papers/CP75.pdf
2380+ * for further information.
2381+ *
2382+ * @tparam vertex_t Type of vertex identifiers. Needs to be an integral type.
2383+ * @tparam edge_t Type of edge identifiers. Needs to be an integral type.
2384+ * @tparam multi_gpu Flag indicating whether template instantiation should target single-GPU (false)
2385+ * @param[in] handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator,
2386+ * and handles to various CUDA libraries) to run graph algorithms.
2387+ * @param[in] graph_view Graph view object.
2388+ * @param[in] edge_weight_view View object holding edge weights for @p graph_view.
2389+ * @return A tuple of device vector of matched vertex ids and sum of the weights of the matched
2390+ * edges.
2391+ */
2392+ template <typename vertex_t , typename edge_t , typename weight_t , bool multi_gpu>
2393+ std::tuple<rmm::device_uvector<vertex_t >, weight_t > approximate_weighted_matching (
2394+ raft::handle_t const & handle,
2395+ graph_view_t <vertex_t , edge_t , false , multi_gpu> const & graph_view,
2396+ edge_property_view_t <edge_t , weight_t const *> edge_weight_view);
23712397} // namespace cugraph
23722398
23732399/* *
0 commit comments