Yi, It seems to fail for 2x2 (0.0022% of the time) and 3x3 cost matrices about 0.014% of random cases. For 4x4, it hasn't failed in over 1 million cases, but that doesn't mean that it won't in some larger sample. That means it's a real tough bug to track down, I would guess. Bill
I'm running the example you have in the comments of your code:
% Example 2: 1000 x 1000 random data
toc % about 0.5 seconds
And it's taking substantially longer than a few seconds to solve, more like 40 seconds. This is on a fairly new Intel core i5-2400 3.10GHz processor with 64-bit Windows 7 and 16 Gb RAM.
In your great amount of experience optimizing your code here, could you suggest a reason why this may be taking so long to compute?
This code looks very interesting.
I am using v3.0 and I possibly hit a bug/problem. It seems to me that, for different cost matrices (coming from the underlying problem with a varying size) the solution switches between being in row mode and col mode.
I don't see any parameter/switch to control this behavior, is it intended to be like that? how can I get the solution always in term of e.g. col indices? Fabio