[BioC] Package "graph": bug in function addEdge

Seth Falcon sfalcon at fhcrc.org
Wed Apr 11 19:06:35 CEST 2007


Hi Dirk,

Thanks for the report.  You are right that the behavior changed, but
it is actually intentional and not a bug.

The graph classes are intended to support simple graphs (at most one
edge between any two nodes and no self-loops).  Handling multigraphs
and other non-simple graphs complicates the underlying representation
in many cases and we decided that such graphs would be best handled by
specialized classes.  Being able to easily convert between graph
representations has many advantages for performing computations on
graphs.  What is slow in one representation is often quick in another,
for example.

We also found that many methods for manipulating and computing on
graphs made assumptions that failed when the input graph was
non-simple.  So it isn't quite true that non-simple graphs were
supported in earlier versions -- they were tolerated ;-)
For example, does removeEdge do what you want in the old version of
graph when you have multiple edges between a pair of nodes?

We don't have the resources, or use-cases, right now to implement
classes for multigraphs or other non-simple graphs.  But we would
welcome well-written patches to the graph package that added such
support.  Extending graphNEL and providing specialized methods for
addEdge, removeEdge might be a start.

Best Wishes,

+ seth

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org



More information about the Bioconductor mailing list