Skip to content

Commit

Permalink
Merge pull request #17 from tinatorabi/main
Browse files Browse the repository at this point in the history
fixed issue sparsevec
  • Loading branch information
tinatorabi authored Aug 29, 2024
2 parents f6a0552 + fc9a4d8 commit 881a7c6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/BPDual.jl
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,16 @@ function bpdual(
if traceFlag
push!(tracer.iteration, itn)
push!(tracer.lambda, λ)
sparse_x_full = SparseVector(n, copy(active), copy(x))
sparse_x_full = spzeros(n)
sparse_x_full[copy(active)] = copy(x)
push!(tracer.solution, copy(sparse_x_full))
end
end

push!(tracer.iteration, itn)
push!(tracer.lambda, λ)
sparse_x_full = SparseVector(n, copy(active), copy(x))
sparse_x_full = spzeros(n)
sparse_x_full[copy(active)] = copy(x)
push!(tracer.solution, copy(sparse_x_full))

tottime = time() - time0
Expand All @@ -388,4 +390,4 @@ function bpdual(
@info "Solution time (sec): $tottime"
end
return tracer
end
end

0 comments on commit 881a7c6

Please sign in to comment.