fix: cut_at() handles partial dendrograms from cluster_leading_eigen()#2599
Draft
fix: cut_at() handles partial dendrograms from cluster_leading_eigen()#2599
cut_at() handles partial dendrograms from cluster_leading_eigen()#2599Conversation
…gen()" Agent-Logs-Url: https://github.com/igraph/rigraph/sessions/058c68f4-d54e-4cfc-8444-530d274067e5 Co-authored-by: schochastics <17147355+schochastics@users.noreply.github.com>
Agent-Logs-Url: https://github.com/igraph/rigraph/sessions/058c68f4-d54e-4cfc-8444-530d274067e5 Co-authored-by: schochastics <17147355+schochastics@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix cutat() to handle partial dendrograms for leading.eigenvector
fix: Mar 27, 2026
cut_at() handles partial dendrograms from cluster_leading_eigen()
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.
cut_at()incorrectly usedigraph_community_to_membershipfor all hierarchical community structures.cluster_leading_eigen()produces a partial dendrogram wheremergesentries are community IDs (not vertex IDs), requiring the dedicatedigraph_le_community_to_membershipfunction.Changes
R/community.R—cut_at(): Detects leading eigenvector results viacommunities$algorithm == "leading eigenvector"and routes tole_community_to_membership_impl()with correct 0-based index conversion. Handles boundary warnings for out-of-rangenoandstepsvalues.tests/testthat/test-community.R: New test block coveringno=andsteps=variants, including warning behavior for out-of-range inputs.Example
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.