eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'TSTree':

Home

everywhere
www.exept.de
for:
[back]

Class: TSTree


Inheritance:

   Object
   |
   +--Collection
      |
      +--TSTree

Package:
stx:libbasic2
Category:
Collections-Ordered
Version:
rev: ? date: ? ?
user: ?
file: ? directory: libbasic2
module: stx stc-classLibrary: libbasic2
Author:
Avi Bryant

Description:


A bunch of collection classes that are useful for building large indices of things. 
It's especially geared towards people using OODBs like GOODS, but can be used it in the image too: 
the BTree class is great for when you need to select numeric keys by range, 
and TSTree makes a solid basis for full-text search. 
TreeSet has an interesting optimized #intersection: that lets you compare two collections without 
looking at every item of either. 
I'm also going to be rolling some code in here from Benjamin Pollack specifically aimed at indexing 
by date ranges, which lets you do quick queries of all the events that overlap with a specific week, 
for instance. 

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.


[license:]
    Dual licensed under both SqueakL and MIT. 
    This enables both base Squeak inclusion and 100% reuse.


Instance protocol:

accessing
o  at: aString

o  at: aString ifAbsent: exceptionBlock

o  at: aString ifAbsentPut: exceptionBlock

o  at: aString put: anObject

o  removeKey: aString

o  removeKey: aString ifAbsent: errorBlock

o  values

as yet unclassified
o  matchesForPrefix: aString

o  matchesForPrefix: aString do: aBlock

o  matchesForString: aString distance: aNumber

o  matchesForString: aString distance: aNumber do: aBlock

o  matchesForString: aString distance: aNumber limitNodes: maxNodes do: aBlock

enumerating
o  do: aBlock


Private classes:

    TSTreeNode


ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 21:19:49 GMT