try compiling the mex part with MATLAB's version of g++/libstdc++
that's it.. rewrite in java
ok eclipse, you win
make it compile
fix linear indexing bug; make tests pass