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 #include <optional>
23 
24 namespace gtsam {
28 class GTSAM_EXPORT HybridNonlinearISAM {
29  protected:
32 
35 
38 
41 
45 
48 
49  public:
52 
61  int reorderInterval = 1,
63  HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
64  : reorderInterval_(reorderInterval),
65  reorderCounter_(0),
66  eliminationFunction_(eliminationFunction) {}
67 
71 
73  Values estimate();
74 
75  // /** find the marginal covariance for a single variable */
76  // Matrix marginalCovariance(Key key) const;
77 
78  // access
79 
81  const HybridGaussianISAM& bayesTree() const { return isam_; }
82 
88  void prune(const size_t maxNumberLeaves) { isam_.prune(maxNumberLeaves); }
89 
91  const Values& getLinearizationPoint() const { return linPoint_; }
92 
94  const DiscreteValues& assignment() const { return assignment_; }
95 
98  return factors_;
99  }
100 
102  int reorderInterval() const { return reorderInterval_; }
103  int reorderCounter() const { return reorderCounter_; }
104 
106  void print(const std::string& s = "",
107  const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
108 
110  void printStats() const;
111 
113  void saveGraph(const std::string& s,
114  const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
115 
119 
121  void update(const HybridNonlinearFactorGraph& newFactors,
122  const Values& initialValues,
123  const std::optional<size_t>& maxNrLeaves = {},
124  const std::optional<Ordering>& ordering = {});
125 
127  void reorder_relinearize();
128 
130 };
131 
132 } // namespace gtsam
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
HybridGaussianFactorGraph::Eliminate eliminationFunction_
int reorderInterval() const
TODO: comment.
def update(text)
Definition: relicense.py:46
Nonlinear hybrid factor graph that uses type erasure.
const HybridGaussianISAM & bayesTree() const
static const KeyFormatter DefaultKeyFormatter
Definition: Key.h:43
static enum @1107 ordering
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
HybridNonlinearFactorGraph factors_
void prune(const size_t maxNumberLeaves)
Prune the underlying Bayes tree.
DiscreteValues assignment_
The discrete assignment.
std::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
The function type that does a single dense elimination step on a subgraph.
const DiscreteValues & assignment() const
RealScalar s
int reorderCounter() const
TODO: comment.
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
HybridNonlinearISAM(int reorderInterval=1, const HybridGaussianFactorGraph::Eliminate &eliminationFunction=HybridGaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
traits
Definition: chartTesting.h:28
const HybridNonlinearFactorGraph & getFactorsUnsafe() const
const TREE::Eliminate & eliminationFunction
const Values & getLinearizationPoint() const
gtsam::HybridGaussianISAM isam_


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:20