Jonathan Mörndal wrote:
> There might be complexity issues here, and in particular the former
> solution might not give the direct predecessors but just all
> predecessors. (Devs> Isn't there some ambiguity (flaw) in the docs
> here? The graph-theoretic def. of predecessors is those nodes from
> which the node is reachable, right?) But for any practical purpose, at
> least the latter solution would be feasible, I believe.
You're right, the documentation in Graphs needs refinement. At a
minimum, I will change the Javadoc to clarify that it's the direct
predecessor/successor.
Beyond that, I could deprecate the methods (keeping them around for a
few releases for backwards compatibility) and introduce new ones with
longer names like directPredecessorListOf, but maybe in this case just
clarifying the Javadoc is good enough?
JVS
|