Semi-alternating projection algorithm