Computes vector with energy difference (for TI) and Boltzmann factor.