4 ms·
Right, the data structure depends on the tradeoff being made. Do you add or remove nodes as often as you traverse the graph? Then a dictionary/network-of-point
by VHRanger 6y ago
Right, the data structure depends on the tradeoff being made.
Do you add or remove nodes as often as you traverse the graph? Then a dictionary/network-of-pointers make sense.
But generally, if you're doing that a lot, a database also makes sense which is why I don't like the tradeoff NetworkX made at all.
If you don't add nodes often at all, but traverse from edge-to-edge a lot, a CSR representation makes sense.
Adjacency array representations have other tradeoffs vis-a-vis CSR representaitons and are kind of an in-between solution.