sandialabs / poblano_toolbox

Nonlinear optimization for MATLAB.
https://sandialabs.github.io/poblano_toolbox/
Other
25 stars 14 forks source link

ncg: remove dead code #2

Open dmdunla opened 5 years ago

dmdunla commented 5 years ago

The following code cannot be reached and should be removed:

            switch (params.Results.Update)
...
                otherwise
                    error('Error: options.Update is not valid. Choices are {FR, PR, HS}');

This cannot be reached because there is a check of the inputs which will prevent the otherwise statement from being executed:

params.addParamValue('Update','PR',@(x) ismember(x,{'FR','PR','HS','SD'}));

NOTE: found using code coverage