C++ implementation of the Adaptive Search algorithm