Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Julia 0.6 #6

Merged
merged 1 commit into from
May 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ os:
- linux
- osx
julia:
- release
- 0.4
- 0.5
- 0.6
- nightly
notifications:
email: false
# uncomment the following lines to override the default test script
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("Munkres"); Pkg.test("Munkres"; coverage=true)'
# script:
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
# - julia -e 'Pkg.clone(pwd()); Pkg.build("Munkres"); Pkg.test("Munkres"; coverage=true)'
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
julia 0.4-
julia 0.4
17 changes: 12 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
environment:
matrix:
- JULIAVERSION: "julialang/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe"
- JULIAVERSION: "julialang/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
- JULIAVERSION: "julianightlies/bin/winnt/x86/julia-latest-win32.exe"
- JULIAVERSION: "julianightlies/bin/winnt/x64/julia-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.4/julia-0.4-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"

branches:
only:
Expand All @@ -17,13 +21,16 @@ notifications:
on_build_status_changed: false

install:
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
# Download most recent Julia Windows binary
- ps: (new-object net.webclient).DownloadFile(
$("http://s3.amazonaws.com/"+$env:JULIAVERSION),
$env:JULIA_URL,
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- C:\projects\julia-binary.exe /S /D=C:\projects\julia

build: off

build_script:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
Expand Down
8 changes: 4 additions & 4 deletions src/Munkres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function step_five!(mask_array, row_cover, column_cover, path_start)
row = -1
column = -1

path = Array(Location,0)
path = Vector{Location}(0)
push!(path, path_start)

while ~done
Expand Down Expand Up @@ -237,7 +237,7 @@ function step_six!(cost,row_cover,column_cover, zero_locations)
end

cost.row_offsets[row_cover] -= min_value
cost.column_offsets[!column_cover] += min_value
cost.column_offsets[map(!, column_cover)] += min_value

#need to deal with any zeros going away in covered columns and rows
for i = 1:length(zero_locations)
Expand Down Expand Up @@ -302,8 +302,8 @@ end
function find_smallest_uncovered(cost, row_cover, column_cover)
#find the locations and value of the minimum of the cost matrix in the uncovered rows and columns
min_value = typemax(eltype(cost))
uncovered_row_inds = find(!row_cover)
uncovered_col_inds = find(!column_cover)
uncovered_row_inds = find(map(!, row_cover))
uncovered_col_inds = find(map(!, column_cover))
min_locations = Tuple{Int, Int}[]
for j in uncovered_col_inds, i in uncovered_row_inds
@inbounds c = cost[i,j]
Expand Down