Clears the graph of all nodes and edges.
After calling this method, the graph is empty.
void clear();