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

Question about abstract vs. concrete type in enumerate_paths #897

Closed
slwu89 opened this issue Apr 4, 2024 · 2 comments · Fixed by #898
Closed

Question about abstract vs. concrete type in enumerate_paths #897

slwu89 opened this issue Apr 4, 2024 · 2 comments · Fixed by #898

Comments

@slwu89
Copy link
Member

slwu89 commented Apr 4, 2024

I suspect that g::Graph in this function https://github.com/AlgebraicJulia/Catlab.jl/blob/main/src/graphs/GraphAlgorithms.jl#L122 should actually be g::HasGraph?

@epatters
Copy link
Member

epatters commented Apr 4, 2024

I agree.

@slwu89
Copy link
Member Author

slwu89 commented Apr 4, 2024

@epatters I also noticed in https://github.com/AlgebraicJulia/Catlab.jl/blob/main/src/graphs/GraphSearching.jl that we have dfs_tree(g::AbstractGraph, s::Integer; dir=:out) but bfs_tree(g::ACSet, s::Integer; dir = :out). I assume that most of the graph algorithms take g::ACSet because outneighbors and inneighbors are also defined for wiring diagrams which aren't in the same inheritance hierarchy as the graph types. Is that right? And also, it seems that, following that logic, the type for dfs_tree should be ACSet.

@slwu89 slwu89 linked a pull request Apr 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants