From: Nuralanur@... Date: 2006-12-21T23:13:30+09:00 Subject: Re: Common point puzzle -------------------------------1166710397 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Dear Bill, what about something like this ? # an example set of graphs - hashes with names and sets of coordinates as values all_graphs={'coarsest',[[1,2],[3,4]],'subgraph',[[1,2],[3,4],[1.5,2],[3.5,4]], 'subsubgraph',[[1,2],[3,4],[1.25,2],[1.5,2],[3.25,4],[3.5,4]]} points_in_subgraph={} all_graphs.each{|graph,points| lazy_points=points-all_graphs['coarsest'] do_something_here_points=points-lazy_points points_in_subgraph.update({graph,do_something_here_points}) } work_done_in_subgraphs={} points_in_subgraph.each{|k,v| work_done_in_subgraphs.update({k,v.my_divisions}) } class Array def my_divisions # ...perform your divisions on each point here end end Best regards, Axel -------------------------------1166710397--