Adding all functions for graphs (c++ only)