gtsam  4.0.0 gtsam
ExpressionFactorGraph.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7
9
10  * -------------------------------------------------------------------------- */
11
19 #pragma once
20
21 #include <gtsam/nonlinear/ExpressionFactor.h>
23
24 namespace gtsam {
25
30
31 public:
32
35
42  template<typename T>
43  void addExpressionFactor(const Expression<T>& h, const T& z,
44  const SharedNoiseModel& R) {
45  using F = ExpressionFactor<T>;
46  push_back(boost::allocate_shared<F>(Eigen::aligned_allocator<F>(), R, z, h));
47  }
48
50 };
51
52 }
Factor graph that supports adding ExpressionFactors directly.
Definition: ExpressionFactorGraph.h:29
Factor Graph Constsiting of non-linear factors.
A non-linear factor graph is a graph of non-Gaussian, i.e.
Definition: NonlinearFactorGraph.h:77
Expression class that supports automatic differentiation.
Definition: Expression.h:49
Factor that supports arbitrary expressions via AD.
Definition: Expression.h:38
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
noiseModel::Base::shared_ptr SharedNoiseModel
Note, deliberately not in noiseModel namespace.
Definition: NoiseModel.h:1072
void addExpressionFactor(const Expression< T > &h, const T &z, const SharedNoiseModel &R)
Directly add ExpressionFactor that implements |h(x)-z|^2_R.
Definition: ExpressionFactorGraph.h:43
std::enable_if< std::is_base_of< FactorType, DERIVEDFACTOR >::value >::type push_back(boost::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
Definition: FactorGraph.h:159