Commit Graph

17 Commits

Author SHA1 Message Date
Dan Kortschak
6a06a241d1 graph/path: use a struct to make intentions in negative edges clearer 2020-07-12 18:07:51 +09:30
Dan Kortschak
0631cb635a graph/path: improve negative costs accounting field documentation 2020-07-12 07:26:07 +09:30
Dan Kortschak
9ae0689dae graph/path: add option to retain all paths from single-source path finding routines 2020-07-10 07:22:35 +09:30
Dan Kortschak
3bedd58622 graph/path: properly report negative cycles in Shortest.To
We still use the maxEdges condition to allow a better exploration of the graph
before terminating.
2020-07-07 06:20:59 +09:30
Dan Kortschak
18a9c3eabc graph/path: fix comments in BellmanFordFrom 2020-07-02 12:12:34 +09:30
Dan Kortschak
2bf857dc70 graph: use iterators directly rather than copying into []graph.Node
There are still uses in test code; these can remain since they simplify
that code.
2020-07-02 07:47:46 +09:30
Dario Navin
88884a56e9 graph/path: use queue-based Bellman-Ford algorithm
See Sedgewick and Wayne, Algorithms 4th Edition from p672 onward.
2019-09-02 08:36:32 +09: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
f5d91d72f8 graph/path: allow incremental path building for Dijkstra 2018-05-24 07:13:55 +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
f818f8f7a9 graph/path: allow Shortest to traverse negative cycles
Also add checks for cases where negative cycles exist but are not marked
to protect against future shortest path function additions.
2017-09-15 08:17:25 +09:30
kortschak
ffa13e8edb graph,graph/{community,network,path}: rename WeightedGraph => Weighted 2017-08-24 10:21:15 +09:30
kortschak
715b695621 graph,graph/{network,path}: remove Weighter interface 2017-08-24 10:21:15 +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