ConjugateGradientSolver.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 
12 /*
13  * @file ConjugateGradientSolver.cpp
14  * @brief Implementation of Conjugate Gradient solver for a linear system
15  * @author Yong-Dian Jian
16  * @author Sungtae An
17  * @date Nov 6, 2014
18  */
19 
21 #include <iostream>
22 
23 using namespace std;
24 
25 namespace gtsam {
26 
27 /*****************************************************************************/
28 void ConjugateGradientParameters::print(ostream &os) const {
29  Base::print(os);
30  cout << "ConjugateGradientParameters" << endl
31  << "minIter: " << minIterations << endl
32  << "maxIter: " << maxIterations << endl
33  << "resetIter: " << reset << endl
34  << "eps_rel: " << epsilon_rel << endl
35  << "eps_abs: " << epsilon_abs << endl;
36 }
37 
38 /*****************************************************************************/
39 std::string ConjugateGradientParameters::blasTranslator(const BLASKernel value) {
40  std::string s;
41  switch (value) {
42  case ConjugateGradientParameters::GTSAM: s = "GTSAM" ; break;
43  default: s = "UNDEFINED" ; break;
44  }
45  return s;
46 }
47 
48 /*****************************************************************************/
49 ConjugateGradientParameters::BLASKernel ConjugateGradientParameters::blasTranslator(
50  const std::string &src) {
51  std::string s = src;
52  // Convert to upper case
53  std::transform(s.begin(), s.end(), s.begin(), ::toupper);
54  if (s == "GTSAM") return ConjugateGradientParameters::GTSAM;
55 
56  /* default is SBM */
57  return ConjugateGradientParameters::GTSAM;
58 }
59 
60 /*****************************************************************************/
61 
62 }
63 
64 
Eigen::internal::print
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Definition: NEON/PacketMath.h:3115
s
RealScalar s
Definition: level1_cplx_impl.h:126
os
ofstream os("timeSchurFactors.csv")
ConjugateGradientSolver.h
Implementation of Conjugate Gradient solver for a linear system.
gtsam::ConjugateGradientParameters::BLASKernel
BLASKernel
Definition: ConjugateGradientSolver.h:41
transform
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
Definition: geometry.cpp:25
gtsam
traits
Definition: SFMdata.h:40
std
Definition: BFloat16.h:88
test_callbacks.value
value
Definition: test_callbacks.py:160


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:01