patchPSPP - Patches: patch #5812, implement sparse array data...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5812: implement sparse array data structure

Submitter:  Ben Pfaff <blp>
Submitted:  Thu 22 Mar 2007 04:30:45 AM UTC
   
 
Category:  None Item Group:  None
Status:  Done Assigned to:  None
Open/Closed:  Closed

Sun 25 Mar 2007 10:13:49 PM UTC, comment #2: 

Thanks for the review and the comments.  I made both suggested changes and committed the code.

Ben Pfaff <blp>
Group administrator
Fri 23 Mar 2007 03:38:20 AM UTC, comment #1: 

Looks OK to me.

1.  For consistency with hash.c etc, you might want to consider renaming sparse_array_create to sparse_array_create_pool, and if necessary make a new function called sparse_array_create which wraps sparse_array_create_pool passing NULL as the first argument.

2.  Logically, the subject of parse_array_scan should be const.  So far as I can see, the reason you have not made it so, is that it modifies its cache_* variables.  If implemented in C++, of course, the solution would be to declare these variables with the mutable qualifier.  The compromise I make when writing C is to simply cast away const on the mutable variables when I need to assign them from a const method.


John Darrington <jmd>
Group administrator
Thu 22 Mar 2007 04:30:45 AM UTC, original submission:  

Here's a sparse array data structure implemented in terms of a radix tree (see http://en.wikipedia.org/wiki/Radix_tree for a summary of what they are).

The forthcoming datasheet code will need a sparse array, and this one is an OK implementation.

Ben Pfaff <blp>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #12231:  sparse-array.patch added by blp (38KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by blp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-03-25 blp StatusReady For Test/Review Done
        Open/ClosedOpen Closed
    2007-03-22 blp Attached File- Added sparse-array.patch, #12231

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code