Actually, you really don't want this. It certainly would be a Bad Thing if the crossover operators depended in some way on the OnesMax problem. They're much more general than that.