23 #include <gtsam/linear/Preconditioner.h> 25 #include <gtsam/dllexport.h> 27 #include <boost/shared_ptr.hpp> 34 class GaussianBayesNet;
35 class GaussianFactorGraph;
39 typedef boost::shared_ptr<SubgraphPreconditionerParameters> shared_ptr;
55 typedef boost::shared_ptr<SubgraphPreconditioner> shared_ptr;
56 typedef boost::shared_ptr<const GaussianBayesNet> sharedBayesNet;
57 typedef boost::shared_ptr<const GaussianFactorGraph> sharedFG;
58 typedef boost::shared_ptr<const VectorValues> sharedValues;
59 typedef boost::shared_ptr<const Errors> sharedErrors;
86 void print(
const std::string& s =
"SubgraphPreconditioner")
const;
89 const sharedFG&
Ab2()
const {
return Ab2_; }
92 const sharedBayesNet&
Rc1()
const {
return Rc1_; }
95 const sharedErrors
b2bar()
const {
return b2bar_; }
116 void transposeMultiplyAdd2(
double alpha, Errors::const_iterator begin,
117 Errors::const_iterator end, VectorValues& y)
const;
120 double error(
const VectorValues& y)
const;
123 VectorValues gradient(
const VectorValues& y)
const;
126 Errors
operator*(
const VectorValues& y)
const;
129 void multiplyInPlace(
const VectorValues& y, Errors& e)
const;
132 VectorValues
operator^(
const Errors& e)
const;
138 void transposeMultiplyAdd(
double alpha,
const Errors& e, VectorValues& y)
const;
144 void solve(
const Vector& y, Vector &x)
const override;
147 void transposeSolve(
const Vector& y, Vector& x)
const override;
151 const GaussianFactorGraph &gfg,
153 const std::map<Key,Vector> &lambda
Definition: Preconditioner.h:24
Vector operator^(const Matrix &A, const Vector &v)
overload ^ for trans(A)*v We transpose the vectors for speed.
Definition: Matrix.cpp:130
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
const sharedFG & Ab2() const
Access Ab2.
Definition: SubgraphPreconditioner.h:89
static VectorValues Zero(const VectorValues &other)
Create a VectorValues with the same structure as other, but filled with zeros.
Definition: VectorValues.cpp:69
Some support classes for iterative solvers.
Definition: Preconditioner.h:64
Handy data structure for iterative solvers.
Definition: IterativeSolver.h:126
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:73
const sharedErrors b2bar() const
Access b2bar.
Definition: SubgraphPreconditioner.h:95
Subgraph conditioner class, as explained in the RSS 2010 submission.
Definition: SubgraphPreconditioner.h:52
Definition: SubgraphBuilder.h:95
Definition: SubgraphPreconditioner.h:38
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
Point2 operator *(double s, const Point2 &p)
multiply with scalar
Definition: Point2.h:170
const sharedBayesNet & Rc1() const
Access Rc1.
Definition: SubgraphPreconditioner.h:92