From: Paul Brannan Date: 2002-09-17T01:37:33+09:00 Subject: Re: Dependency "trees" - suggestions? On Tue, Sep 17, 2002 at 12:52:49AM +0900, Massimiliano Mirra wrote: > Right now, each time a node is added, an array containing all the > possible paths is updated. If adding the node causes a cycle in one > of the paths, an exception is raised. You could raise an exception only when you encounter a cycle while traversing the graph; if you do this, you need only a Hash containing all the nodes (or their ids), so you can tell if you've visited a particular node before. Paul