FugroRoames / Munkres.jl

Munkres algorithm for the optimal assignment problem
Other
20 stars 7 forks source link

Perfomance issue #4

Open PaulBellette opened 8 years ago

PaulBellette commented 8 years ago

The way that the code keeps track of the minimum modified cost is a little slow, the bottleneck when profiling is

function Base.getindex(cost::ModifiedCost, i, j)
@inbounds return cost.m[i,j] - cost.row_offsets[i] - cost.column_offsets[j]
end

This gets called very often in step_six! so it might be a better idea just to use broadcasting to keep updating the cost matrix instead