farhadrclass / KnetNLPModelsProblems.jl

MIT License
1 stars 1 forks source link

Use kargs... in parameter constructor #24

Closed tmigot closed 1 year ago

tmigot commented 1 year ago

Something like

function R2ParameterSet(; atol = 1e-7, rtol = 1e-5, η1 = 1., η2 = 2., γ1 = 3., γ2 = 4., σmin = 5., β = 6.)

So that you would only need one constructor instead of two.

https://github.com/farhadrclass/KnetNLPModelsProblems.jl/blob/1f818f9fdcec8c46a130be8437c7d294bc495515/src/JSOSolver_SR2.jl#L31

farhadrclass commented 1 year ago

I updated the code

tmigot commented 1 year ago

Looks great, thanks