Commit Graph

10 Commits

Author SHA1 Message Date
Dan Kortschak
e42c1265cd graph/traverse: reduce edge visiting/traversal confusion
The Visit function was originally intended to allow the user to visit nodes
with an understanding of the path which edge was used to reach the node. This
was misguided because it implies the existence of an invariant that does not
exist; every edge into a node is passed to Visit as its node end points. This
does not happen because Visit is only called after the node being traverse to
is tested for having been visited, leading to surprising behaviour. So this
change makes Visit only consider the visited node.

The function that was originally intended to be provided by Visit is not given
by the Traverse function — previously EdgeFilter — which is called prior to
the node's visited status test. The node's visited status can be determined
via the walker's Visited method if needed. To avoid painting the edge visiting
method as purely a filter, it is renamed Traverse.
2019-03-26 07:41:45 +10:30
Dan Kortschak
969ecdd209 graph: remove Has method from Graph and Multigraph 2018-10-12 17:57:01 +10:30
Dan Kortschak
b73a2c92ff graph: add node, edge and line iterators 2018-09-23 09:25:56 +09:30
Dan Kortschak
6b03bc22e1 graph: use int64 for node retrieval 2018-03-24 09:21:44 +10:30
kortschak
805531d142 all: change capitalization of gonum in license header 2017-11-02 06:54:08 +10:30
kortschak
7ba61f0ead graph/...: remove Weight method from Edge 2017-08-24 10:21:15 +09:30
kortschak
d36956e8e0 graph/traverse: update for int64 IDs 2017-07-02 08:38:42 +09:30
kortschak
619e137c2c graph,graph/{encoding/dot,internal/set,topo,traverse}: remove intsets imports 2017-06-16 19:39:51 +09:30
Brendan Tracey
d33397aa65 all: change import paths 2017-05-23 00:03:03 -06:00
Brendan Tracey
059a6c43f9 graph: imported graph as a subtree 2017-05-23 00:02:59 -06:00