Implements the MixMAP algorithm