bugPSPP - Bugs: bug #24502, In variable view, variables cannot...

 
 

bug #24502: In variable view, variables cannot be inserted at arbitrary positions

Submitted by:  John Darrington <jmd>
Submitted on:  Thu 09 Oct 2008 08:30:16 AM UTC  
 
Category: Graphical User InterfaceSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: Before 0.8.0
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 15 Dec 2008 10:52:45 AM UTC, comment #4:

This is fixed in the latest "master" repository.

John Darrington <jmd>
Project Administrator
Sun 30 Nov 2008 04:11:25 AM UTC, comment #3:

I fixed this in the rewrite-sheet branch.

Leaving this item open until that branch is merged.

John Darrington <jmd>
Project Administrator
Mon 27 Oct 2008 04:40:53 PM UTC, comment #2:

>Inserting variables anywhere except at the end however is going to
>be a problematic when there are a large number of variables,
>because the implementation of src/data/dictionary.c doesn't really
>support inserting/deleting at arbitrary positions. Like the
>comment to dict_reorder_var says, it runs in linear time.
>
>Would it be possible to reimplement dictionary.c using
>src/libpspp/abt.c ?? This would make insertions/deletions run in
>O(log n).


We are talking about inserting a variable into a dictionary at user request, right? In that case it should be completely unnecessary to make anything faster. Even if it takes 100 ms to reorder the dictionary (and it won't for less than many thousands of variables) then the user will never notice the delay. And switching to abt would slow down everything that looks up a variable by index, so I don't think it's a good tradeoff.

Ben Pfaff <blp>
Project Administrator
Mon 27 Oct 2008 11:34:44 AM UTC, comment #1:

I'll try to get around to looking at this soon.

Inserting variables anywhere except at the end however is going to be a problematic when there are a large number of variables, because the implementation of src/data/dictionary.c doesn't really support inserting/deleting at arbitrary positions. Like the comment to dict_reorder_var says, it runs in linear time.

Would it be possible to reimplement dictionary.c using src/libpspp/abt.c ?? This would make insertions/deletions run in O(log n).
We still however need a way of retrieving a variable by index. I think this could be done by making the abt work in cooperation with a hash or hmap where the abt node is keyed by index.

Does this sound plausible?

John Darrington <jmd>
Project Administrator
Thu 09 Oct 2008 08:30:16 AM UTC, original submission:

Reported by Janice Adelaide:

I have been trying to insert a new row of variables between two existing rows. Unfortunately, I have been able to insert rows only at the top i.e. when clicking on the "insert variable" button, it always inserts the row of new variables at the top and I am not being able to copy or cut it to another location.

John Darrington <jmd>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Dec 2008 10:52:45 AM UTCjmdStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sun 30 Nov 2008 04:11:25 AM UTCjmdStatusNone=>In Progress
    Mon 27 Oct 2008 11:34:44 AM UTCjmdReleaseNone=>Before 0.8.0

    Back to the top


    Powered by Savane 3.1-cleanup1