EqualityFactorGraph.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 
19 #pragma once
20 
23 
24 namespace gtsam {
25 
30 class EqualityFactorGraph: public FactorGraph<LinearEquality> {
31 public:
32  typedef std::shared_ptr<EqualityFactorGraph> shared_ptr;
33 
35  template <class... Args> void add(Args &&... args) {
36  emplace_shared<LinearEquality>(std::forward<Args>(args)...);
37  }
38 
40  double error(const VectorValues& x) const {
41  double total_error = 0.;
42  for (const sharedFactor& factor : *this) {
43  if (factor)
44  total_error += factor->error(x);
45  }
46  return total_error;
47  }
48 };
49 
51 template<> struct traits<EqualityFactorGraph> : public Testable<
52  EqualityFactorGraph> {
53 };
54 
55 } // \ namespace gtsam
56 
Definition: pytypes.h:2012
LinearEquality derived from Base with constrained noise model.
void add(Args &&... args)
Add a linear inequality, forwards arguments to LinearInequality.
std::shared_ptr< EqualityFactorGraph > shared_ptr
traits
Definition: chartTesting.h:28
Factor Graph Base Class.
std::shared_ptr< LinearEquality > sharedFactor
Shared pointer to a factor.
Definition: FactorGraph.h:105
double error(const VectorValues &x) const
Compute error of a guess.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x


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