Switches and frequency converters based on cross-gain modulation in the co-propagating and counter-propagating configurations