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

fix: isomorphisms() and subgraph_isomorphisims(method = "vf2") work again, regression introduced in 2.0.0 #1219

Merged
merged 1 commit into from Feb 8, 2024

Conversation

krlmlr
Copy link
Contributor

@krlmlr krlmlr commented Feb 8, 2024

Closes #1218.

@szhorvat: With this, I'm seeing:

motif <- igraph::make_empty_graph(directed = FALSE) +
  igraph::vertices("D1", "D2", type = c("type1", "type1")) +
  igraph::edges("D1", "D2", type = c("type2"))
igraph::subgraph_isomorphisms(
  target = motif, pattern = motif, method = "vf2",
  vertex.color1 = 2, vertex.color2 = 1
)
#> Error in graph.get.subisomorphisms.vf2(target, pattern, ...): At vendor/cigraph/src/isomorphism/vf2.c:1089 : Invalid vertex color vector length, Invalid value

Created on 2024-02-08 with reprex v2.1.0

Do you expect this error?

Copy link
Contributor

aviator-app bot commented Feb 8, 2024

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 using Aviator.


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.

@krlmlr krlmlr added this to the phoenix 🔥 milestone Feb 8, 2024
@szhorvat
Copy link
Member

szhorvat commented Feb 8, 2024

Yes, it is expected. The colour vector must contain one entry for each vertex. So if you have two vertices, you need a colour vector of length 2.

@krlmlr
Copy link
Contributor Author

krlmlr commented Feb 8, 2024

According to your remark in the issue, this fix isn't optimal, we should be using INTEGER() instead of REAL() here? Would you like to propose a better fix?

@szhorvat
Copy link
Member

szhorvat commented Feb 8, 2024

Can I push to this branch?

@szhorvat
Copy link
Member

szhorvat commented Feb 8, 2024

I'm sorry, I misspoke. This is fine. Please merge this. I'll submit a separate improvement for the LAD function later. Don't wait for that with the new bugfix release.

Copy link
Contributor

aviator-app bot commented Feb 8, 2024

This pull request can't be queued because it's currently a draft.

@krlmlr krlmlr marked this pull request as ready for review February 8, 2024 20:01
@aviator-app aviator-app bot merged commit 96e8334 into main Feb 8, 2024
14 checks passed
@aviator-app aviator-app bot deleted the b-1218-subiso branch February 8, 2024 21:15
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.

Error in igraph::subgraph_isomorphisms: REAL() can only be applied to a 'numeric', not a 'integer'
2 participants