• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need guidance on data structure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need guidance on data structure


  • Subject: Re: Need guidance on data structure
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 28 Apr 2009 17:14:28 -0400

On Mon, Apr 27, 2009 at 9:47 PM, Graham Cox <email@hidden> wrote:
> A road can be connected to other roads. Currently each road keeps a list of
> the "subroads" that are connected to it, which is a parent-child
> relationship. A parent road can have any number of child roads, but a child
> road can only have a maximum of two parents - one for each end. (The parent
> could also be the same for each end, or it could have an unconnected end
> which is a nil parent for that end). Roads can connect to each other in any
> way you like, so in some cases a child road could be the parent of its own
> parent, and obviously there are many other kinds of cycles possible. The
> only thing currently not permitted is that a road can't loop back and
> connect to itself.

This seems wrong.  This situation is common in games, and the way it's
dealt with is to instead use a directed acyclic graph: no more "my son
is my father" relationships, instead using special node types with
logic that understands the relationship of their children.

You can also go the TeX route and iterate the system until you reach a
fixed point or an oscillation.

--Kyle Sluder
_______________________________________________

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

References: 
 >Need guidance on data structure (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Why is NSString->FSRef so hard?
  • Next by Date: Re: C string constant->NSString constant without defining twice?
  • Previous by thread: [OT] Re: Need guidance on data structure
  • Next by thread: URL Parsing
  • Index(es):
    • Date
    • Thread