51 const int local_num_options = 11;
68 const char* local_SOptions[local_num_options] =
85 namespace MoochoPack {
87 LineSearchFilter_StepSetOptions::LineSearchFilter_StepSetOptions(
88 LineSearchFilter_Step* target
89 ,
const char opt_grp_name[] )
91 OptionsFromStreamPack::SetOptionsFromStreamNode(
92 opt_grp_name, local_num_options, local_SOptions ),
93 OptionsFromStreamPack::SetOptionsToTargetBase< LineSearchFilter_Step >( target )
97 void LineSearchFilter_StepSetOptions::setOption(
102 typedef LineSearchFilter_Step target_t;
105 target().gamma_theta(std::atof(option_value.c_str()));
108 target().gamma_f(std::atof(option_value.c_str()));
111 if( option_value ==
"UNBOUNDED" )
112 target().f_min(target_t::F_MIN_UNBOUNDED);
114 target().f_min(std::atof(option_value.c_str()));
118 target().gamma_alpha(std::atof(option_value.c_str()));
121 target().delta(std::atof(option_value.c_str()));
124 target().s_theta(std::atof(option_value.c_str()));
127 target().s_f(std::atof(option_value.c_str()));
129 case THETA_SMALL_FACT:
130 target().theta_small_fact(std::atof(option_value.c_str()));
133 target().theta_max(std::atof(option_value.c_str()));
136 target().eta_f(std::atof(option_value.c_str()));
138 case BACK_TRACK_FRAC:
139 target().back_track_frac(std::atof(option_value.c_str()));
bool StringToBool(const char *opt_name, const char *str)
Convert a string "true" or "false" into bool #true# or #false#.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
const std::string & option_value(OptionsGroup::const_iterator &itr)