Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #21318

Porting the 2-3 heap data-structure library from C to Python

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <alec.taylor6@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.023
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.05; 'suggestions,': 0.07; 'python': 0.08; 'subject:library': 0.09; 'method.': 0.15; 'python?': 0.15; 'from:addr:alec.taylor6': 0.16; 'from:name:alec taylor': 0.16; 'pdf:': 0.16; 'url:cosc': 0.16; 'wrap': 0.18; 'seems': 0.20; 'received:209.85.210.174': 0.21; 'received:mail-iy0-f174.google.com': 0.21; 'subject:data': 0.25; 'work,': 0.28; 'described': 0.28; 'message-id:@mail.gmail.com': 0.29; 'url:)': 0.29; 'thanks': 0.32; 'test': 0.34; 'calling': 0.34; 'to:addr:python-list': 0.35; 'class.': 0.37; 'url:ac': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'subject:from': 0.39; 'recommended': 0.39; 'received:209': 0.39; 'might': 0.40; 'to:addr:python.org': 0.40; 'taylor': 0.67; 'url:nz': 0.67; '2-3': 0.73; 'url:c': 0.74; 'url:research': 0.91; 'available:': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ju/3dc/zJYScLNrH2if9OUQhhH5c+PHQ0H04FGUZEk0=; b=Jzw4RsMLtA4fV7b0OTNjS4Gd+1Gb8HCB/CXt1m/zZIYFwRwoIQIhPrJcaFGzYUS/Et QbFS3DGjMj2wGcWitfEZCIBDSspBNQGPcz7MGXLd+ZVY/TAIZmP+OiTpT/dhLI6/PY/q qbnG3mLVjdFNyq7vIr+CGwLWZSHjIegr07invNGnkTD00Z6eW1RfELaaVJ0BUCNl9RQy yHYTh7Q1Bf874+NwJbFoQHS1irFaJX3+sJ/4DCvhv0nI/DWpaMcpq+e5I1snDNh6RYf8 k4SJzWuCTmYkZ1Vn9KihGv+n/beGYWd1mC+J+InDUzoc7hM9UL+BCkKGyeSbuUXwGCRJ v/2w==
MIME-Version 1.0
Date Thu, 8 Mar 2012 01:25:44 +1100
Subject Porting the 2-3 heap data-structure library from C to Python
From Alec Taylor <alec.taylor6@gmail.com>
To "comp.lang.python" <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.465.1331130346.3037.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1331130346 news.xs4all.nl 6859 [2001:888:2000:d::a6]:33275
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:21318

Show key headers only | View raw


I am planning to port the 2-3 heap data-structure as described by
Professor Tadao Takaoka in Theory of 2-3 Heaps published in 1999 and
available in PDF:
http://www.cosc.canterbury.ac.nz/tad.takaoka/2-3heaps.pdf

The source-code used has been made available:
http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.h
http://www.cosc.canterbury.ac.nz/research/RG/alg/ttheap.c

I plan on wrapping it in a class.

This tutorial I used to just test out calling C within Python
(http://richizo.wordpress.com/2009/01/25/calling-c-functions-inside-python/)
and it seems to work, but this might not be the recommended method.

Any best practices for how best to wrap the 2-3 heap data-structure
from C to Python?

Thanks for all suggestions,

Alec Taylor

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Porting the 2-3 heap data-structure library from C to Python Alec Taylor <alec.taylor6@gmail.com> - 2012-03-08 01:25 +1100
  Re: Porting the 2-3 heap data-structure library from C to Python Hrvoje Niksic <hniksic@xemacs.org> - 2012-03-07 16:48 +0100
    Re: Porting the 2-3 heap data-structure library from C to Python Stefan Behnel <stefan_ml@behnel.de> - 2012-03-07 17:18 +0100
      Re: Porting the 2-3 heap data-structure library from C to Python Hrvoje Niksic <hniksic@xemacs.org> - 2012-03-11 02:03 +0100
        Re: Porting the 2-3 heap data-structure library from C to Python Terry Reedy <tjreedy@udel.edu> - 2012-03-10 21:17 -0500
        Re: Porting the 2-3 heap data-structure library from C to Python Stefan Behnel <stefan_ml@behnel.de> - 2012-03-11 08:41 +0100

csiph-web