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 <boost/algorithm/string.hpp>
22 #include <iostream>
23 
24 using namespace std;
25 
26 namespace gtsam {
27 
28 /*****************************************************************************/
29 void ConjugateGradientParameters::print(ostream &os) const {
30  Base::print(os);
31  cout << "ConjugateGradientParameters" << endl
32  << "minIter: " << minIterations_ << endl
33  << "maxIter: " << maxIterations_ << endl
34  << "resetIter: " << reset_ << endl
35  << "eps_rel: " << epsilon_rel_ << endl
36  << "eps_abs: " << epsilon_abs_ << endl;
37 }
38 
39 /*****************************************************************************/
40 std::string ConjugateGradientParameters::blasTranslator(const BLASKernel value) {
41  std::string s;
42  switch (value) {
43  case ConjugateGradientParameters::GTSAM: s = "GTSAM" ; break;
44  default: s = "UNDEFINED" ; break;
45  }
46  return s;
47 }
48 
49 /*****************************************************************************/
50 ConjugateGradientParameters::BLASKernel ConjugateGradientParameters::blasTranslator(
51  const std::string &src) {
52  std::string s = src; boost::algorithm::to_upper(s);
53  if (s == "GTSAM") return ConjugateGradientParameters::GTSAM;
54 
55  /* default is SBM */
56  return ConjugateGradientParameters::GTSAM;
57 }
58 
59 /*****************************************************************************/
60 
61 }
62 
63 
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
Definition: Half.h:150
Implementation of Conjugate Gradient solver for a linear system.
RealScalar s
traits
Definition: chartTesting.h:28
ofstream os("timeSchurFactors.csv")


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:50