Generalized measurements by linear elements