Boltzmann Factor in a loop

Well, if you want to assign in place to a vector then you need to have a handle to that vector.