19 #include <boost/algorithm/string.hpp> 26 string ISAM2DoglegParams::adaptationModeTranslator(
30 switch (adaptationMode) {
31 case DoglegOptimizerImpl::SEARCH_EACH_ITERATION:
32 s =
"SEARCH_EACH_ITERATION";
34 case DoglegOptimizerImpl::ONE_STEP_PER_ITERATION:
35 s =
"ONE_STEP_PER_ITERATION";
46 ISAM2DoglegParams::adaptationModeTranslator(
47 const string& adaptationMode)
const {
48 string s = adaptationMode;
49 boost::algorithm::to_upper(s);
50 if (s ==
"SEARCH_EACH_ITERATION")
51 return DoglegOptimizerImpl::SEARCH_EACH_ITERATION;
52 if (s ==
"ONE_STEP_PER_ITERATION")
53 return DoglegOptimizerImpl::ONE_STEP_PER_ITERATION;
56 return DoglegOptimizerImpl::SEARCH_EACH_ITERATION;
63 boost::algorithm::to_upper(s);
64 if (s ==
"QR")
return ISAM2Params::QR;
65 if (s ==
"CHOLESKY")
return ISAM2Params::CHOLESKY;
68 return ISAM2Params::CHOLESKY;
72 string ISAM2Params::factorizationTranslator(
79 case ISAM2Params::CHOLESKY:
TrustRegionAdaptationMode