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

Re: Autocompletion


  • Subject: Re: Autocompletion
  • From: Jim Witte <email@hidden>
  • Date: Thu, 10 Jun 2004 13:06:30 -0500

FWIW, auto-completion is very simple algorithmically. You might find some useful information by looking at what's sometimes called "radix" sorting. In your particular case, what you'll want to do
is sort all your potentials into groups based on their first letter, then into further groups based on

This sounds like a Trie structure, or a Patricia tree.

their second, etc... forming a sparse hierarchal tree. You can then maintain a pointer to the current branch position in the tree, which you can adjust appropriately upon entry of further keys

caching using tricks like linked lists through the tree... picture tinsel wrapped around a christmas tree, if you want a pretty picture. :)

Standard tree threading (I know how it works for binary tree's, bit sure about real k-arry tree that haven't been turned back into binary trees).

I'm surprise someone hasn't written a specialized Cocoa class to do this, possibly using the interface of NSDictionary..

Jim
_______________________________________________
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: Autocompletion
      • From: Greg Titus <email@hidden>
References: 
 >Autocompletion (From: Francisco Tolmasky <email@hidden>)

  • Prev by Date: Re: a question I am ashamed to ask
  • Next by Date: Re: a question I am ashamed to ask
  • Previous by thread: Re: Autocompletion
  • Next by thread: Re: Autocompletion
  • Index(es):
    • Date
    • Thread