Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Replace .Call(Rx_...) with _impl functions for autogenerated entrypoints

This PR replaces manual Rx_ entrypoint implementations with calls to autogenerated _impl functions, eliminating code duplication.

Progress

  • Merge main branch
  • Reset and reapply changes as individual commits
  • Replace Rx_ calls in cliques, interface, rewire, and foreign
  • Replace Rx_ calls in cocitation, flow, and structural-properties
  • Replace remaining Rx_ calls
  • Remove unused Rx_ function implementations from C code

Summary

This PR completes the replacement of 38 Rx_ entrypoints with their autogenerated _impl equivalents:

Functions replaced:

  • Graph structure: add_vertices, delete_edges, delete_vertices, edges, incident, ecount, is_directed
  • Independent vertex sets: largest_ivs, max_ivs, ivs_size
  • Graph I/O: read/write functions for pajek, graphml, gml, dl, graphdb, edgelist, dot, leda
  • Flow/connectivity: mincut, mincut_value, vertex_connectivity, edge_connectivity, adhesion, cohesion
  • Graph properties: constraint, coreness, topo_sort, cocitation, bibcoupling
  • Other: rewire, famous, MST algorithms, graphlets, running_mean, cohesive_blocks

Removed from src/rinterface_extra.c:
All 38 now-unused Rx_ function implementations have been removed, reducing code duplication.

Not replaced:
Functions with incompatible signatures remain (e.g., maximal_cliques_count with subset, girth with circle parameter, union/intersection with list support).

Original prompt

This section details on the original issue you should resolve

<issue_title>Replace .Call(Rx_...) with calling the corresponding _impl</issue_title>
<issue_description>For those Rx_... entrypoints where an autogenerated variant exists, use the _impl directly and remove the Rx_ implementation completely.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Replace .Call(Rx_...) with corresponding _impl Replace .Call(Rx_...) with _impl functions for autogenerated entrypoints Nov 1, 2025
Copilot AI requested a review from krlmlr November 1, 2025 21:37
Copilot finished work on behalf of krlmlr November 1, 2025 21:37
@krlmlr
Copy link
Contributor

krlmlr commented Nov 1, 2025

Needs to remove all now unused Rx_ functions.

@krlmlr
Copy link
Contributor

krlmlr commented Nov 2, 2025

@copilot: Merge main . Revert to main, then add each change as an individual commit. The expectation is that the end result is identical to the state after merging main. Do not bother checking.

Copy link
Contributor Author

Copilot AI commented Nov 2, 2025

Needs to remove all now unused Rx_ functions.

Done in ddbb826. Removed 38 unused Rx_ function implementations from src/rinterface_extra.c.

@copilot: Merge main . Revert to main, then add each change as an individual commit. The expectation is that the end result is identical to the state after merging main. Do not bother checking.

Done. Merged main, reset to main, then reapplied changes as individual commits:

  • 64fb71c: Replace Rx_ calls in cliques, interface, rewire, and foreign
  • ec211e2: Replace Rx_ calls in cocitation, flow, and structural-properties
  • 3bdbc77: Replace remaining Rx_ calls
  • ddbb826: Remove unused Rx_ implementations from C code

Copilot finished work on behalf of krlmlr November 2, 2025 10:49
@krlmlr krlmlr force-pushed the copilot/replace-rx-entrypoints-impl branch from ddbb826 to 1e2367c Compare November 2, 2025 13:38
@krlmlr krlmlr marked this pull request as ready for review November 2, 2025 13:38
@krlmlr krlmlr enabled auto-merge (squash) November 2, 2025 13:38
@krlmlr krlmlr disabled auto-merge November 2, 2025 13:38
@krlmlr krlmlr changed the title Replace .Call(Rx_...) with _impl functions for autogenerated entrypoints chore: Replace .Call(Rx_...) with _impl functions for autogenerated entrypoints Nov 2, 2025
@krlmlr krlmlr enabled auto-merge (squash) November 2, 2025 13:39
@krlmlr krlmlr force-pushed the copilot/replace-rx-entrypoints-impl branch from 6f4428b to 5487c69 Compare November 2, 2025 14:47
@krlmlr krlmlr disabled auto-merge November 2, 2025 14:58
@krlmlr krlmlr changed the title chore: Replace .Call(Rx_...) with _impl functions for autogenerated entrypoints feat: graphlet_basis() returns a list of vertices in the "cliques" component. Replace .Call(Rx_...) with _impl functions for autogenerated entrypoints Nov 2, 2025
@krlmlr krlmlr enabled auto-merge (squash) November 2, 2025 15:00
@krlmlr krlmlr merged commit 8279b25 into main Nov 2, 2025
50 checks passed
@krlmlr krlmlr deleted the copilot/replace-rx-entrypoints-impl branch November 2, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace .Call(Rx_...) with calling the corresponding _impl

2 participants