Analogue devices in which mathematical operations are carried out with the aid of optical or electro-optical elements