Skip to content

Commit

Permalink
feat: allow selecting specific integer programming feedback arc set p…
Browse files Browse the repository at this point in the history
…roblem formulations
  • Loading branch information
szhorvat committed Aug 17, 2024
1 parent 4855c26 commit c62d815
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/_igraph/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 6 additions & 2 deletions src/_igraph/graphobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down

0 comments on commit c62d815

Please sign in to comment.