Adjacency lives in slices, not maps, on purpose: Go randomises map iteration order between runs, and the engine's determinism guarantee needs every graph walk to visit neighbours in the same order. AddEdge mirrors networkx semantics (duplicates and self loops are no-ops) so the Holme-Kim port can lean on the same behaviour. Receiver names stay short per Go convention (g *Graph); everything else uses descriptive names. |
||
|---|---|---|
| .. | ||
| engine | ||