Let f be the number of face cycles, n be the number of nodes, m be the number of edges, and let c be the number of connected components. The genus is zero if and only if the map is planar, i.e., there is an embedding of G into the plane such that for every node v the counter-clockwise ordering of the edges around v agrees with the cyclic ordering of v 's adjacency list. If a graph G is a map the faces of G can be constructed explicitly by G . Note that any update operation performed on G invalidates the list of faces. See the section on face operations for a complete list of available operations for faces.
G creates an object G of type graph and initializes it to the empty directed graph.
G is directed. G is undirected. G is empty. The operation returns the new edge x . The operation returns the new edge x .