C++ version for "A practical algorithm for topic modeling with provable guarantees"