Conversation
…rewire_each_edge Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor to use _impl variant for specific functions
Use Oct 26, 2025
_impl variants instead of inline .Call() for four functions with changed C signatures
_impl variants instead of inline .Call() for four functions with changed C signatures_impl variants instead of inline .Call() for four functions with changed C signatures
Contributor
|
@copilot: Also add |
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
chore: Use
chore: Use Oct 26, 2025
_impl variants instead of inline .Call() for four functions with changed C signatures_impl variants instead of inline .Call() for five functions with changed C signatures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five functions (
betweenness,edge_betweenness,cluster_infomap,sample_gnp,rewire_each_edge) were directly calling C functions whose argument counts changed in the new C core version. This caused compatibility issues.Changes
betweenness(): Replace inline.Call(R_igraph_betweenness_cutoff, ...)withbetweenness_cutoff_impl()edge_betweenness(): Replace inline.Call(R_igraph_edge_betweenness_cutoff, ...)withedge_betweenness_cutoff_impl()cluster_infomap(): Replace inline.Call(R_igraph_community_infomap, ...)withcommunity_infomap_impl()sample_gnp(): Replace inline.Call(R_igraph_erdos_renyi_game_gnp, ...)witherdos_renyi_game_gnp_impl()rewire_each_edge(): Replace inline.Call(R_igraph_rewire_edges, ...)withrewire_edges_impl()The
_implvariants handle argument preprocessing and C signature changes, allowing wrapper functions to focus on post-processing logic (normalization, metadata, filtering). Eliminates 81 lines of duplicated preprocessing code._implvariant instead of inline.Call()for four specific functions #2428Original prompt
_implvariant instead of inline.Call()for four specific functions #2428💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.