Loading...
Searching...
No Matches
NonlinearISAM.h
Go to the documentation of this file.
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
#pragma once
#include <gtsam/nonlinear/NonlinearFactorGraph.h>
#include <gtsam/linear/GaussianISAM.h>
namespace gtsam {
class GTSAM_EXPORT NonlinearISAM {
protected:
gtsam::GaussianISAM isam_;
Values linPoint_;
NonlinearFactorGraph factors_;
int reorderInterval_;
int reorderCounter_;
GaussianFactorGraph::Eliminate eliminationFunction_;
public:
NonlinearISAM(int reorderInterval = 1,
const GaussianFactorGraph::Eliminate& eliminationFunction = GaussianFactorGraph::EliminationTraitsType::DefaultEliminate) :
reorderInterval_(reorderInterval), reorderCounter_(0), eliminationFunction_(eliminationFunction) {}
Values estimate() const;
Matrix marginalCovariance(Key key) const;
// access
const GaussianISAM& bayesTree() const { return isam_; }
const Values& getLinearizationPoint() const { return linPoint_; }
const NonlinearFactorGraph& getFactorsUnsafe() const { return factors_; }
int reorderInterval() const { return reorderInterval_; }
int reorderCounter() const { return reorderCounter_; }
void print(const std::string& s="", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
void printStats() const;
void saveGraph(const std::string& s, const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
void update(const NonlinearFactorGraph& newFactors, const Values& initialValues);
void reorder_relinearize();
};
} // \namespace gtsam
GaussianISAM.h
NonlinearFactorGraph.h
Factor Graph consisting of non-linear factors.
gtsam
Global functions in a separate testing namespace.
Definition chartTesting.h:28
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:156
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::Key
std::uint64_t Key
Integer nonlinear key type.
Definition types.h:100
gtsam::EliminateableFactorGraph< GaussianFactorGraph >::Eliminate
std::function< EliminationResult(const FactorGraphType &, const Ordering &)> Eliminate
Definition EliminateableFactorGraph.h:89
gtsam::GaussianISAM
Definition GaussianISAM.h:28
gtsam::NonlinearFactorGraph
Definition NonlinearFactorGraph.h:55
gtsam::NonlinearISAM::eliminationFunction_
GaussianFactorGraph::Eliminate eliminationFunction_
The elimination function.
Definition NonlinearISAM.h:44
gtsam::NonlinearISAM::factors_
NonlinearFactorGraph factors_
The original factors, used when relinearizing.
Definition NonlinearISAM.h:37
gtsam::NonlinearISAM::bayesTree
const GaussianISAM & bayesTree() const
access the underlying bayes tree
Definition NonlinearISAM.h:75
gtsam::NonlinearISAM::reorderInterval
int reorderInterval() const
get counters
Definition NonlinearISAM.h:84
gtsam::NonlinearISAM::NonlinearISAM
NonlinearISAM(int reorderInterval=1, const GaussianFactorGraph::Eliminate &eliminationFunction=GaussianFactorGraph::EliminationTraitsType::DefaultEliminate)
Periodically reorder and relinearize.
Definition NonlinearISAM.h:58
gtsam::NonlinearISAM::reorderCounter
int reorderCounter() const
TODO: comment.
Definition NonlinearISAM.h:85
gtsam::NonlinearISAM::getFactorsUnsafe
const NonlinearFactorGraph & getFactorsUnsafe() const
get underlying nonlinear graph
Definition NonlinearISAM.h:81
gtsam::NonlinearISAM::reorderInterval_
int reorderInterval_
The reordering interval and counter.
Definition NonlinearISAM.h:40
gtsam::NonlinearISAM::linPoint_
Values linPoint_
The current linearization point.
Definition NonlinearISAM.h:34
gtsam::NonlinearISAM::isam_
gtsam::GaussianISAM isam_
The internal iSAM object.
Definition NonlinearISAM.h:31
gtsam::NonlinearISAM::getLinearizationPoint
const Values & getLinearizationPoint() const
Return the current linearization point.
Definition NonlinearISAM.h:78
gtsam::Values
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65