Re: Need guidance on data structure
Re: Need guidance on data structure
- Subject: Re: Need guidance on data structure
- From: David Scheidt <email@hidden>
- Date: Mon, 27 Apr 2009 22:48:18 -0400
On Apr 27, 2009, at 9:47 PM, Graham Cox wrote:
Something tells me I'm missing a trick here. A data structure that
is intended to manage exactly this sort of interconnected network of
objects without the awkwardness I'm running into with this ad-hoc
approach. The problem is I don't know what sort of thing I should be
looking for, or what the right technical terms would be. Or there
may be some completely obvious way to do this that I'm missing. The
key requirement is that the connections between the parents and
children are drawn properly, which requires that children are always
drawn before their parents. Because of the cyclic nature of the
network though, there isn't a way I can see to simply sort the
objects into the right order.
Any insight or pointers would be gratefully received at this point -
I'm tying myself in knots trying to make this function with any
scalability.
I suspect your problem is the cycles. I don't really have a
suggestion on how to not have them, though. What you have is
directed, possibly cyclic graph. traversing cyclic graphs is a pain,
and hard; however, it's pretty widely done, so some quality time with
a textbook might be called for.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden