Skip to content

refactor: Rename iteration arguments to n_iter/max_iter - #2945

Merged
schochastics merged 29 commits into
claude/issue-2788-subagents-faw1t1-8from
claude/issue-2788-subagents-faw1t1-9
Dec 3, 2026
Merged

schochastics merged 29 commits into
claude/issue-2788-subagents-faw1t1-8from
claude/issue-2788-subagents-faw1t1-9

Conversation

@schochastics

@schochastics schochastics commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Part of #2788 (PR 9 of the stack, on top of #2944). It implements the iterations decision: "Both n_iter and max_iter, depending on context: stop after equilibrium (max) or just do it (n)." steps stays wherever it means a walk length or a number of merges.

What this does

Function Old New Why
layout_with_fr() niter (and its alias maxiter, see #2863) n_iter runs a fixed number of iterations
layout_with_graphopt() niter n_iter fixed number
layout_with_dh() maxiter, fineiter n_iter, n_fine_iter "Number of iterations to perform" in each phase, so a fixed count despite the old max
graphlets(), graphlet_proj() niter n_iter fixed number
keeping_degseq() niter n_iter fixed number of rewiring trials
cluster_leiden() n_iterations n_iter fixed number (a negative value means "until stable")
layout_with_kk() maxiter max_iter stops early once epsilon is reached
layout_with_gem(), layout_with_lgl() maxiter max_iter documented as a maximum
layout_with_sugiyama(), layout_as_bipartite() maxiter max_iter cap on crossing-minimization iterations
match_vertices() iteration max_iter the Frank-Wolfe loop stops early on convergence

All of these except keeping_degseq() and match_vertices() are tail arguments with a registry entry, so the rename is a pure registry change: legacy names are recovered under the standard single soft-deprecation. For layout_with_fr(), the maxiter = niter alias from #2863 now points at n_iter as well. keeping_degseq() and match_vertices() have no ..., so they get a trailing deprecated() sentinel with a bridge.

The internal tkplot layout dialog builds its calls by argument name, so it now uses the new names. The deprecated layout.*() wrappers are untouched and still forward the old names through the recovery.

layout_with_kk()'s hard-stopped legacy niter formal (removed functionality since 0.8.0) is unrelated to this rename and stays as it is.

The #2788 stack

Each PR is based on the previous one and merges in this order:

  1. refactor: Rename algo to algorithm in page_rank(), feedback_arc_set() and feedback_vertex_set() #2859: algo → algorithm
  2. refactor: Rename nodes to n in generators and centr_*_tmax() #2860: nodes → n (vertex counts)
  3. refactor: snake_case weights arguments in clique functions and cluster_infomap() #2861: weights arguments
  4. refactor: Rename normalization flags to normalized #2862: normalization flags → normalized
  5. refactor: Purge legacy alias formals via the migration registry #2863: hand-rolled alias formals into the registry
  6. refactor: Rename vertex-selector arguments to vertices and vertex #2864: selectors → vertices/vertex
  7. refactor: Rename edge-selector arguments to edges #2943: edge selectors → edges
  8. refactor: Rename index to vertices/edges in the attribute accessors #2944: attribute accessors: index → vertices/edges
  9. refactor: Rename iteration arguments to n_iter/max_iter #2945: iterations → n_iter/max_iter ← this PR
  10. refactor: snake_case the dotted arguments of the graph generators and degree-sequence functions #2946: snake_case: generators and degree sequences
  11. refactor: snake_case the dotted arguments of the layout functions #2947: snake_case: layouts
  12. refactor: snake_case the dotted arguments of the community, HRG, motif and graphlet functions #2948: snake_case: community, HRG, motifs, graphlets (Mu → mu)
  13. refactor: snake_case the dotted arguments of the structural and conversion functions #2950: snake_case: structural and conversion functions
  14. refactor: Rename algorithm-selection arguments to algorithm and measure selection to measure #2951: algorithm family → algorithm/measure (closes Algorithm-selection argument names: census of method/algorithm/algo/impl/implementation #2932)

🤖 Generated with Claude Code

Fixed iteration counts become `n_iter`, caps that may stop early become `max_iter`,
per the #2788 decision.
Legacy names are recovered with a soft-deprecation.

Part of #2788.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 567ba3f is merged into claude/issue-2788-subagents-faw1t1-8:

  • ✔️E_named: 166ms -> 169ms [-0.58%, +3.26%]
  • ✔️V_named: 361ms -> 361ms [-0.52%, +0.69%]
  • ✔️all_simple_paths_named: 127ms -> 127ms [-0.1%, +0.85%]
  • ✔️as_adjacency_matrix: 176ms -> 176ms [-0.01%, +0.71%]
  • ✔️as_biadjacency_matrix: 195ms -> 194ms [-1.26%, +0.24%]
  • ✔️as_data_frame_both: 203ms -> 203ms [-0.35%, +0.58%]
  • ✔️as_long_data_frame: 161ms -> 161ms [-0.9%, +0.14%]
  • ✔️ego_order2_named: 138ms -> 138ms [-0.74%, +0.85%]
  • ✔️es_attr_assign: 185ms -> 185ms [-0.36%, +0.61%]
  • ✔️es_attr_filter: 188ms -> 188ms [-0.43%, +0.33%]
  • ✔️graph_from_adjacency_matrix: 215ms -> 215ms [-0.23%, +0.3%]
  • ✔️graph_from_data_frame: 222ms -> 224ms [-0.09%, +1.93%]
  • ✔️head_of_named: 145ms -> 145ms [-1.07%, +1.1%]
  • ✔️incident_edges: 160ms -> 159ms [-1.82%, +0.66%]
  • ✔️max_cliques_named: 21.6ms -> 21.5ms [-1.1%, +0.24%]
  • ✔️neighbors_by_name: 219ms -> 218ms [-1.3%, +0.26%]
  • ✔️union_named: 182ms -> 182ms [-0.57%, +0.45%]
  • ✔️vs_attr_filter: 231ms -> 230ms [-0.6%, +0.16%]
  • ✔️vs_by_name: 205ms -> 205ms [-0.5%, +0.41%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if f9e3dae is merged into claude/issue-2788-subagents-faw1t1-8:

Status Name Current Incoming Interval
✔️ V_named 386.6ms 386.1ms [-1.12%, +0.84%]
✔️ graph_from_adjacency_matrix 251.6ms 252.3ms [-0.56%, +1.13%]
✔️ graph_from_data_frame 242.2ms 242.4ms [-1.41%, +1.57%]
✔️ es_attr_filter 207.1ms 206.6ms [-0.66%, +0.2%]
🚀 es_attr_assign 207.3ms 205ms [-2.06%, -0.17%]
✔️ as_biadjacency_matrix 197.9ms 196.9ms [-1.72%, +0.76%]
✔️ vs_subset_positional 195.5ms 196.6ms [-0.36%, +1.51%]
✔️ as_adjacency_matrix 189.8ms 190ms [-1.23%, +1.44%]
✔️ E_named 189.6ms 188.7ms [-1.86%, +0.89%]
✔️ vs_by_name 186.3ms 185.3ms [-3.26%, +2.22%]
✔️ as_data_frame_both 179.2ms 179.9ms [-0.38%, +1.14%]
✔️ max_cliques_sizes_named 177.7ms 178ms [-0.45%, +0.8%]
✔️ as_long_data_frame 160.7ms 160.6ms [-0.72%, +0.59%]
✔️ union_named 156.1ms 156.2ms [-0.97%, +1.12%]
✔️ vs_attr_filter 150.4ms 150.1ms [-0.95%, +0.64%]
✔️ head_of_named 148.1ms 147.8ms [-0.91%, +0.53%]
✔️ incident_edges 141ms 139.8ms [-2.84%, +1.14%]
✔️ ego_order2_named 136.7ms 137.7ms [-0.09%, +1.49%]
✔️ neighbors_by_name 116.8ms 115.8ms [-3.45%, +1.6%]
✔️ all_simple_paths_named 110.4ms 110.3ms [-0.84%, +0.73%]
🚀 vs_by_literal_name 84.4ms 83.8ms [-1.51%, -0.1%]
✔️ degree_few_vertices 73.4ms 73.6ms [-0.38%, +0.92%]
✔️ strength_weighted_named 26.4ms 26.6ms [-0.11%, +1.55%]
✔️ max_cliques_named 22.2ms 22ms [-1.91%, +0.45%]

Further explanation regarding interpretation and methodology can be found in the documentation.

Last updated for commit f9e3dae.

schochastics and others added 7 commits December 2, 2026 19:47
layout_with_gem(), layout_with_lgl(), layout_as_bipartite() and
layout_with_sugiyama() renamed `maxiter` to `max_iter` without a test
that the legacy name still works and gives the same layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-2788-subagents-faw1t1-9

# Conflicts:
#	R/community.R
…-2788-subagents-faw1t1-9

# Conflicts:
#	R/community.R
#	R/glet.R
#	R/layout.R
@schochastics schochastics reopened this Dec 3, 2026
@schochastics schochastics reopened this Dec 3, 2026
@schochastics schochastics reopened this Dec 3, 2026
@schochastics schochastics reopened this Dec 3, 2026
@schochastics
schochastics merged commit a5e017a into main Dec 3, 2026
12 checks passed
@schochastics
schochastics deleted the claude/issue-2788-subagents-faw1t1-9 branch December 3, 2026 20:01
schochastics added a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
(cherry picked from commit a5e017a)
schochastics added a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
(cherry picked from commit a5e017a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Algorithm-selection argument names: census of method/algorithm/algo/impl/implementation

2 participants