C++ source code for  arXiv:1106.4911