Skip to content

Commit 9d8caab

Browse files
authored
Merge pull request #21 from ZIB-IOL/bump-julia
bump Julia compat bound
2 parents dfa666b + 6c2501c commit 9d8caab

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GraphsMatching = "0.2"
2424
Hungarian = "0.7.0"
2525
LinearAlgebra = "1"
2626
MathOptInterface = "1"
27-
julia = "1"
27+
julia = "1.10"
2828

2929
[extras]
3030
HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b"

src/spanning_tree.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,17 @@ function FrankWolfe.compute_extreme_point(
1818
N = length(direction)
1919
iter = collect(Graphs.edges(lmo.graph))
2020
distmx = spzeros(N, N)
21-
min_weight = minimum(direction)
22-
# we add a positive offset for negative weights
23-
# not changing optimal solutions since all trees have the same # of edges
24-
offset = min_weight > 0 ? zero(min_weight) : 1 - min_weight
2521
for idx in 1:N
26-
distmx[src(iter[idx]), dst(iter[idx])] = direction[idx] + offset
27-
distmx[dst(iter[idx]), src(iter[idx])] = direction[idx] + offset
22+
distmx[src(iter[idx]), dst(iter[idx])] = direction[idx]
23+
distmx[dst(iter[idx]), src(iter[idx])] = direction[idx]
2824
end
2925
span = Graphs.kruskal_mst(lmo.graph, distmx)
3026
v = spzeros(N)
3127
for edge in span
3228
for i in 1:N
3329
if (src(edge) == src(iter[i]) && dst(edge) == dst(iter[i]))
3430
v[i] = 1
31+
break
3532
end
3633
end
3734
end

0 commit comments

Comments
 (0)