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 
Definition: BFloat16.h:88
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Implementation of Conjugate Gradient solver for a linear system.
RealScalar s
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
Definition: geometry.cpp:25
traits
Definition: chartTesting.h:28
ofstream os("timeSchurFactors.csv")


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:03