Re: A Tree class, my $0.02 contribution to the python community.

2005-10-16 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > The underlying implementation is an AVL balanced binary tree with > inorder threading. Dan Bernstein argues for switching from hash tables to crit-bit trees (a/k/a Patricia trees), because of their guaranteed worst case performance. He also claims:

Re: A Tree class, my $0.02 contribution to the python community.

2005-10-13 Thread Antoon Pardon
Op 2005-10-12, George Sakkis schreef <[EMAIL PROTECTED]>: > "Antoon Pardon" <[EMAIL PROTECTED]> wrote: >> Comments are welcome: >> >> http://www.pardon-sleeuwaegen.be/antoon/avltree.html > > How about adding two shortcut methods, nextkey(k) and prevkey(k), to return > the next and previous > key

Re: A Tree class, my $0.02 contribution to the python community.

2005-10-12 Thread Diez B. Roggisch
Antoon Pardon wrote: > I don't know. The python dictionary type with its name, seem to refer > to how it is implemented, so I thought Tree was an appropiate name > here as it is implemented as a tree. I too had the impression you're talking about a tree-implementation, not a mapping based on key

Re: A Tree class, my $0.02 contribution to the python community.

2005-10-12 Thread George Sakkis
"Antoon Pardon" <[EMAIL PROTECTED]> wrote: > Comments are welcome: > > http://www.pardon-sleeuwaegen.be/antoon/avltree.html How about adding two shortcut methods, nextkey(k) and prevkey(k), to return the next and previous key respectively ? For instance nextkey would be equivalent to (untested)

Re: A Tree class, my $0.02 contribution to the python community.

2005-10-12 Thread dataw0lf
Steve Holden wrote: > Does this type bear any relationship at all to what most people call a > tree, which is a bifurcated data structure? Or do you call it a tree for > some other reason? I'd think that the 'avl' part would answer that question. !google avl tree -- Joshua Simpson -- dataw0

Re: A Tree class, my $0.02 contribution to the python community.

2005-10-12 Thread Antoon Pardon
Op 2005-10-12, Steve Holden schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> Comments are welcome: >> >> http://www.pardon-sleeuwaegen.be/antoon/avltree.html > Does this type bear any relationship at all to what most people call a > tree, which is a bifurcated data structure? Or do you c

Re: A Tree class, my $0.02 contribution to the python community.

2005-10-12 Thread Steve Holden
Antoon Pardon wrote: > Comments are welcome: > > http://www.pardon-sleeuwaegen.be/antoon/avltree.html Does this type bear any relationship at all to what most people call a tree, which is a bifurcated data structure? Or do you call it a tree for some other reason? Sounds like "cdict" might be

A Tree class, my $0.02 contribution to the python community.

2005-10-12 Thread Antoon Pardon
Comments are welcome: http://www.pardon-sleeuwaegen.be/antoon/avltree.html -- http://mail.python.org/mailman/listinfo/python-list