Package logilab-common-0 :: Package 36 :: Package 1 :: Module patricia
[frames] | no frames]

Module patricia

source code

A Python implementation of PATRICIA tree.

PATRICIA - Practical Algorithm to Retrieve Information Coded in Alphanumeric
           D.R.Morrison (1968).
See http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Tree/PATRICIA.html if you
want to know what's a PATRICIA tree...

TODO: _ advanced search
      _ profile code
      _ use mxTextTools ?

:copyright: 2000-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: General Public License version 2 - http://www.gnu.org/licenses

Classes
  PatriciaNode
a PATRICIA trie node...
  PatriciaTrie
wrapper class for a patricia tree...
Functions
 
prefix(prfx, string)
return the index of the first character from string which differs from...
source code
 
split(index, string)
split a string on index, returning a 3-uple :...
source code
Function Details

prefix(prfx, string)

source code 
return the index of the first character from string which differs from
prefix

split(index, string)

source code 
split a string on index, returning a 3-uple :
(string before index, character at index, string after index)