Skip to content

feat!: change arguments default and order for graph_from_lcf() #1872

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

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

Conversation

maelle
Copy link
Contributor

@maelle maelle commented Jun 10, 2025

Fix #1858

@maelle maelle requested review from szhorvat and schochastics June 10, 2025 13:25
@maelle
Copy link
Contributor Author

maelle commented Jun 10, 2025

Yes I was in a really destructive mode. 😅

#' g2 <- make_graph("Franklin")
#' isomorphic(g1, g2)
#' @export
#' @cdocs igraph_lcf_vector
graph_from_lcf <- lcf_vector_impl
graph_from_lcf <- function(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the argument order changed. how bad is that? we had no test for the function 🤪

Once we agree on the changes I'll remove formatting changes since those will be brought in by #1869 anyway.

@@ -404,3 +594,9 @@ test_that("graph is updated if in LHS", {
E(g)[1:5]$weight <- 0
expect_equal(E(g)$weight, c(rep(0, 5), 6:10))
})

test_that("graph_from_lcf() works", {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new test!

@schochastics
Copy link
Contributor

I think I am fine with the change. Note #1869 is merged now I hope this doesnt cause too much trouble here

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.

graph_from_lcf() should have default for the n parameter
2 participants