About MappedCollection
stephane ducasse
stephane.ducasse at free.fr
Fri May 25 20:52:55 UTC 2007
thanks for the explanation.
Stef
On 25 mai 07, at 10:06, Avi Bryant wrote:
> On 5/24/07, Chris Muller <asqueaker at gmail.com> wrote:
>> I'll add, BTree's useful outside of OODB's too.
>
> Yes, to be specific: it's useful any time you need a Dictionary-like
> collection where the keys are Magnitudes (ie, implement #<=).
>
> What you get: efficient sorted iteration through the keys, possibly
> limited to a given range. For example, if you store a list of people
> keyed by their birthdate, and then want to find everyone born in a
> certain year, in order of birth, you can do that very fast.
>
> Also in the BTree package is a TSTree, which has similar properties
> for String keys. So as well as keeping them sorted, you can do
> efficient lookups of all the keys with a given prefix. One other neat
> trick TSTree can do is a certain amount of fuzzy matching (eg find all
> keys with an edit distance of 3 from 'foo') which makes it especially
> useful for spell checking and similar applications.
>
> Avi
>
>
More information about the Squeak-dev
mailing list
|