From c62d81504a356ecd0c930ad55155e14866d40492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szabolcs=20Horva=CC=81t?= Date: Sat, 17 Aug 2024 13:39:43 +0000 Subject: [PATCH] feat: allow selecting specific integer programming feedback arc set problem formulations --- src/_igraph/convert.c | 2 ++ src/_igraph/graphobject.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/_igraph/convert.c b/src/_igraph/convert.c index 44fe318cf..3529d6921 100644 --- a/src/_igraph/convert.c +++ b/src/_igraph/convert.c @@ -596,6 +596,8 @@ int igraphmodule_PyObject_to_fas_algorithm_t(PyObject *o, {"exact", IGRAPH_FAS_EXACT_IP}, {"exact_ip", IGRAPH_FAS_EXACT_IP}, {"ip", IGRAPH_FAS_EXACT_IP}, + {"ip_ti", IGRAPH_FAS_EXACT_IP_TI}, + {"ip_cg", IGRAPH_FAS_EXACT_IP_CG}, {0,0} }; TRANSLATE_ENUM_WITH(fas_algorithm_tt); diff --git a/src/_igraph/graphobject.c b/src/_igraph/graphobject.c index 6322969fa..9d696c905 100644 --- a/src/_igraph/graphobject.c +++ b/src/_igraph/graphobject.c @@ -15442,8 +15442,12 @@ struct PyMethodDef igraphmodule_Graph_methods[] = { " breaking heuristic of Eades, Lin and Smyth, which is linear in the number\n" " of edges but not necessarily optimal; however, it guarantees that the\n" " number of edges to be removed is smaller than |E|/2 - |V|/6. C{\"ip\"} uses\n" - " an integer programming formulation which is guaranteed to yield an optimal\n" - " result, but is too slow for large graphs.\n" + " the most efficient available integer programming formulation which is guaranteed\n" + " to yield an optimal result. Specific integer programming formulations can be\n" + " selected using C{\"ip_ti\"} (using triangle inequalities) and C{\"ip_cg\"}\n" + " (a minimum set cover formulation using incremental constraint generation).\n" + " Note that the minimum feedback arc set problem is NP-hard, therefore all methods\n" + " that obtain exact optimal solutions are infeasibly slow on large graphs.\n" "@return: the IDs of the edges to be removed, in a list.\n\n" },