kkaempf / swig-issues

Issues from SWIG (testing)
0 stars 0 forks source link

[java] std_list.i for Java #28

Open SwigAtSF opened 11 years ago

SwigAtSF commented 11 years ago

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.

SwigAtSF commented 11 years ago
SwigAtSF commented 11 years ago

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.

SwigAtSF commented 11 years ago

Another contribution: http://chadretz.wordpress.com/2009/11/27/stl-collections-with-java-and-swig/

SwigAtSF commented 11 years ago

See also feature request: 3175719 & 3175718

Direct link: https://sourceforge.net/tracker/?func=detail&aid=3175718&group_id=1645&atid=301645 https://sourceforge.net/tracker/?func=detail&aid=3175719&group_id=1645&atid=301645

SwigAtSF commented 11 years ago

See also patch #3219515

SwigAtSF commented 11 years ago

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.