• 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: CFTree usability?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFTree usability?


  • Subject: Re: CFTree usability?
  • From: Dustin Voss <email@hidden>
  • Date: Wed, 29 Oct 2003 18:27:14 -0800

On 29 Oct, 2003, at 9:29 AM, Tim Ramsey wrote:

I am interested in writing some code to implement graph theory functions. To do so I need to attach info to edges as well as to nodes. On the surface CFTree seems to offer some attractive functions. Looking at the docs for CFTree, I see provisions for attaching info to nodes, but none for edges. Am I missing something? Is there some other way to get an equivalent functionality via CFTree? Is there a better route than CFTree - some NS class I haven't found? Am I better off to bite the bullet and roll my own?

You may have bigger problems with CFTree than the storage of edge data, depending on the types of graphs you intend to work with. CFTree can't be used with general graphs. It only allows one parent with multiple children, and does not allow cycles.

If that is not a problem for you, you have not missed anything in saying that CFTree doesn't seem to support information attached to edges. However, I can think of a few ways to hack in support. You could define the structure to look like this:

NODE --- LINK --- NODE
\-- LINK --- NODE

So that all data nodes' children are edge-information nodes, and the children of those are again data nodes. That is, the graph has interstitial edge-information nodes.

Another method would be to have data nodes only, but append edge data to the nodes.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: CFTree usability?
      • From: Tim Ramsey <email@hidden>
References: 
 >CFTree usability? (From: Tim Ramsey <email@hidden>)

  • Prev by Date: Re: drawing into an image
  • Next by Date: Re: Application Architecture Question...
  • Previous by thread: CFTree usability?
  • Next by thread: Re: CFTree usability?
  • Index(es):
    • Date
    • Thread