#144 [java] std_list.i for Java

None
closed-rejected
None
5
2016-09-12
2006-03-28
lluisp
No

I adapted std_vector.i for Java to get a std_list.

It is not really nice, since the only way I found was
to create a "get" method for lists to access i-th item
(completely inefficient, but at least you can recover
the info from STL lists...)

I attach it in case you find it useful.

Discussion

  • lluisp

    lluisp - 2006-03-28
     
  • Olly Betts

    Olly Betts - 2006-09-16
    • assigned_to: nobody --> wsfulton
     
  • Olly Betts

    Olly Betts - 2006-09-16

    Logged In: YES
    user_id=14972

    Assigning to William in lieu of older version of this patch
    which I've just closed as a duplicate.

     
  • Olly Betts

    Olly Betts - 2006-09-25
    • summary: std_list.i for Java --> [java] std_list.i for Java
     
  • William Fulton

    William Fulton - 2011-03-17

    See also patch #3219515

     
  • Vadim Zeitlin

    Vadim Zeitlin - 2012-01-13

    IMO this patch is not a good solution as the list shouldn't provide indexed access, this is not how it's supposed to be used and it can easily result in O(N^2) execution time. The other patch (https://sourceforge.net/tracker/?func=detail&aid=3219515&group_id=1645&atid=301645) is better.

     
  • Olly Betts

    Olly Betts - 2016-09-12

    https://sourceforge.net/p/swig/patches/259/ is the new location of #3219515,

    I agree that providing subscript lookup which isn't O(1) isn't a good way to go, so given there are other patches around I'm going to close this one.

     
  • Olly Betts

    Olly Betts - 2016-09-12
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     I adapted std\_vector.i for Java to get a std\_list.
    
     It is not really nice, since the only way I found was
    
    • status: open --> closed-rejected
    • Group: -->
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks