File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments