Skip to content

Commit df0c7d0

Browse files
authored
Merge pull request #23 from MPF-Optimization-Laboratory/up
fixed tiny bug
2 parents 7e061b9 + bd4ea48 commit df0c7d0

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/omp.jl

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
# struct OMPTracer{T}
2-
# iteration::Vector{Int}
3-
# lambda::Vector{T}
4-
# active::Vector{Vector{Int}} # Store active indices instead of full sparse vectors
5-
# values::Vector{Vector{T}} # Store corresponding values for active indices
6-
# end
7-
8-
# Base.length(t::OMPTracer) = length(t.iteration)
9-
10-
# function Base.getindex(t::OMPTracer, i::Integer)
11-
# return t.active[i], t.values[i], t.lambda[i]
12-
# end
13-
14-
# Base.lastindex(t::OMPTracer) = lastindex(t.iteration)
15-
161
@doc raw"""
172
```julia
183
asp_omp(A,B)```
@@ -197,7 +182,6 @@ function asp_omp(
197182
# mul!(z, A', r)
198183
nprodAt += 1
199184
zmax, p = findmax(abs.(z))
200-
push!(active, p)
201185

202186
# if z[p] < 0
203187
# state[p] = -1
@@ -222,6 +206,7 @@ function asp_omp(
222206
sparse_x_full[copy(active)] = copy(x)
223207
push!(tracer.solution, copy(sparse_x_full))
224208
end
209+
push!(active, p)
225210

226211
end #while true
227212

0 commit comments

Comments
 (0)