Algorithm class impl