22 #include <boost/algorithm/string/case_conv.hpp> 23 #include <boost/range/adaptor/map.hpp> 33 const std::string &src) {
35 boost::algorithm::to_upper(s);
37 return LevenbergMarquardtParams::SILENT;
39 return LevenbergMarquardtParams::SUMMARY;
40 if (s ==
"TERMINATION")
41 return LevenbergMarquardtParams::TERMINATION;
43 return LevenbergMarquardtParams::LAMBDA;
45 return LevenbergMarquardtParams::TRYLAMBDA;
47 return LevenbergMarquardtParams::TRYCONFIG;
49 return LevenbergMarquardtParams::TRYDELTA;
51 return LevenbergMarquardtParams::DAMPED;
54 return LevenbergMarquardtParams::SILENT;
58 std::string LevenbergMarquardtParams::verbosityLMTranslator(
62 case LevenbergMarquardtParams::SILENT:
65 case LevenbergMarquardtParams::SUMMARY:
68 case LevenbergMarquardtParams::TERMINATION:
71 case LevenbergMarquardtParams::LAMBDA:
74 case LevenbergMarquardtParams::TRYLAMBDA:
77 case LevenbergMarquardtParams::TRYCONFIG:
80 case LevenbergMarquardtParams::TRYDELTA:
83 case LevenbergMarquardtParams::DAMPED:
96 std::cout <<
" lambdaInitial: " << lambdaInitial <<
"\n";
97 std::cout <<
" lambdaFactor: " << lambdaFactor <<
"\n";
98 std::cout <<
" lambdaUpperBound: " << lambdaUpperBound <<
"\n";
99 std::cout <<
" lambdaLowerBound: " << lambdaLowerBound <<
"\n";
100 std::cout <<
" minModelFidelity: " << minModelFidelity <<
"\n";
101 std::cout <<
" diagonalDamping: " << diagonalDamping <<
"\n";
102 std::cout <<
" minDiagonal: " << minDiagonal <<
"\n";
103 std::cout <<
" maxDiagonal: " << maxDiagonal <<
"\n";
104 std::cout <<
" verbosityLM: " 105 << verbosityLMTranslator(verbosityLM) <<
"\n";
void print(const Matrix &A, const string &s, ostream &stream)
Parameters for Levenberg-Marquardt trust-region scheme.