Dan Kortschak
a6ddba7f8d
graph/{multi,simple,testgraph}: add support for ID-specified node addition
2021-03-16 09:37:18 +10:30
Dan Kortschak
9076f1c7d1
graph/set/uid: make uid package publicly available
2021-01-07 07:24:35 +10:30
Dan Kortschak
f0f9a9eaf8
graph/simple: use lazy edge-based node iterator for From, To and Nodes methods
2020-07-02 07:47:46 +09:30
Dan Kortschak
e532b71013
graph/{multi,simple}: don't return pointer values from NewEdge/NewLine
2019-11-28 21:55:09 +10:30
Dan Kortschak
4e61e64b45
graph/simple: don't allocate edge maps before they are needed
...
Also fix incorrect optimisation in WeightedDirected.Nodes.
2019-08-03 07:06:15 +09:30
Dan Kortschak
b16c96abd8
graph/{multi,simple}: fix empty To optimisation
2019-07-22 22:34:55 +09:30
Dan Kortschak
14c7f9569f
graph: add Empty universal iterator for empty returns
2018-12-22 09:59:24 +10:30
Dan Kortschak
48288cca5b
graph/{multi,simple}: harmonise code order
...
Previously there was an attempt to maintain some kind of semantic ordering,
but given the needed complexity of the API this has become untenable. So
just order according to the Godoc — alphabetical for exported methods and
functions. For unexported functions, use judgement.
One method, Has on multi.DirectedGraph, that should not have been present is
deleted.
2018-11-08 07:11:52 +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
72366fbe54
graph/{multi,simple}: ensure implementations satisfy the interfaces they target
2018-09-23 19:12:43 +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
kortschak
07dfa0c90e
graph/simple: fix documentation
2018-01-19 21:59:01 +10:30
kortschak
9806de04c7
graph: factor id handling out to internal package uid
2018-01-19 21:59:01 +10:30
kortschak
87056319dc
simple: fix nil edge returns
...
Also clean up code formatting for consistency.
2018-01-02 20:13:10 +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
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
39b486f179
graph: revert NewNodeID -> NewNode
2017-07-07 06:59:14 +09:30
kortschak
8d2722a621
graph/simple: update for int64 IDs
2017-07-02 08:38:42 +09:30
kortschak
e58bfb23e8
graph/simple: do not use intsets.Sparse for ID sets
2017-06-13 11:01:07 +09:30
kortschak
1a18034e61
graph/simple: factor id handling out of graphs
2017-05-31 11:33:05 +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