@@ -14,7 +14,9 @@ struct InplaceObjective{DF, FDF, FGH, Hv, FGHv}
14
14
fghv:: FGHv
15
15
end
16
16
InplaceObjective (;df= nothing , fdf= nothing , fgh= nothing , hv= nothing , fghv= nothing ) = InplaceObjective (df, fdf, fgh, hv, fghv)
17
- const InPlaceObjectiveFGH = InplaceObjective{<: Nothing , <: Nothing , <: Any , <: Any , <: Any }
17
+ const InPlaceObjectiveFGH = InplaceObjective{<: Nothing , <: Nothing , <: Any , <: Nothing , <: Nothing }
18
+ const InPlaceObjectiveFG_Hv = InplaceObjective{<: Nothing , <: Any , <: Nothing , <: Any , <: Nothing }
19
+ const InPlaceObjectiveFGHv = InplaceObjective{<: Nothing , <: Nothing , <: Nothing , <: Any , <: Any }
18
20
struct NotInplaceObjective{DF, FDF, FGH}
19
21
df:: DF
20
22
fdf:: FDF
@@ -42,13 +44,16 @@ fdf(t::Union{InplaceObjective, NotInplaceObjective}) = t.fdf
42
44
make_f (t:: InplaceObjective , x, F:: Real ) = x -> fdf (t)(F, nothing , x)
43
45
make_f (t:: InplaceObjective , x, F) = (F, x) -> fdf (t)(F, nothing , x)
44
46
make_f (t:: InPlaceObjectiveFGH , x, F:: Real ) = x -> t. fgh (F, nothing , nothing , x)
47
+ make_f (t:: InPlaceObjectiveFGHv , x, F:: Real ) = x -> t. fghv (F, nothing , nothing , x, nothing )
45
48
46
49
47
50
make_df (t:: InplaceObjective , x, F) = (DF, x) -> fdf (t)(nothing , DF, x)
48
51
make_df (t:: InPlaceObjectiveFGH , x, F) = (DF, x) -> t. fgh (nothing , DF, nothing , x)
52
+ make_df (t:: InPlaceObjectiveFGHv , x, F) = (DF, x) -> t. fghv (nothing , DF, nothing , x, nothing )
49
53
50
54
make_fdf (t:: InplaceObjective , x, F:: Real ) = (G, x) -> fdf (t)(F, G, x)
51
55
make_fdf (t:: InPlaceObjectiveFGH , x, F:: Real ) = (G, x) -> t. fgh (F, G, nothing , x)
56
+ make_fdf (t:: InPlaceObjectiveFGHv , x, F:: Real ) = (G, x) -> t. fghv (F, G, nothing , x, nothing )
52
57
make_fdf (t:: InplaceObjective , x, F) = fdf (t)
53
58
54
59
# Non-mutating version
0 commit comments