C++ Implementation of the Q-Digest