1) In our implementation for LTE transmission mode 7- single layer beamforming, we calculate the precoders based on Signal-to-Leakage-and-Noise Ratio Maximization (SLNR-Max). So beamforming_vec denote the precoders/beamformers that are calculated based on SLNR-Max, meaning that the radiated power into the direction of the intended user is maximized, while the radiated power into the direction of the interfering users from the neighboring eNodeB is minimized.
2) Beamforming can be done in analog and digital domain. In analog beamforming analog phase shifters are used to steer the emitted signal in a certain direction by the antenna array. In digital beamforming, different signals can be designed for each antenna in the baseband, one way to do that is as explained in 1).
Please check documentation for more details about our implementation of transmission mode 7 and further references for SLNR-Max algorithm.