more graph changes

35 views
Skip to first unread message

Dan Kortschak

unread,
May 7, 2018, 10:12:46 PM5/7/18
to gonum-dev
I am about to embark on what should be near the last of the wholesale
breakages of graph*. This will fix gonum/graph#18 and gonum/graph#46,
and also deal with the issue of the absence of a way to get individual
nodes in a graph — see gonum/gonum#448 comment below (as defined by the
interfaces, rather than just being provided in the implementations).

I plan to use an approach similar to that shown in #46, but adding
NodeFor(id int64) and Len() int methods to the Nodes interface there
(current naming needs to be massaged). This will get us potentially
allocation-free calls to g.Nodes() and allow us to determine the order
of graphs in a nicer way than we currently have. A similar approach
could be used for edges.

Does anyone have any input on this before I start?

Dan

https://github.com/gonum/graph/issues/18
https://github.com/gonum/graph/issues/46
https://github.com/gonum/gonum/pull/448#issuecomment-376206911

* minor changes to some functions will still be coming.

Vladimír Chalupecký

unread,
May 14, 2018, 11:35:45 PM5/14/18
to gonum-dev
I plan to use an approach similar to that shown in #46, but adding 
NodeFor(id int64) and Len() int methods to the Nodes interface there 

There are several alternatives discussed in #46. Which approach do you plan to use?

Other than that, I'll try to review the changes without too much delay :-)

V.

Dan Kortschak

unread,
May 14, 2018, 11:57:10 PM5/14/18
to Vladimír Chalupecký, gonum-dev

Vladimír Chalupecký

unread,
May 15, 2018, 12:05:14 AM5/15/18
to gonum-dev
SGTM, thanks.
Reply all
Reply to author
Forward
0 new messages