Re: red-black tree data structure

2012-04-11 Thread Dan Stromberg
Bringing this back to Python a bit: http://newcenturycomputers.net/projects/rbtree.html http://pypi.python.org/pypi/bintrees/0.3.0 http://pypi.python.org/pypi/treap/0.995 Red-Black trees are supposed to be slower than treaps on average, but they're also supposed to have a lower standard deviation

Re: red-black tree data structure

2012-04-11 Thread Jabba Laci
Hi, Thanks for the answer. I copy the solution here: According to wikipedia: "The original structure was invented in 1972 by Rudolf Bayer and named "symmetric binary B-tree," but acquired its modern name in a paper in 1978 by Leonidas J. Guibas and Robert Sedgewick." Answer from Professor Guidas

Re: red-black tree data structure

2012-04-11 Thread Ian Kelly
On Wed, Apr 11, 2012 at 11:14 AM, Jabba Laci wrote: > Hi, > > It's not really a Python-related question, sorry for that. Does anyone > know why red-black trees got these colors in their names? Why not > blue-orange for instance? I'm just curious. http://programmers.stackexchange.com/questions/116

red-black tree data structure

2012-04-11 Thread Jabba Laci
Hi, It's not really a Python-related question, sorry for that. Does anyone know why red-black trees got these colors in their names? Why not blue-orange for instance? I'm just curious. Thanks, Laszlo -- http://mail.python.org/mailman/listinfo/python-list

Re: Tree data structure with: single, double and triple children option along with AVM data at each node

2011-11-24 Thread Miki Tebeka
There a many ways to do this, here's one: from collections import namedtuple Tree = namedtuple('Tree', ['feature', 'children']) t = Tree(1, [Tree('hello', []), Tree(3, [])]) -- http://mail.python.org/mailman/listinfo/python-list

Tree data structure with: single, double and triple children option along with AVM data at each node

2011-11-23 Thread nirman longjam
Dear sir, I am very happy to find this group. Sir, i am new to Python. Currently i am working on text processing. Can you give me some suggestions about Tree data structure representation, where i require each node capable to handle: only one child, or up to 3 children plus hold feature

Re: Recommendations on Pythonic tree data structure design techniques

2009-04-12 Thread Gabriel Genellina
En Thu, 09 Apr 2009 13:18:27 -0300, escribió: Any recommendations on Python based tree data structures that I can study? I'm working on an application that will model a basic outline structure (simple tree) and am looking for ideas on Pythonic implementation techniques. I'd use ElementTree. A

Re: Recommendations on Pythonic tree data structure design techniques

2009-04-09 Thread andrew cooke
pyt...@bdurham.com wrote: > Any recommendations on Python based tree data structures that I > can study? I'm working on an application that will model a basic > outline structure (simple tree) and am looking for ideas on > Pythonic implementation techniques. By outline I mean a > traditional hierar

Re: Recommendations on Pythonic tree data structure design techniques

2009-04-09 Thread CTO
I'm writing a Python graph library (called Graphine) that's pretty easy to use and does what you want. It is pre-alpha right now, but if you're interested please let me know- I'm very interested in hearing outside opinions. -- http://mail.python.org/mailman/listinfo/python-list

Re: Recommendations on Pythonic tree data structure design techniques

2009-04-09 Thread Daniel Fetchinson
ent, next, previous, and child 'pointers'. > The node objects will be stored in a dictionary where node > 'pointers' correspond to incrementally assigned numeric keys. http://www.google.com/search?q=python+tree+data+structure HTH, Daniel -- Psss, psss, put it down! - ht

Recommendations on Pythonic tree data structure design techniques

2009-04-09 Thread python
Any recommendations on Python based tree data structures that I can study? I'm working on an application that will model a basic outline structure (simple tree) and am looking for ideas on Pythonic implementation techniques. By outline I mean a traditional hierarchical document outline (section, ch

Re: tree data structure

2005-03-26 Thread runsun pan
couple of links for python tree: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/217212 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/201423 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305313 http://www.rexx.com/~dkuhlman/ -- http://mail.python.org/mailman/listinfo/

Re: tree data structure

2005-03-25 Thread Mike Rovner
vivek khurana wrote: i am a new member on this list. I have to implement tree data structure using python. How it can be done in python. Is there an existing data structure which can be used as tree? I have searched archives and manuals but no luck. You can start with Guido's essay

Re: tree data structure

2005-03-25 Thread Satchidanand Haridas
} ) }, 'c' ) } hope this helps. regards, Satchit Satchidanand Haridas (sharidas at zeomega dot com) ZeOmega (www.zeomega.com) Open Minds' Open Solutions #20,Rajalakshm

Re: tree data structure

2005-03-25 Thread Dan Bishop
vivek khurana wrote: > Hi! all > > i am a new member on this list. I have to implement > tree data structure using python. How it can be done > in python. Is there an existing data structure which > can be used as tree? Tuples can be used as trees: you can let them represent

tree data structure

2005-03-25 Thread vivek khurana
Hi! all i am a new member on this list. I have to implement tree data structure using python. How it can be done in python. Is there an existing data structure which can be used as tree? I have searched archives and manuals but no luck. Regards VK Hug the REALITY ;-) Disclaimer The facts