Linkable C++ clustering