The graph representation is built around []graph.Node and []graph.Edge
rather than a map[int]graph.Node etc. In the vast majority of cases
(when there is no node or edge deletion) the compEdges and compNodes are
not needed, but when edges or nodes are deleted, the deletion is done by
swap-with-end-and-slice on these slices and removal of the element from
the non-comp slice. This allows fast iteration of the full set of valid
edges or nodes, though they may be out of id order (that information is
retained by the non-comp slices).
What particular things are you wanting to add?
Currently, I am not focussing any effort of graph and it is really only
present because there is another biogo package that depends on it. I'm
not particularly happy with its design and plan to deprecate it at some
stage in the future. Unfortunately there is not another undirected graph
package that I am happy to take its place, though I look forward to
seeing
github.com/gonum/graph moving that way (it has directed graphs).
BTW use
github.com/biogo/... packages since google code will be closing.
Dan
On Tue, 2015-03-31 at 19:47 -0500, Huan Truong wrote:
> Hi all,
>
> I'm trying to extend biogo.graph a bit. I'm confused by the presence
> of compEdges and compNodes.
>
> If anyone could provide a brief, high-level detail of what are they for, it'd
> be much appreciated.
>
> PS: My mail to biogo-dev was bounced back to me, so I'm posting in
> biogo-user here.
Sorry - I don't recall getting that and I don't see a not about it.