On Fri, Apr 05, 2013 at 02:05:05PM +0200, Adam Gouge wrote:
> What is the difference between a DirectedMultigraph and a
> DirectedPseudograph? According to the javadoc,
>
> * A directed multigraph is a non-simple directed graph
> * in which loops and multiple edges between any two vertices are permitted.
>
> * A directed pseudograph is a non-simple directed graph
> * in which both graph loops and multiple edges are permitted.
>
> They both extend AbstractBaseGraph and implement DirectedGraph, and the
> code consists only of identical constructors.
>
> Conclusion: No difference.
I'd say this is a bug. A directed multigraph should not allow loops.
> The definition of a DirectedMultigraph does not seem consistent with the
> definition of a Multigraph. For one thing, it does not extend Multigraph,
> and it allows loops while a Multigraph does not.
It is correct that DirectedMultigraph does not extend Multigraph. The plain
Multigraph is undirected. Directed and undirected graphs are different
beasts and are therefore not subclasses of one another in JgraphT. For the
loops, see above.
> DirectedMultigraph has a DirectedWeightedMultigraph subclass, but
> DirectedPseudograph has no DirectedWeightedPseudograph subclass. This seems
> confusing.
Probably there hasn't been anybody so far who had a need for
DirectedWeightedPseudographs and bothered to implement them.
Regards,
Ernst
--
Information System on Graph Classes and their Inclusions (ISGCI)
http://www.graphclasses.org
|