Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify to_spatial_contracted test and code. Fix #243 #248

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MattArran
Copy link

  1. Update test_morphers.m, specifying clusters for to_spatial_contracted() so as to catch the issue with mismatching node geometry (Ref. If the grouping variable is out of order, to_spatial_contracted returns incorrect node geometries #243)
  2. Modify to_spatial_contracted() in morphers.m to ensure that the order of the updated node geometries matches the order of the updated nodes, even if there are non-duplicated, non-sorted clustering values.

Pull request to main branch because develop branch missing.

Matthew Arran - BGS added 2 commits August 2, 2023 14:38
Ensure that the order of node geometries matches the order of nodes output from igraph::contract, so that attribute-geometry and edge geometry-node geometry associations are preserved by to_spatial_contracted().
@agila5
Copy link
Collaborator

agila5 commented Aug 7, 2023

Hi @MattArran and thank you very much for your PR! Unfortunately, I'm not really familiar with the code behind to_spatial_contracted since it was written by Luuk or Lorena, so I think you have to wait for their review. Thanks again!

@MattArran
Copy link
Author

Hi Andrea! No problem; it's a small fix and, as #243 mentions, the problem can be avoided in the interrim by sorting the tibble of nodes by the clustering variable before applying to_spatial_contract. Glad to make even a tiny contribution to such a useful package!

@loreabad6 loreabad6 self-requested a review September 19, 2023 09:16
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.

2 participants