Add cpp versions of graph processing scripts