Does MATLAB java.util have non-hash map/set? -


java.util.map/set abstract. have java.util.hashmap/hashset/hashtable. have map/set sorted keys in java.util?

sure, treeset, treemap.

documentation part of java. e.g., can start here: https://docs.oracle.com/javase/7/docs/api/java/util/treeset.html

some examples:

>> x = java.util.treeset; >> x.add(2); >> x.add(1); >> x.add(3); >> x x = [1.0, 2.0, 3.0]  >> y = java.util.treemap; >> y.put(10, 'ten'); >> y.put(20, 'twenty'); >> y.put(1, 'one'); >> y y = {1.0=one, 10.0=ten, 20.0=twenty} 

to see list of available java classes, it's easiest use javadocs web site, https://docs.oracle.com/javase/7/docs/api/

as noted in comments, calling java classes matlab not particularly fast. believe matlab uses java reflection construct allow execution of ad hoc, uncompiled java code ... not fast. still useful.


Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

mouseevent - Catch mouse event on tree widget item in QTreeWidget -

Java JSoup error fetching URL -