Commit Graph

32 Commits

Author SHA1 Message Date
Dan Kortschak
e28f136e01 graph: use src edges in dst graph 2019-03-13 09:01:10 +10:30
Dan Kortschak
761876748e graph: make edges and lines reversible 2019-03-13 07:14:55 +10:30
Robin Eklind
5be5c19bdd graph: update comment of AddNode in NodeAdder interface (#774)
Now it follows the convention of golint, should users
copy the comment for their own concrete implementation.
2018-12-22 16:04:15 +01:00
Dan Kortschak
14c7f9569f graph: add Empty universal iterator for empty returns 2018-12-22 09:59:24 +10:30
Dan Kortschak
969ecdd209 graph: remove Has method from Graph and Multigraph 2018-10-12 17:57:01 +10:30
Dan Kortschak
46d85b5bdf graph: avoid issues around graph node retrieval subtleties
With the approach to graph node mutation on edge setting the previously
existed there was an issue that the edge last used connect a pair of
nodes could result in a difference in the nodes being returned by a node
query compared to the same node associated with edges returned from an
edge query.

This change avoids dealing with that by making it implementation
dependent and stating this, and by making all the node-storing graphs
we provide mutate the nodes when edges are set.
2018-09-29 19:26:44 +09:30
Dan Kortschak
b73a2c92ff graph: add node, edge and line iterators 2018-09-23 09:25:56 +09:30
Dan Kortschak
32a6369498 graph: use int64 for edge and line removal 2018-05-07 19:11:10 +09:30
Dan Kortschak
a1b5d898fe graph: use int64 for node removal 2018-05-07 19:11:10 +09:30
Dan Kortschak
6b03bc22e1 graph: use int64 for node retrieval 2018-03-24 09:21:44 +10:30
Dan Kortschak
8d2aaa4a38 graph: fix undirected to directed copy behaviour 2018-02-22 20:03:33 +10:30
kortschak
299547a6f4 Revert "graph: change Edge interface to include ID method"
This reverts commit 1a83fdba7a.

Further design discussion leads to a better approach with an additional
edge-type interface.
2017-12-14 08:24:55 +10:30
kortschak
1a83fdba7a graph: change Edge interface to include ID method
This is to allow future handling of multigraphs.
2017-12-11 08:06:56 +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
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
kortschak
8508095a22 graph,graph/{community,path}: use weighted graph types 2017-08-24 10:21:15 +09:30
kortschak
a0c93557a5 graph,graph/simple: add weighted graph interfaces and implementations 2017-08-24 10:21:06 +09:30
mewmew
0ebdd59ba5 graph: move NewEdge method from encoding.Builder to graph.EdgeAdder
Also rename graph.EdgeSetter to graph.EdgeAdder.

Fixes #56.
2017-08-18 03:51:30 +02:00
kortschak
d65ea24498 graph: change documentation to allow self edges
No behaviour change; package simple graphs still panic for addition of self
edges, as noted in their existing documentation.
2017-07-16 18:03:11 +09:30
Samuel Kelemen
388406a0da graph: fix typo 2017-07-07 12:10:29 +09:30
kortschak
39b486f179 graph: revert NewNodeID -> NewNode 2017-07-07 06:59:14 +09:30
kortschak
b4e6656724 graph: change IDs to int64 2017-07-02 08:38:42 +09:30
Brendan Tracey
059a6c43f9 graph: imported graph as a subtree 2017-05-23 00:02:59 -06:00
Jsor
204e2117bb Reorganized package, made graph toplevel 2014-01-07 00:26:13 -07:00
Jsor
ad52fbfb14 Got nodes/edges preliminary work done 2014-01-06 23:50:02 -07:00
Jsor
0e92bac9cf Added node/edge dynamics to graph.go 2014-01-06 22:54:07 -07:00
Jragonmiris
2429337130 Bug fixes 2013-08-01 16:10:19 -07:00
Jragonmiris
c8a538045f Added some util functions 2013-08-01 16:02:15 -07:00
Jragonmiris
9c13396cde Basic augmented graph structure, added Node interface (but haven't implemented it yet) 2013-08-01 15:46:11 -07:00
Jragonmiris
194a06a51e Reorganized package 2013-07-30 20:13:52 -07:00