12#include <boost/shared_ptr.hpp>
19class GaussianFactorGraph;
26 typedef boost::shared_ptr<PreconditionerParameters> shared_ptr;
44 inline Kernel kernel()
const {
return kernel_; }
45 inline Verbosity verbosity()
const {
return verbosity_; }
49 virtual void print(std::ostream &os)
const;
51 static Kernel kernelTranslator(
const std::string &s);
52 static Verbosity verbosityTranslator(
const std::string &s);
53 static std::string kernelTranslator(Kernel k);
54 static std::string verbosityTranslator(Verbosity v);
66 typedef boost::shared_ptr<Preconditioner> shared_ptr;
67 typedef std::vector<size_t> Dimensions;
81 virtual void solve(
const Vector& y, Vector &x)
const = 0;
90 const std::map<Key,Vector> &lambda
97 typedef boost::shared_ptr<DummyPreconditionerParameters> shared_ptr;
106 typedef boost::shared_ptr<DummyPreconditioner> shared_ptr;
114 void solve(
const Vector& y, Vector &x)
const override { x = y; }
119 const std::map<Key,Vector> &lambda
138 void solve(
const Vector& y, Vector &x)
const override;
139 void transposeSolve(
const Vector& y, Vector& x)
const override;
143 const std::map<Key,Vector> &lambda
150 std::vector<size_t> dims_;
158boost::shared_ptr<Preconditioner> createPreconditioner(
const boost::shared_ptr<PreconditionerParameters> parameters);
typedef and functions to augment Eigen's VectorXd
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:155
A Linear Factor Graph is a factor graph where all factors are Gaussian, i.e.
Definition: GaussianFactorGraph.h:69
Handy data structure for iterative solvers.
Definition: IterativeSolver.h:126
Definition: Preconditioner.h:24
Definition: Preconditioner.h:64
virtual void solve(const Vector &y, Vector &x) const =0
implement x = L^{-1} y
virtual void build(const GaussianFactorGraph &gfg, const KeyInfo &info, const std::map< Key, Vector > &lambda)=0
build/factorize the preconditioner
virtual void transposeSolve(const Vector &y, Vector &x) const =0
implement x = L^{-T} y
Definition: Preconditioner.h:95
Definition: Preconditioner.h:103
void build(const GaussianFactorGraph &gfg, const KeyInfo &info, const std::map< Key, Vector > &lambda) override
build/factorize the preconditioner
Definition: Preconditioner.h:116
void solve(const Vector &y, Vector &x) const override
implement x = L^{-1} y
Definition: Preconditioner.h:114
void transposeSolve(const Vector &y, Vector &x) const override
implement x = L^{-T} y
Definition: Preconditioner.h:115
Definition: Preconditioner.h:124
Definition: Preconditioner.h:131