Skip to content

Commit 3b0330b

Browse files
format
1 parent 015079a commit 3b0330b

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

src/alg_traits.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ requiresgradient(opt) = false
140140
allowsfg(opt)
141141
142142
Trait declaration for whether an optimizer
143-
allows combined function and gradient evaluation
143+
allows combined function and gradient evaluation
144144
in `instantiate_function`.
145145
146146
Defaults to false.
@@ -161,7 +161,7 @@ requireshessian(opt) = false
161161
allowsfgh(opt)
162162
163163
Trait declaration for whether an optimizer
164-
allows combined function, gradient, and hessian
164+
allows combined function, gradient, and hessian
165165
evaluation in `instantiate_function`.
166166
167167
Defaults to false.
@@ -172,7 +172,7 @@ allowsfgh(opt) = false
172172
requiresconsjac(opt)
173173
174174
Trait declaration for whether an optimizer
175-
requires `cons_j` in `instantiate_function`, that is,
175+
requires `cons_j` in `instantiate_function`, that is,
176176
does the optimizer require a constraints' Jacobian.
177177
178178
Defaults to false.
@@ -205,7 +205,7 @@ allowsconsvjp(opt) = false
205205
requiresconshess(opt)
206206
207207
Trait declaration for whether an optimizer
208-
requires cons_h in `instantiate_function`, that is,
208+
requires cons_h in `instantiate_function`, that is,
209209
does the optimizer require constraints' hessian.
210210
211211
Defaults to false.
@@ -216,7 +216,7 @@ requiresconshess(opt) = false
216216
requireslagh(opt)
217217
218218
Trait declaration for whether an optimizer
219-
requires lag_h in `instantiate_function`, that is,
219+
requires lag_h in `instantiate_function`, that is,
220220
does the optimizer require lagrangian hessian.
221221
222222
Defaults to false.

src/remake.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ function _remake_internal(thing; kwargs...)
3333
named_thing = struct_as_namedtuple(thing)
3434
if :kwargs fieldnames(typeof(thing))
3535
if :args fieldnames(typeof(thing))
36-
named_thing = Base.structdiff(named_thing, (;args=()))
36+
named_thing = Base.structdiff(named_thing, (; args = ()))
3737
if :args keys(kwargs)
38-
k = Base.structdiff(named_thing, (;args=()))
38+
k = Base.structdiff(named_thing, (; args = ()))
3939
if :kwargs keys(kwargs)
4040
T(; named_thing..., thing.kwargs..., kwargs...)
4141
else
4242
T(; named_thing..., kwargs[:kwargs]...)
4343
end
4444
else
45-
kwargs2 = Base.structdiff((;kwargs...), (;args=()))
45+
kwargs2 = Base.structdiff((; kwargs...), (; args = ()))
4646
if :kwargs keys(kwargs)
4747
T(kwargs[:args]...; named_thing..., thing.kwargs..., kwargs2...)
4848
else

src/solve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ callback = function (state, l, pred; doplot = false) #callback function to obser
7979
end
8080
```
8181
82-
If the chosen method is a global optimizer that employs a local optimization
83-
method, a similar set of common local optimizer arguments exists. Look at `MLSL` or `AUGLAG`
82+
If the chosen method is a global optimizer that employs a local optimization
83+
method, a similar set of common local optimizer arguments exists. Look at `MLSL` or `AUGLAG`
8484
from NLopt for an example. The common local optimizer arguments are:
8585
8686
- `local_method`: optimizer used for local optimization in global method

test/remake_tests.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,12 @@ tmp = newprob.g([0.0, 0.0, 0.0], [1.0, 2.0, 3.0], nothing, 0.0)
286286
@test tmp[0.2, 0.4, 0.6] atol=1e-6
287287

288288
struct Remake_Test1
289-
p
290-
args
291-
kwargs
289+
p::Any
290+
args::Any
291+
kwargs::Any
292292
end
293293
Remake_Test1(args...; p, kwargs...) = Remake_Test1(p, args, kwargs)
294-
a = Remake_Test1(p=1)
295-
@test @inferred remake(a, p=2) == Remake_Test1(p=2)
296-
@test @inferred remake(a, args=1) == Remake_Test1(1, p=1)
297-
@test @inferred remake(a, kwargs=(;a=1)) == Remake_Test1(p=1, a=1)
294+
a = Remake_Test1(p = 1)
295+
@test @inferred remake(a, p = 2) == Remake_Test1(p = 2)
296+
@test @inferred remake(a, args = 1) == Remake_Test1(1, p = 1)
297+
@test @inferred remake(a, kwargs = (; a = 1)) == Remake_Test1(p = 1, a = 1)

0 commit comments

Comments
 (0)