Imperative, object-oriented C++ implementation for <https://github.com/alexander-b/master-thesis>.