Conversation
|
IMO before exposing this, it makes sense to at least think about what API to use for the rest of the related functionality. Ideally, all related functionality should be exposed at the same time.
When exposing a single C function as two high-level functions, a common concern is: will this lead to inefficiency by forcing users to run the same algorithm twice to get all pieces of information? This is not the case here, as the result of The other related piece is What I do not have the answer to is: What happens if the result passed to IMO the priority list for exposing functionality is:
I would suggest doing (1) and (2) together (I disagree that (1) alone serves most needs). (3) is nice to include and (4) is low priority. |
|
Thanks for the comments. I don't have time to implement 2+ now, so feel free to take over the PR if you think that's necessary. With my current schedule in mind, I recommend merging as is and delaying 2+ for a later PR, unless @szhorvat has time to take over this PR right now... |
|
I don't have time either. If it will be just this single function in the next release, I suggest marking it as experimental for now, which means "We reserve the right to change this API" (hopefully we won't, but just in case). |
|
FYI, I plan to implement |
|
Thank you, that's great |
|
I think everything that has been mentioned above is now implemented in this PR, along with tests. I'll wait for the CI to see if there are any outstanding issues. |
|
I would like to suggest mentioning in the docs that the chordal completion that this function generates is not necessary minimal. https://lists.nongnu.org/archive/html/igraph-help/2015-09/msg00088.html I will review the docs for this functionality in the C core before 0.9.5 comes out. |
|
Good point, I'll add a short note about that in the Python interface, but maybe it's worth elaborating on it further in the C core. AFAIK the minimum chordal completion is NP-complete (Yannakakis, 1981). However, I was wondering whether we could at least guarantee that igraph returns a minimal chordal completion (i.e. one that is no longer a chordal completion if you remove at least one of its edges). The example mentioned on the mailing list is definitely not minimal. |
* Implement Graph.is_chordal in its simplest form * feat: added 'alpha' and 'alpham1' arguments to is_chordal() * feat: added Graph.maximum_cardinality_search() * feat: added Graph.chordal_completion() * doc: mention that chordal_completion() can be suboptimal Co-authored-by: Tamas Nepusz <ntamas@gmail.com>
|
This PR was also backported to |
Implemented the simplest version of the igraph C core interface, should cover most people's needs.
Addresses #389 (comment)