[Biojava-dev] [bjv2] org.bjv2.graph

Michael Heuer heuermh at acm.org
Tue Oct 19 11:37:26 EDT 2004


Hello Matthew,

Just wanted to point you to the graph API I had been working on, at

> https://dsh-lib.dev.java.net/source/browse/dsh-lib/graph/
> http://ccgb.umn.edu/~heuer/graph/apidocs/org/dishevelled/graph/Graph.html

There are a few things in that design I still am not comfortable with
(you may remember questions I had with generics some time back), but
I do think that it is better to have an interface Node that holds a
generic type N than to just hold generic Nodes as in your design.  To me
it makes more sense to traverse over Nodes with a visitor pattern than to
call methods on Graph (Node.inEdges, Node.outEdges vs. Graph.getArcsFrom,
getArcsTo).

I also find the node and edge maps very useful for implementing traversal
and search algorithms, as a convenient way of storing visited or color
information.  (e.g. <T> Map<Node, T> Graph.nodeMap())

   michael



More information about the biojava-dev mailing list