Make copy() call transform (..., identity<...>) to reduce redundancy. Move algorithm interfaces to algorithm.hpp