This program is able to list all of the faces of a planar graph(with straight edges), which is inputted by the user through its number of vertices, number of edges and its vertices(which must contain 2D coordinates, degree and adjacency list).
In order to compile the program, use the following command:
g++ faces.cpp -o faces
To run the program, use:
./faces
-
The format of the inputs must be the following:
N(number of vertices) M(number of edges)
X Y degree adjacentvertex1 adjacentvertex2 adjacentvertex3... (This will be vertex 1)
X Y degree adjacentvertex1 adjacentvertex2 adjacentvertex3... (This will be vertex 2)
X Y degree adjacentvertex1 adjacentvertex2 adjacentvertex3... (This will be vertex 3)
-
The output will have the following format:
Number of Faces
Size Face1
Size Face2
Size Face3
...
-
Example: