From e44582d8f4a4d7e05c538d878d1d199a1347726f Mon Sep 17 00:00:00 2001 From: soldasim Date: Tue, 14 Jan 2025 16:00:55 +0100 Subject: [PATCH] add 'Base.copy(::BossProblem)' --- src/problem.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/problem.jl b/src/problem.jl index 4eb9889..2d0f02b 100644 --- a/src/problem.jl +++ b/src/problem.jl @@ -35,6 +35,8 @@ See also: [`bo!`](@ref) y_max::AbstractVector{<:Real} = fill(Inf, y_dim(data)) end +Base.copy(problem::BossProblem) = BossProblem(getfield.(Ref(problem), fieldnames(BossProblem))...) + """ slice(::BossProblem, slice::Int) -> ::BossProblem