SubgraphSolver.h
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 #pragma once
21 
24 
25 #include <map>
26 #include <utility> // pair
27 
28 namespace gtsam {
29 
30 // Forward declarations
31 class GaussianFactorGraph;
32 class GaussianBayesNet;
33 class SubgraphPreconditioner;
34 
35 struct GTSAM_EXPORT SubgraphSolverParameters
39  : builderParams(p) {}
40  void print() const { Base::print(); }
41  void print(std::ostream &os) const override {
42  Base::print(os);
43  }
44 };
45 
76 class GTSAM_EXPORT SubgraphSolver : public IterativeSolver {
77  public:
79 
80  protected:
81  Parameters parameters_;
82  boost::shared_ptr<SubgraphPreconditioner> pc_;
83 
84  public:
87 
93  SubgraphSolver(const GaussianFactorGraph &A, const Parameters &parameters,
94  const Ordering &ordering);
95 
103  const boost::shared_ptr<GaussianFactorGraph> &Ab2,
104  const Parameters &parameters, const Ordering &ordering);
109  SubgraphSolver(const boost::shared_ptr<GaussianBayesNet> &Rc1,
110  const boost::shared_ptr<GaussianFactorGraph> &Ab2,
111  const Parameters &parameters);
112 
114  ~SubgraphSolver() override {}
115 
119 
121  VectorValues optimize() const;
122 
125  const KeyInfo &keyInfo,
126  const std::map<Key, Vector> &lambda,
127  const VectorValues &initial) override;
128 
132 
134  std::pair < boost::shared_ptr<GaussianFactorGraph>,
135  boost::shared_ptr<GaussianFactorGraph> > splitGraph(
136  const GaussianFactorGraph &gfg);
137 
139 };
140 
141 } // namespace gtsam
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
boost::shared_ptr< SubgraphPreconditioner > pc_
preconditioner object
static enum @843 ordering
SubgraphSolverParameters Parameters
Implementation of Conjugate Gradient solver for a linear system.
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
SubgraphBuilderParameters builderParams
static ConjugateGradientParameters parameters
cout<< "The eigenvalues of A are:"<< endl<< ces.eigenvalues()<< endl;cout<< "The matrix of eigenvectors, V, is:"<< endl<< ces.eigenvectors()<< endl<< endl;complex< float > lambda
traits
Definition: chartTesting.h:28
~SubgraphSolver() override
Destructor.
ofstream os("timeSchurFactors.csv")
float * p
SubgraphSolverParameters(const SubgraphBuilderParameters &p=SubgraphBuilderParameters())
void print(std::ostream &os) const override


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