adapted C++ code to new version of package 'robustHD'