Expose compare and swap methods for algorithms that have them

Fixes #16