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:
82  std::shared_ptr<SubgraphPreconditioner> pc_;
83 
84  public:
87 
94  const Ordering &ordering);
95 
103  const Parameters &parameters, const Ordering &ordering);
108  SubgraphSolver(const GaussianBayesNet &Rc1, const GaussianFactorGraph &Ab2,
109  const Parameters &parameters);
110 
112  ~SubgraphSolver() override {}
113 
117 
119  VectorValues optimize() const;
120 
123  const KeyInfo &keyInfo,
124  const std::map<Key, Vector> &lambda,
125  const VectorValues &initial) override;
126 
130 
132  std::pair<GaussianFactorGraph, GaussianFactorGraph> splitGraph(
133  const GaussianFactorGraph &gfg);
134 
136 };
137 
138 } // namespace gtsam
gtsam::SubgraphBuilderParameters
Definition: SubgraphBuilder.h:102
Eigen::internal::print
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Definition: NEON/PacketMath.h:3115
gtsam::SubgraphSolverParameters::SubgraphSolverParameters
SubgraphSolverParameters(const SubgraphBuilderParameters &p=SubgraphBuilderParameters())
Definition: SubgraphSolver.h:38
gtsam::optimize
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Definition: triangulation.cpp:177
gtsam::SubgraphSolverParameters::builderParams
SubgraphBuilderParameters builderParams
Definition: SubgraphSolver.h:37
gtsam::SubgraphSolver::Parameters
SubgraphSolverParameters Parameters
Definition: SubgraphSolver.h:78
os
ofstream os("timeSchurFactors.csv")
gtsam::IterativeSolver
Definition: IterativeSolver.h:87
gtsam::SubgraphSolver::pc_
std::shared_ptr< SubgraphPreconditioner > pc_
preconditioner object
Definition: SubgraphSolver.h:82
gtsam::KeyInfo
Definition: IterativeSolver.h:127
gtsam::SubgraphSolverParameters::print
void print() const
Definition: SubgraphSolver.h:40
gtsam::GaussianFactorGraph
Definition: GaussianFactorGraph.h:73
ConjugateGradientSolver.h
Implementation of Conjugate Gradient solver for a linear system.
A
Definition: test_numpy_dtypes.cpp:298
gtsam::VectorValues
Definition: VectorValues.h:74
parameters
static ConjugateGradientParameters parameters
Definition: testIterative.cpp:33
lambda
static double lambda[]
Definition: jv.c:524
ordering
static enum @1096 ordering
gtsam::SubgraphSolverParameters
Definition: SubgraphSolver.h:35
gtsam
traits
Definition: SFMdata.h:40
gtsam::ConjugateGradientParameters
Definition: ConjugateGradientSolver.h:29
gtsam::SubgraphSolver::parameters_
Parameters parameters_
Definition: SubgraphSolver.h:81
p
float * p
Definition: Tutorial_Map_using.cpp:9
SubgraphBuilder.h
initial
Definition: testScenarioRunner.cpp:148
gtsam::SubgraphSolver::~SubgraphSolver
~SubgraphSolver() override
Destructor.
Definition: SubgraphSolver.h:112
gtsam::SubgraphSolver
Definition: SubgraphSolver.h:76
gtsam::SubgraphSolverParameters::print
void print(std::ostream &os) const override
Definition: SubgraphSolver.h:41
gtsam::Ordering
Definition: inference/Ordering.h:33
gtsam::GaussianBayesNet
Definition: GaussianBayesNet.h:35


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:36:27