[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #5667] Add heap (priority queue) implementation to libpspp

From: John Darrington
Subject: [patch #5667] Add heap (priority queue) implementation to libpspp
Date: Tue, 09 Jan 2007 21:50:19 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060830 Firefox/ (Debian-1.5.dfsg+

Update of patch #5667 (project pspp):

             Assigned to:                     jmd => blp                    


Follow-up Comment #1:

I can't see any major issues.

I was confused by the function is_heap.  What does UNUSED mean on the return
value?  If the return value is never used, then why not return void? Or does
it mean the function itself is never used (in which case why have it?)
Similarly is_k_composition.

It seems that argument 1 of less and lesser_node could be const.

My guess is, that the most common use would want the aux arguments of
heap_create and heap_compare_func to be const.

Perhaps the comment in heap.h needs to be clearer:
/* A node in a heap.  Opaque. */
struct heap_node
    size_t idx;
If struct heap_node is opaque, then why have it in the .h file ?   
I think you mean that heap nodes must have a idx member, but all other
elements are indeterminate.

Other issues, which may or may not be relevent, depending on how you're
intending to use this:

0 How about a version of heap_create, which uses a pool, the same as we have
for hash?

0 A version, where the nodes inserted are const?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]