treaps in python

Discussion in 'Python' started by Dan Stromberg, Dec 15, 2009.

  1. I've just released my treap.py module:

    http://stromberg.dnsalias.org/~dstromberg/treap/

    It's code that implements a datastructure that is a hybrid of a binary
    tree and a binary heap, having some of the advantages of each. The URL
    has a table comparing the asymptotic performance of treaps against some
    other common python datastructures.

    This particular implementation is pretty dicitionary-like, but you can
    also get the smallest value or the largest value in O(log2(n)) time, or
    get a forward or reverse ordered list of values in O(n) time. The price
    of course is that adding and deleting things is O(log2(n)) time.

    It's currently GPLv3-licensed, but I'd like to dual license it in such a
    way that it could eventually be included in the standard library. How
    would I go about this?

    Also, what's the best way to package something like this for consumption
    by python-folk? There seem to be so many ways of packaging things
    anymore. Are dist utils, a .deb and a .rpm the way to go? Right now,
    it's just using make to stuff things in /usr/local.

    There are two versions: One that is pure python, and one that is part
    python and part cython. They're automatically generated from a common
    m4 template.

    There are rather plentiful unit tests included in the tar archive.

    I hope someone besides me finds it useful.
    Dan Stromberg, Dec 15, 2009
    #1
    1. Advertising

  2. Dan Stromberg

    Carl Banks Guest

    On Dec 14, 8:49 pm, Dan Stromberg <> wrote:
    > It's currently GPLv3-licensed, but I'd like to dual license it in such a
    > way that it could eventually be included in the standard library.  How
    > would I go about this?


    I'm not going to try to talk you out of dual licensing it as something
    other than GPL, but you should note that we just had a thread
    discussing a proposal to include a data structure I consider more
    generally useful (graph), and that ended up pretty much dead.


    Carl Banks
    Carl Banks, Dec 15, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    722
  2. Paul Moore
    Replies:
    0
    Views:
    594
    Paul Moore
    Mar 1, 2008
  3. Martin v. Löwis
    Replies:
    0
    Views:
    633
    Martin v. Löwis
    Mar 1, 2008
  4. Senthil Kumaran
    Replies:
    0
    Views:
    558
    Senthil Kumaran
    Jan 17, 2011
  5. R. David Murray
    Replies:
    0
    Views:
    740
    R. David Murray
    Jan 17, 2011
Loading...

Share This Page