Add directed methods#11
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