1.1 KiB
1.1 KiB
I stumbled across this because I was researching what the most efficient way of implementing our FruxelGrid was. In this StackOverflow answer I got pointed to graph theory.
Definitions
| Definition | Meaning |
|---|---|
| Node / Vertex | The object doing some work |
| Edge | Path between two Nodes |
| Node degree | Number of edges that touch the node / vertex |
| Graph | Combination of Nodes and Vertices / Nodes |
| Eulerian Graph | Exactly zero or two nodes have an odd degree |
Rules
- Exactly zero or two vertices can have an odd (=uneven) degree
Implementation in C++
- direct Translation of the Definition: create a
std::vectorfor a list of vertices and a list of edges. The edges themselves are represented as astd::pair - Adjacency List
- Adjacency Matrix

