Grab Bag Release: Graphs

Last week, I’ve been to Munich with my girlfriend, celebrating indie comics and her winning the Kurt Schalker Award! 🙂 AND I’ve found some time for working on my graph implementation.


Graphs are pairs G = (V, E) where V denotes some set of vertices and E some set of edges between these vertices.

My implementation stores the set of edges of the graph as adjacency list, making it fast at enumerating vertex neighbors, but slows at accessing specific edges for dense graphs (which have many edges between each pair of vertices. It allows adding multiple edges between two vertices, thus being feasible for modeling multi-graphs. Also, it allows creating loops, edges whose source and target vertex are identical.

Author: npruehs

Nick Pruehs is a Co-Founder of Slash Games, Hamburg. In 2009, he graduated as “Best Bachelor” in computer science at Kiel University. Two years later Nick finished his master’s degree in “Sound, Vision, Games” at Hamburg University of Applied Sciences, becoming the Lead Programmer of Daedalic Entertainment shortly after.

1 thought on “Grab Bag Release: Graphs”

Questions? Comments? Suggestions? Your turn! :)