External module function IMcalc - used by singleion

This function is optional and intended to accellerate singleion by vectorizing the temperature and thus save computation resources when using the option -Tsteps. It has the same parameters as Icalc with the following modifications:

  1. double $\ast$ T is replaced by Vector & T containing the temperatures for which the calculation is to be done.
  2. Vector & I is replaced by Matrix & I which should be filled with column vectors containing the vector $\mathbf I$. Each column corresponds to a temperature given as inputVector & T.
  3. double $\ast$ U is replaced by Vector & U which should be filled with the energies corresponding to the temperatures in Vector & T
  4. double $\ast$ lnZ is replaced by Vector & lnZ which shoul be filled with the partition sums corresponding to the temperatures in Vector & T