From: Chuck Brotman Date: 2010-06-22T04:41:49+09:00 Subject: Re: General Confusion Robert, Thanks for your response! You wrote: "You need to have the node created before you add it if you want to keep direct references. I'd say that is pretty much straightforward. Note that you do not need to create *all* nodes before you start creating edges. If you implement your graph in a way so nodes have ids (say integers) you could use those for referencing other nodes. But then you also need some mechanism to record which nodes are there, i.e. you could create another class Graph which holds that information. " Please help me better understand this. 1) Direct references vs ??? Pleas elaborate on the alternative(s) 2) When you say "you do not need to create *all* nodes before you start creating edges." I assume that you mean I can create an edge as soon as the end nodes for that edge have been created, even if other edges are still non-existant. Do I understand that correctly? 3)I expected that I would nee to create a class "Graph" so I think I'm in sync with your second paragraph Sometimes I look at this stuff and it seems "so obvious". Then, I try to implement it and it no longer seems so.... :( Thanks again, Chuck -- Posted via http://www.ruby-forum.com/.