@@ -26,10 +26,10 @@ Create an `ExploreSettings` object to configure the exploration of a search spac
26
26
"""
27
27
function ExploreSettings (
28
28
domains;
29
- complete_search_limit= 10 ^ 6 ,
30
- max_samplings= sum (domain_size, domains; init= 0 ),
31
- search= :flexible ,
32
- solutions_limit= floor (Int, sqrt (max_samplings)),
29
+ complete_search_limit = 10 ^ 6 ,
30
+ max_samplings = sum (domain_size, domains; init = 0 ),
31
+ search = :flexible ,
32
+ solutions_limit = floor (Int, sqrt (max_samplings)),
33
33
)
34
34
return ExploreSettings (complete_search_limit, max_samplings, search, solutions_limit)
35
35
end
@@ -54,8 +54,8 @@ mutable struct Explorer{F1<:Function,D<:AbstractDomain,F2<:Union{Function,Nothin
54
54
function Explorer (
55
55
concepts,
56
56
domains,
57
- objective= nothing ;
58
- settings= ExploreSettings (domains),
57
+ objective = nothing ;
58
+ settings = ExploreSettings (domains),
59
59
)
60
60
F1 = isempty (concepts) ? Function : Union{map (c -> typeof (c[1 ]), concepts)... }
61
61
D = isempty (domains) ? AbstractDomain : Union{map (typeof, domains)... }
@@ -76,7 +76,7 @@ function Explorer()
76
76
end
77
77
78
78
function Base. push! (explorer:: Explorer , concept:: Tuple{Function,Vector{Int}} )
79
- max_key = maximum (keys (explorer. concepts); init= 0 )
79
+ max_key = maximum (keys (explorer. concepts); init = 0 )
80
80
explorer. concepts[max_key+ 1 ] = concept
81
81
return max_key + 1
82
82
end
@@ -87,7 +87,7 @@ function delete_concept!(explorer::Explorer, key::Int)
87
87
end
88
88
89
89
function Base. push! (explorer:: Explorer , domain:: AbstractDomain )
90
- max_key = maximum (keys (explorer. domains); init= 0 )
90
+ max_key = maximum (keys (explorer. domains); init = 0 )
91
91
explorer. domains[max_key+ 1 ] = domain
92
92
return max_key + 1
93
93
end
99
99
100
100
set! (explorer:: Explorer , objective:: Function ) = explorer. objective = objective
101
101
102
- function update_exploration! (explorer, f, c, search= explorer. settings. search)
102
+ function update_exploration! (explorer, f, c, search = explorer. settings. search)
103
103
solutions = explorer. state. solutions
104
104
non_sltns = explorer. state. non_solutions
105
105
obj = explorer. objective
@@ -174,7 +174,7 @@ Search (a part of) a search space and return a pair of vectors of configurations
174
174
# Returns
175
175
- A tuple of sets: `(solutions, non_solutions)`.
176
176
"""
177
- function explore (domains, concept; settings= ExploreSettings (domains), parameters... )
177
+ function explore (domains, concept; settings = ExploreSettings (domains), parameters... )
178
178
f = x -> concept (x; parameters... )
179
179
explorer = Explorer ([(f, Vector {Int} ())], domains; settings)
180
180
explore! (explorer)
0 commit comments