SymbolicFactor.cpp
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 #include <gtsam/base/FastVector.h>
24 
25 using namespace std;
26 
27 namespace gtsam {
28 
29  /* ************************************************************************* */
30  double SymbolicFactor::error(const HybridValues& c) const {
31  throw std::runtime_error("SymbolicFactor::error is not implemented");
32  }
33 
34  /* ************************************************************************* */
35  std::pair<std::shared_ptr<SymbolicConditional>, std::shared_ptr<SymbolicFactor> >
37  {
38  return internal::EliminateSymbolic(factors, keys);
39  }
40 
41  /* ************************************************************************* */
42  bool SymbolicFactor::equals(const This& other, double tol) const
43  {
44  return Base::equals(other, tol);
45  }
46 
47  /* ************************************************************************* */
48  std::pair<std::shared_ptr<SymbolicConditional>, std::shared_ptr<SymbolicFactor> >
49  SymbolicFactor::eliminate(const Ordering& keys) const
50  {
52  graph.push_back(*this); // TODO: Is there a way to avoid copying this factor?
53  return EliminateSymbolic(graph, keys);
54  }
55 
56 } // gtsam
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
Definition: FactorGraph.h:190
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
const GaussianFactorGraph factors
Definition: BFloat16.h:88
NonlinearFactorGraph graph
std::pair< std::shared_ptr< SymbolicConditional >, std::shared_ptr< SymbolicFactor > > EliminateSymbolic(const SymbolicFactorGraph &factors, const Ordering &keys)
A thin wrapper around std::vector that uses a custom allocator.
traits
Definition: chartTesting.h:28
static double error
Definition: testRot3.cpp:37
const G double tol
Definition: Group.h:86
const KeyVector keys


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