HybridNonlinearISAM.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 
18 #pragma once
19 
22 
23 #include <optional>
24 
25 namespace gtsam {
29 class GTSAM_EXPORT HybridNonlinearISAM {
30  protected:
33 
36 
39 
42 
46 
49 
50  public:
53 
62  int reorderInterval = 1,
64  HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
65  : reorderInterval_(reorderInterval),
66  reorderCounter_(0),
67  eliminationFunction_(eliminationFunction) {}
68 
72 
74  Values estimate();
75 
76  // /** find the marginal covariance for a single variable */
77  // Matrix marginalCovariance(Key key) const;
78 
79  // access
80 
82  const HybridGaussianISAM& bayesTree() const { return isam_; }
83 
89  void prune(const size_t maxNumberLeaves) { isam_.prune(maxNumberLeaves); }
90 
92  const Values& getLinearizationPoint() const { return linPoint_; }
93 
95  const DiscreteValues& assignment() const { return assignment_; }
96 
99  return factors_;
100  }
101 
103  int reorderInterval() const { return reorderInterval_; }
104  int reorderCounter() const { return reorderCounter_; }
105 
107  void print(const std::string& s = "",
108  const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
109 
111  void printStats() const;
112 
114  void saveGraph(const std::string& s,
115  const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
116 
120 
122  void update(const HybridNonlinearFactorGraph& newFactors,
123  const Values& initialValues,
124  const std::optional<size_t>& maxNrLeaves = {},
125  const std::optional<Ordering>& ordering = {});
126 
128  void reorderRelinearize();
129 
131 };
132 
133 } // namespace gtsam
relicense.update
def update(text)
Definition: relicense.py:46
gtsam::HybridGaussianISAM
Incremental Smoothing and Mapping (ISAM) algorithm for hybrid factor graphs.
Definition: HybridGaussianISAM.h:37
s
RealScalar s
Definition: level1_cplx_impl.h:126
gtsam::HybridNonlinearISAM::prune
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
Definition: HybridNonlinearISAM.h:89
gtsam::HybridNonlinearISAM::assignment_
DiscreteValues assignment_
The discrete assignment.
Definition: HybridNonlinearISAM.h:38
HybridNonlinearFactorGraph.h
Nonlinear hybrid factor graph that uses type erasure.
gtsam::HybridNonlinearFactorGraph
Definition: HybridNonlinearFactorGraph.h:33
Values
gtsam::HybridNonlinearISAM::reorderCounter_
int reorderCounter_
Definition: HybridNonlinearISAM.h:45
gtsam::HybridNonlinearISAM::linPoint_
Values linPoint_
Definition: HybridNonlinearISAM.h:35
gtsam::DefaultKeyFormatter
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition: Key.cpp:30
gtsam::HybridNonlinearISAM::reorderInterval_
int reorderInterval_
Definition: HybridNonlinearISAM.h:44
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
gtsam::HybridNonlinearISAM::factors_
HybridNonlinearFactorGraph factors_
Definition: HybridNonlinearISAM.h:41
gtsam::KeyFormatter
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
gtsam::HybridNonlinearISAM::bayesTree
const HybridGaussianISAM & bayesTree() const
Definition: HybridNonlinearISAM.h:82
eliminationFunction
const TREE::Eliminate & eliminationFunction
Definition: inference-inst.h:55
HybridGaussianISAM.h
gtsam::HybridNonlinearISAM
Definition: HybridNonlinearISAM.h:29
gtsam::HybridNonlinearISAM::isam_
gtsam::HybridGaussianISAM isam_
Definition: HybridNonlinearISAM.h:32
ordering
static enum @1096 ordering
gtsam::HybridNonlinearISAM::assignment
const DiscreteValues & assignment() const
Definition: HybridNonlinearISAM.h:95
gtsam
traits
Definition: SFMdata.h:40
gtsam::DiscreteValues
Definition: DiscreteValues.h:34
gtsam::Values
Definition: Values.h:65
gtsam::HybridNonlinearISAM::getFactorsUnsafe
const HybridNonlinearFactorGraph & getFactorsUnsafe() const
Definition: HybridNonlinearISAM.h:98
gtsam::EliminateableFactorGraph< HybridGaussianFactorGraph >::Eliminate
std::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
The function type that does a single dense elimination step on a subgraph.
Definition: EliminateableFactorGraph.h:88
gtsam::HybridBayesTree::prune
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
Definition: HybridBayesTree.cpp:181
gtsam::HybridNonlinearISAM::getLinearizationPoint
const Values & getLinearizationPoint() const
Definition: HybridNonlinearISAM.h:92
gtsam::HybridNonlinearISAM::HybridNonlinearISAM
HybridNonlinearISAM(int reorderInterval=1, const HybridGaussianFactorGraph::Eliminate &eliminationFunction=HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
Definition: HybridNonlinearISAM.h:61
gtsam::HybridNonlinearISAM::eliminationFunction_
HybridGaussianFactorGraph::Eliminate eliminationFunction_
Definition: HybridNonlinearISAM.h:48


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:43