lptolik/SpatialKappa — pull request #4 by davidcsterratt (2013-11-27 17:22:25+00:00)
Title: transitionInstance.activity should be long?

I'm trying some simulations with large numbers of molecules and have hit a problem that can be solved by making the transitionInstance.activity long rather than an int . Basically the problem is that in TransitionMatchingSimulation.updateTransitionInstanceActivity():

result *= (availableCount--);

when performed on two large ints gives a negative int. This is solved by using a long for result (i.e. transitionInstance.activity).

I think it would be good to fix this, or at least have the code throw an exception when transitionInstance.activity is negative. What do you think?