Skip to content

Commit 0e23764

Browse files
committed
Improve performances for complete search
1 parent 55ea37e commit 0e23764

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/explore.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ end
4444

4545
struct ExplorerState{T}
4646
best::Vector{T}
47-
solutions::Set{Vector{T}}
48-
non_solutions::Set{Vector{T}}
47+
solutions::Vector{Vector{T}}
48+
non_solutions::Vector{Vector{T}}
4949

50-
ExplorerState{T}() where {T} = new{T}([], Set{Vector{T}}(), Set{Vector{T}}())
50+
ExplorerState{T}() where {T} = new{T}(Vector{T}(), Vector{Vector{T}}(), Vector{Vector{T}}())
5151
end
5252

5353
ExplorerState(domains) = ExplorerState{Union{map(eltype, domains)...}}()
@@ -257,6 +257,8 @@ function _explore!(explorer, f, ::Val{:partial};)
257257
config = map(rand, domains)
258258
update_exploration!(explorer, f, config)
259259
end
260+
unique!(explorer.state.solutions)
261+
unique!(explorer.state.non_solutions)
260262
return nothing
261263
end
262264

0 commit comments

Comments
 (0)