jni wrapper for c++ parametric maxflow implementation