randomGraph: use cpp version