Skip to content

short C++ graph/computational geometry algorthim for finding the faces of a planar graph given its vertices and edges.

Notifications You must be signed in to change notification settings

Lorenzovagliano/GraphFacesFinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 

Repository files navigation

GraphFacesFinder


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).

Tools



How to use it

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:

02Fzi15

About

short C++ graph/computational geometry algorthim for finding the faces of a planar graph given its vertices and edges.

Topics

Resources

Stars

Watchers

Forks

Languages