From 87eea2370c780835fe7d0f57ac5d7be05c4da8d1 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sat, 20 Jan 2018 01:05:05 +0100 Subject: [PATCH] Update parameter type. --- src/Munkres.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Munkres.jl b/src/Munkres.jl index 924af98..8b289cf 100644 --- a/src/Munkres.jl +++ b/src/Munkres.jl @@ -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: @@ -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