iterative.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 
20 #include <gtsam/base/Vector.h>
21 #include <gtsam/base/Matrix.h>
24 
25 #include <iostream>
26 
27 using namespace std;
28 
29 namespace gtsam {
30 
31  /* ************************************************************************* */
32  void System::print(const string& s) const {
33  cout << s << endl;
34  gtsam::print(A_, "A");
35  gtsam::print(b_, "b");
36  }
37 
38  /* ************************************************************************* */
39 
42  return conjugateGradients<System, Vector, Vector>(Ab, x, parameters, true);
43  }
44 
47  return conjugateGradients<System, Vector, Vector>(Ab, x, parameters);
48  }
49 
50  /* ************************************************************************* */
51  Vector steepestDescent(const Matrix& A, const Vector& b, const Vector& x,
53  System Ab(A, b);
54  return conjugateGradients<System, Vector, Vector>(Ab, x, parameters, true);
55  }
56 
59  System Ab(A, b);
60  return conjugateGradients<System, Vector, Vector>(Ab, x, parameters);
61  }
62 
63  /* ************************************************************************* */
66  return conjugateGradients<GaussianFactorGraph, VectorValues, Errors>(
67  fg, x, parameters, true);
68  }
69 
72  return conjugateGradients<GaussianFactorGraph, VectorValues, Errors>(
73  fg, x, parameters);
74  }
75 
76 /* ************************************************************************* */
77 
78 } // namespace gtsam
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
Scalar * b
Definition: benchVecAdd.cpp:17
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
Definition: BFloat16.h:88
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
VectorValues steepestDescent(const GaussianFactorGraph &fg, const VectorValues &x, const ConjugateGradientParameters &parameters)
Definition: iterative.cpp:64
Eigen::VectorXd Vector
Definition: Vector.h:38
RealScalar s
Linear Factor Graph where all factors are Gaussians.
Iterative methods, template implementation.
static ConjugateGradientParameters parameters
Some support classes for iterative solvers.
VectorValues conjugateGradientDescent(const GaussianFactorGraph &fg, const VectorValues &x, const ConjugateGradientParameters &parameters)
Definition: iterative.cpp:70
traits
Definition: chartTesting.h:28
typedef and functions to augment Eigen&#39;s VectorXd
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x


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