Skip to content

Commit 5f880f1

Browse files
committed
Addition one more optional argument -- mutation choice -- to create_child and incorporating it in Mutate.jl
1 parent 64c00b7 commit 5f880f1

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/Mutate.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ end
261261
before_loss,
262262
options;
263263
parent_ref=parent_ref,
264+
mutation_choice=mutation_choice,
264265
),
265266
mutation_accepted,
266267
num_evals,
@@ -284,6 +285,7 @@ end
284285
before_loss,
285286
options;
286287
parent_ref=parent_ref,
288+
mutation_choice=mutation_choice,
287289
),
288290
mutation_accepted,
289291
num_evals,

src/PopMember.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ function create_child(
213213
loss::L,
214214
options;
215215
complexity::Union{Int,Nothing}=nothing,
216+
mutation_choice::Union{Symbol,Nothing}=nothing,
216217
parent_ref,
217218
) where {T,L,P<:PopMember{T,L}}
218219
actual_complexity = @something complexity compute_complexity(tree, options)
@@ -241,6 +242,7 @@ function create_child(
241242
loss::L,
242243
options;
243244
complexity::Union{Int,Nothing}=nothing,
245+
mutation_choice::Union{Symbol,Nothing}=nothing,
244246
parent_ref,
245247
) where {T,L,P<:PopMember{T,L}}
246248
actual_complexity = @something complexity compute_complexity(tree, options)

test/test_abstract_popmember.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
loss::L,
108108
options;
109109
complexity::Union{Int,Nothing}=nothing,
110+
mutation_choice::Union{Symbol,Nothing}=nothing,
110111
parent_ref,
111112
) where {T,L}
112113
actual_complexity = @something complexity SymbolicRegression.compute_complexity(
@@ -131,6 +132,7 @@
131132
loss::L,
132133
options;
133134
complexity::Union{Int,Nothing}=nothing,
135+
mutation_choice::Union{Symbol,Nothing}=nothing,
134136
parent_ref,
135137
) where {T,L,N<:AbstractExpression{T}}
136138
actual_complexity = @something complexity SymbolicRegression.compute_complexity(

0 commit comments

Comments
 (0)