Skip to content

Commit

Permalink
Merge pull request #7 from dourouc05/dourouc05/types
Browse files Browse the repository at this point in the history
Update parameter type.
  • Loading branch information
Gnimuc authored Jan 22, 2018
2 parents c64cf98 + 87eea23 commit f1bc265
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Munkres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ julia> full(matching)
0 0 2
```
"""
function munkres(costMat::Array{T,2}) where {T<:Real}
function munkres(costMat::AbstractMatrix{T}) where {T<:Real}
size(costMat,2) size(costMat,1) || throw(ArgumentError("Non-square matrix should have more columns than rows."))
A = copy(costMat)
# preliminaries:
Expand Down Expand Up @@ -237,7 +237,7 @@ end
"""
Step 3 of the original Munkres' Assignment Algorithm
"""
function step3!(A::Array{T,2}, Zs, rowCovered, columnCovered) where {T<:Real}
function step3!(A::AbstractMatrix{T}, Zs, rowCovered, columnCovered) where {T<:Real}
# step 3(Step C):
# "let h denote the smallest uncovered element of the matrix;"
# find h and track the location of those new zeros
Expand Down

0 comments on commit f1bc265

Please sign in to comment.