-
Notifications
You must be signed in to change notification settings - Fork 1
Add directed methods #11
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
base: main
Are you sure you want to change the base?
Conversation
|
cc @gdalle |
|
This is looking good, but I think we have a naming problem. To be consistent, I would suggest that the function name refers to the type of stuff it returns, as opposed to the type of stuff it ingests (which the user already knows because the arguments are given). Here's my suggestion:
In terms of verbosity, the choice of Graphs.jl to go with very short names ( For comparison, here are the access APIs from
|
I thought a lot about it and was doubting about what I chose and what you suggest. Now that you bring back this topic, I think is better what you suggest.
I agree, that's why I went with |
|
about successor_vertices(g, v) = destination_vertex.((g,), outgoing_edges(g, v))
predecessor_vertices(g, v) = source_vertex.((g,), incoming_edges(g, v))i.e. in principle, we don't need them to be specialized by implementors (or can't see when). maybe i'm wrong? |
|
The functions that we don't need in the interface are functions that can be implemented through other functions without a slowdown. Take
Besides, you're still looking at things with your hypergraph, edge-centric mindset. Most people I know won't give a shit about edges, they want neighbors (that's why Graphs.jl was designed this way in the first place). I understand the need to support edges too, but it shouldn't be done in a way that is detrimental to neighbor efficiency. |
|
Okay, I've added i think the next thing we should revisit are the mutating methods, since here there is kind of a clear distinction between adjacent and incident matrix base implementations, but i will do it in another issue / pr |
To do