47 #include "MoochoPack_ReducedHessianSecantUpdateLPBFGS_StrategySetOptions.hpp"
48 #include "OptionsFromStreamPack_StringToBool.hpp"
53 const int local_num_options = 4;
56 MIN_NUM_UPDATES_PROJ_START
57 ,MAX_NUM_UPDATES_PROJ_START
58 ,NUM_SUPERBASICS_SWITCH_DENSE
59 ,NUM_ADD_RECENT_UPDATES
62 const char* local_SOptions[local_num_options] = {
63 "min_num_updates_proj_start"
64 ,
"max_num_updates_proj_start"
65 ,
"num_superbasics_switch_dense"
66 ,
"num_add_recent_updates"
71 namespace MoochoPack {
74 ReducedHessianSecantUpdateLPBFGS_Strategy* target
75 ,
const char opt_grp_name[] )
76 : OptionsFromStreamPack::SetOptionsFromStreamNode(
77 opt_grp_name, local_num_options, local_SOptions )
78 , OptionsFromStreamPack::SetOptionsToTargetBase< ReducedHessianSecantUpdateLPBFGS_Strategy >( target )
82 int option_num,
const std::string& option_value )
84 switch( (local_EOptions)option_num ) {
85 case MIN_NUM_UPDATES_PROJ_START: {
86 target().min_num_updates_proj_start( ::abs( ::atoi( option_value.c_str() ) ) );
89 case MAX_NUM_UPDATES_PROJ_START: {
90 target().max_num_updates_proj_start( ::abs( ::atoi( option_value.c_str() ) ) );
93 case NUM_SUPERBASICS_SWITCH_DENSE: {
94 target().num_superbasics_switch_dense( ::abs( ::atoi( option_value.c_str() ) ) );
97 case NUM_ADD_RECENT_UPDATES: {
98 target().num_add_recent_updates( ::abs( ::atoi( option_value.c_str() ) ) );
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.
ReducedHessianSecantUpdateLPBFGS_StrategySetOptions(ReducedHessianSecantUpdateLPBFGS_Strategy *target=0, const char opt_grp_name[]="ReducedHessianSecantUpdateLPBFGS")
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)