C++ implementation of an aggregation algorithm designed by Robin Lamarche-Perrin