C++ code written as part of my PhD