Skip to content

Document fractional cutoffs for vertex and edge betweenness - #895

Open
sulaimwn wants to merge 1 commit into
igraph:mainfrom
sulaimwn:docs/fractional-betweenness-cutoff
Open

sulaimwn wants to merge 1 commit into
igraph:mainfrom
sulaimwn:docs/fractional-betweenness-cutoff

Conversation

@sulaimwn

@sulaimwn sulaimwn commented Nov 26, 2026 •

Copy link
Copy Markdown

The help and type errors for Graph.betweenness() and Graph.edge_betweenness() describe the cutoff as an integer. Both methods already accept a fractional distance for weighted shortest paths. Document that paths exactly at the cutoff are included and update the type errors to match.

The regression test uses a three-vertex path with two edges of weight 0.75. It checks both methods at cutoffs of 1.25 and 1.5, where the path between the endpoints first counts toward betweenness.

Fixes #888.

OpenAI Codex prepared the patch, regression test, and pull request description.

  • By submitting this pull request, I assign the copyright of my contribution to The igraph development team.

Describe how path length is measured, align the cutoff type errors with the accepted values, and cover the inclusive weighted boundary.

Fixes igraph#888.
@szhorvat

Copy link
Copy Markdown
Member

Thank for this contribution. Please check the box in the PR description before can proceed.

@sulaimwn

Copy link
Copy Markdown
Author

Thanks for the reminder! I've checked the copyright assignment box in the PR description.

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.

inaccuracy in betweenness docs

2 participants