From 351773c14dc90b232c99108d919b9db383daadd1 Mon Sep 17 00:00:00 2001 From: Mohamed Tarek Date: Thu, 16 Nov 2023 07:03:42 +0200 Subject: [PATCH] formatting --- src/NonconvexMultistart.jl | 3 +-- src/hyperopt.jl | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/NonconvexMultistart.jl b/src/NonconvexMultistart.jl index 338fdad..ed8618c 100644 --- a/src/NonconvexMultistart.jl +++ b/src/NonconvexMultistart.jl @@ -6,8 +6,7 @@ export HyperoptAlg, import Hyperopt using Reexport, Parameters, Setfield, ChainRulesCore, Sobol @reexport using NonconvexCore -using NonconvexCore: - reset!, isfeasible, VecModel, AbstractOptimizer, AbstractResult +using NonconvexCore: reset!, isfeasible, VecModel, AbstractOptimizer, AbstractResult import NonconvexCore: optimize!, Workspace include("hyperopt.jl") diff --git a/src/hyperopt.jl b/src/hyperopt.jl index 37b4c59..b874421 100644 --- a/src/hyperopt.jl +++ b/src/hyperopt.jl @@ -1,4 +1,4 @@ -struct HyperoptAlg{S <: AbstractOptimizer} <: AbstractOptimizer +struct HyperoptAlg{S<:AbstractOptimizer} <: AbstractOptimizer sub_alg::S end @@ -15,7 +15,7 @@ end - `ctol`: infeasibility tolerance for accepting a solution as feasible - `keep_all`: if true, all the solutions of the sub-problems will be saved """ -struct HyperoptOptions{S1, L, U, S2 <: Hyperopt.Sampler, C} +struct HyperoptOptions{S1,L,U,S2<:Hyperopt.Sampler,C} sub_options::S1 lb::L ub::U @@ -47,7 +47,7 @@ function HyperoptOptions(; ) end -struct HyperoptWorkspace{S <: Workspace, X <: AbstractVector, O <: HyperoptOptions} <: Workspace +struct HyperoptWorkspace{S<:Workspace,X<:AbstractVector,O<:HyperoptOptions} <: Workspace sub_workspace::S x0::X options::O @@ -78,7 +78,7 @@ When using multiple x0 in [`optimize`](@ref), return this result, including foll - `results`: all the search results. - `optimal_ind`: the index of the optimal solution in `results`. """ -struct HyperoptResult{M1, M2, R, O} <: AbstractResult +struct HyperoptResult{M1,M2,R,O} <: AbstractResult minimum::M1 minimizer::M2 results::R