Tag Archives: c++

C++: implementing const_iterator and non-const iterator without code duplication

C++ 11

C++ 11

Over the last couple of weeks I’ve been working on a custom data structure that provides iterators (both const and “regular” non-const) that adhere to the STL C++ ’11 standards. Having these iterators would make my life easier, as it allows me to use standard STL algorithms (like std::find) on my data structures. However, implementing this data structure and the appropriate iterators made my life miserable for a few hours. Especially the implementation the two iterators without duplicating code wasn’t as straight-forward as I hoped. Here’s how I did it – it might help you (and me, when I want to do this again in the future)
Continue reading

Eclipse, C++ and Qt: use a C++ project as a library to another C++/Qt project

I’ve been developing C++ applications (using Eclipse CDT) for quite some time now, but recently I tried to link a previously developed C++ project as a library into a newly created C++/Qt project. The Eclipse Qt integration is a bit dated, but still works with Qt 4.8.1 on my Ubuntu 12.04 machine. However, it uses qmake, which is not configureable from Eclipse in a straightforward way. This post describes some tips and tricks – for my own future reference, but also for anyone out there experiencing similar difficulties.
Continue reading

SIGMOD 2011: A memory efficient reachability data structure through bit vector compression

During the last year of my Utrecht master’s degree, I worked on a research project at the University of Oxford with Prof. Oege de Moor: reachability queries on large directed graphs. This work eventually led to a paper at ACM SIGMOD 2011, one of the largest international conferences on management of data. In this post, I will endeavour to convey the intuition behind our approach: bit vector compression using a specially designed scheme called PWAH.
Continue reading