Structure of sexual networks determines the operation of sexual selection