You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One issue I would like to point out is the cost parameter in Solve function, which is indeed modified inside the solve function. I did not notice that in the beginning until some werid result came up (I continued to use cost data later on in the program).
I think that it would be better to make a copy of the double[,] cost in the beginning of the solve function to avoid this mis-understanding, like this:
double[,] cost_copy = cost.Clone() as double[,];
// from here on, use cost_copy ...
// ...
The text was updated successfully, but these errors were encountered:
Thanks for the comment @captainst, and apologies for the late reply -- I managed to somehow only see your post now -- and for the debugging experience you had to go through.
I agree, that's likely to cause confusion. Copying can be quite costly, performance wise, so I'd probably make it optional (but default it to copying). That'll be a breaking change to the API, but if I get around to publishing the other changes that came about since the last NuGet deploy, there will be plenty of those anyway.
Both Solver methods now come with an optional allowOverwrite (default: false) that can be toggled to improve performance in cases where copies could otherwise be avoided.
Great implementation!
One issue I would like to point out is the cost parameter in Solve function, which is indeed modified inside the solve function. I did not notice that in the beginning until some werid result came up (I continued to use cost data later on in the program).
I think that it would be better to make a copy of the double[,] cost in the beginning of the solve function to avoid this mis-understanding, like this:
The text was updated successfully, but these errors were encountered: