ROL
ROL_LineSearch_U_Factory.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Rapid Optimization Library (ROL) Package
4 //
5 // Copyright 2014 NTESS and the ROL contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef ROL_LINESEARCH_U_FACTORY_H
11 #define ROL_LINESEARCH_U_FACTORY_H
12 
15 #include "ROL_BackTracking_U.hpp"
16 #include "ROL_CubicInterp_U.hpp"
18 
19 namespace ROL {
20 template<typename Real>
21 inline Ptr<LineSearch_U<Real>> LineSearchUFactory(ParameterList &parlist) {
23  parlist.sublist("Step").sublist("Line Search").sublist("Line-Search Method").get("Type","Cubic Interpolation"));
24  switch(els) {
25  case LINESEARCH_U_ITERATIONSCALING: return makePtr<IterationScaling_U<Real>>(parlist);
26  case LINESEARCH_U_PATHBASEDTARGETLEVEL: return makePtr<PathBasedTargetLevel_U<Real>>(parlist);
27  case LINESEARCH_U_BACKTRACKING: return makePtr<BackTracking_U<Real>>(parlist);
28  case LINESEARCH_U_CUBICINTERP: return makePtr<CubicInterp_U<Real>>(parlist);
31  case LINESEARCH_U_BISECTION: return makePtr<ScalarMinimizationLineSearch_U<Real>>(parlist);
32  default: return nullPtr;
33  }
34 }
35 } // namespace ROL
36 
37 #endif
ELineSearchU
Enumeration of line-search types.
Ptr< LineSearch_U< Real > > LineSearchUFactory(ParameterList &parlist)
ELineSearchU StringToELineSearchU(std::string s)