From: Zsban Ambrus Date: 2004-05-06T22:26:54+09:00 Subject: Re: model for my problem (network simulator) On Thu, May 06, 2004 at 10:05:29PM +0900, Gergely Kontra wrote: > On 0504, Robert Klemme wrote: > > > > > I'd like to ask for help for my problem. Maybe the Q isn't > > > ruby-specific, but I WILL implement it in ruby, and I want to make a > > > rubyish program. I hope I can learn from the problem. "rubyish program" -- does this mean a program in ruby? probably since you post this here > > > > > > So: I had to write a network simulator. It consists of nodes, link > > > between nodes. > > >.... > > > > > > Shall I submit my code? Or did anybody has a model for it already? > > > > What was your question exactly? You seem to have implemented the simulator > > already... > > Just one little thing (chicken-egg problem): the links should know about > the 2 ending nodes, and nodes must know about in/outgoing links. So how > to easily administrate it? That's easy in ruby, as ruby is garbage-collected, so it can clean up circular references by itself. Thus, you can add a list of both the in and outgoing links to each nodes.