How can i use java.util.TreeSet in MATLAB with user type elements and user defined comparator -
i'm new matlab , mother language c++. i'm trying implement algorithm in matlab uses balanced tree. know can done using java.util.treeset. don't know how provide own comparator tree. next code parse error
classdef sitescomparator < java.util.comparator<site>
also, in c++ can implement bool operator<(const type& other)
. can in matlab, e.g. implement lt(a, b)
or this?
if comparator requires compiled java, need write , compile outside of matlab, , import use within matlab.
to use compliled java within matlab, see: https://stackoverflow.com/a/9521010/931379
if can construct comparator using existing java classes, can construct within matlab , use within java.
Comments
Post a Comment