Skip to content

refactor: forward get.adjacency.dense() to get.adjacency.sparse() if attributes are present (#1483)#1653

Merged
schochastics merged 12 commits intoigraph:mainfrom
schochastics:get_adj_dense
Jan 25, 2025
Merged

refactor: forward get.adjacency.dense() to get.adjacency.sparse() if attributes are present (#1483)#1653
schochastics merged 12 commits intoigraph:mainfrom
schochastics:get_adj_dense

Conversation

@schochastics
Copy link
Copy Markdown
Contributor

This PR removes (nested) for loops for get.adjacency.dense() when attr != NULL

(cherry picked commits from #1518)

@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app Bot commented Jan 9, 2025

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@schochastics schochastics changed the title removed nested for loops in get.adjacency.dense (#1483) refactor: removed nested for loops in get.adjacency.dense (#1483) Jan 9, 2025
@schochastics
Copy link
Copy Markdown
Contributor Author

Test fails because tests in main are currently not correct, see #1551 (and also #1518). Should the tests be fixed here?

cc @maelle @krlmlr

@krlmlr
Copy link
Copy Markdown
Contributor

krlmlr commented Jan 13, 2025

Every PR should be green, yes. If this needs changing tests, it can be done in the same PR.

The best would be to change tests first, in a separate commit or PR, so that they work both with the existing and the new implementation. Not sure if it's worth the effort.

Copy link
Copy Markdown
Contributor

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, great! Somehow dimnames() are lost in R 4.1 and earlier, the checks are failing.

Comment thread tests/testthat/_snaps/conversion.md Outdated
@krlmlr krlmlr changed the title refactor: removed nested for loops in get.adjacency.dense (#1483) refactor: forward get.adjacency.dense() to get.adjacency.sparse() if attributes are present (#1483) Jan 14, 2025
@schochastics
Copy link
Copy Markdown
Contributor Author

Ready to be reviewed again

Copy link
Copy Markdown
Contributor

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, we're close.

Comment thread R/conversion.R Outdated
Comment thread R/conversion.R Outdated
@schochastics
Copy link
Copy Markdown
Contributor Author

ready again

Copy link
Copy Markdown
Contributor

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please auto-merge when good?

Comment thread R/conversion.R Outdated
@krlmlr krlmlr requested a review from maelle January 23, 2025 09:55
@schochastics schochastics enabled auto-merge (squash) January 24, 2025 18:41
@schochastics schochastics merged commit 5686be7 into igraph:main Jan 25, 2025
schochastics added a commit to schochastics/rigraph that referenced this pull request Jan 27, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants