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
Eigen::internal::print
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Definition: NEON/PacketMath.h:3115
gtsam::conjugateGradientDescent
VectorValues conjugateGradientDescent(const GaussianFactorGraph &fg, const VectorValues &x, const ConjugateGradientParameters &parameters)
Definition: iterative.cpp:70
GaussianFactorGraph.h
Linear Factor Graph where all factors are Gaussians.
Vector.h
typedef and functions to augment Eigen's VectorXd
s
RealScalar s
Definition: level1_cplx_impl.h:126
b
Scalar * b
Definition: benchVecAdd.cpp:17
Matrix.h
typedef and functions to augment Eigen's MatrixXd
x
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
Definition: gnuplot_common_settings.hh:12
gtsam::Matrix
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38
A
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:48
gtsam::GaussianFactorGraph
Definition: GaussianFactorGraph.h:73
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
gtsam::VectorValues
Definition: VectorValues.h:74
IterativeSolver.h
Some support classes for iterative solvers.
parameters
static ConjugateGradientParameters parameters
Definition: testIterative.cpp:33
gtsam::System
Definition: iterative.h:44
iterative-inl.h
Iterative methods, template implementation.
gtsam::steepestDescent
VectorValues steepestDescent(const GaussianFactorGraph &fg, const VectorValues &x, const ConjugateGradientParameters &parameters)
Definition: iterative.cpp:64
gtsam
traits
Definition: SFMdata.h:40
gtsam::ConjugateGradientParameters
Definition: ConjugateGradientSolver.h:29
std
Definition: BFloat16.h:88
exampleQR::Ab
Matrix Ab
Definition: testNoiseModel.cpp:207


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