Skip to content

Commit

Permalink
Update alg_traits.jl
Browse files Browse the repository at this point in the history
Added traits requiresgradient, requireshessian, requiresconsjac, and requiresconshess to alg_traits.jl
  • Loading branch information
ParasPuneetSingh authored Mar 8, 2024
1 parent 3bb183c commit 940837b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/alg_traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,46 @@ Defaults to false.
"""
requiresderivative(opt) = false

Check warning on line 130 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L130

Added line #L130 was not covered by tests

"""
requiresgradient(opt)
Trait declaration for whether an optimizer
requires gradient in `instantiate_function`.
Defaults to false.
"""
requiresgradient(opt) = false

Check warning on line 140 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L140

Added line #L140 was not covered by tests

"""
requireshessian(opt)
Trait declaration for whether an optimizer
requires hessian in `instantiate_function`.
Defaults to false.
"""
requireshessian(opt) = false

Check warning on line 150 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L150

Added line #L150 was not covered by tests

"""
requiresconsjac(opt)
Trait declaration for whether an optimizer
requires cons_j in `instantiate_function`, that is, does the optimizer require a constant Jacobian.
Defaults to false.
"""
requiresconsjac(opt) = false

Check warning on line 160 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L160

Added line #L160 was not covered by tests

"""
requiresconshess(opt)
Trait declaration for whether an optimizer
requires cons_h in `instantiate_function`, that is, does the optimizer require a constant hessian.
Defaults to false.
"""
requiresconshess(opt) = false

Check warning on line 170 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L170

Added line #L170 was not covered by tests

"""
allowscallback(opt)
Expand Down

0 comments on commit 940837b

Please sign in to comment.