ISAM2Params.cpp
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
19 
20 using namespace std;
21 
22 namespace gtsam {
23 
24 /* ************************************************************************* */
25 string ISAM2DoglegParams::adaptationModeTranslator(
27  const {
28  string s;
29  switch (adaptationMode) {
30  case DoglegOptimizerImpl::SEARCH_EACH_ITERATION:
31  s = "SEARCH_EACH_ITERATION";
32  break;
33  case DoglegOptimizerImpl::ONE_STEP_PER_ITERATION:
34  s = "ONE_STEP_PER_ITERATION";
35  break;
36  default:
37  s = "UNDEFINED";
38  break;
39  }
40  return s;
41 }
42 
43 /* ************************************************************************* */
45 ISAM2DoglegParams::adaptationModeTranslator(
46  const string& adaptationMode) const {
47  string s = adaptationMode;
48  // convert to upper case
49  std::transform(s.begin(), s.end(), s.begin(), ::toupper);
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;
54 
55  /* default is SEARCH_EACH_ITERATION */
56  return DoglegOptimizerImpl::SEARCH_EACH_ITERATION;
57 }
58 
59 /* ************************************************************************* */
60 ISAM2Params::Factorization ISAM2Params::factorizationTranslator(
61  const string& str) {
62  string s = str;
63  // convert to upper case
64  std::transform(s.begin(), s.end(), s.begin(), ::toupper);
65  if (s == "QR") return ISAM2Params::QR;
66  if (s == "CHOLESKY") return ISAM2Params::CHOLESKY;
67 
68  /* default is CHOLESKY */
69  return ISAM2Params::CHOLESKY;
70 }
71 
72 /* ************************************************************************* */
73 string ISAM2Params::factorizationTranslator(
75  string s;
76  switch (value) {
77  case ISAM2Params::QR:
78  s = "QR";
79  break;
80  case ISAM2Params::CHOLESKY:
81  s = "CHOLESKY";
82  break;
83  default:
84  s = "UNDEFINED";
85  break;
86  }
87  return s;
88 }
89 
90 } // namespace gtsam
s
RealScalar s
Definition: level1_cplx_impl.h:126
ISAM2Params.h
Parameters for iSAM 2.
gtsam::ISAM2Params::Factorization
Factorization
Definition: ISAM2Params.h:182
gtsam::DoglegOptimizerImpl::TrustRegionAdaptationMode
TrustRegionAdaptationMode
Definition: DoglegOptimizerImpl.h:54
transform
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
Definition: geometry.cpp:25
str
Definition: pytypes.h:1558
gtsam
traits
Definition: SFMdata.h:40
std
Definition: BFloat16.h:88
gtsam.examples.ShonanAveragingCLI.str
str
Definition: ShonanAveragingCLI.py:115
test_callbacks.value
value
Definition: test_callbacks.py:160


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:47