gtsam_unstable/slam/DummyFactor.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <gtsam_unstable/dllexport.h>
14 
15 namespace gtsam {
16 
17 class GTSAM_UNSTABLE_EXPORT DummyFactor : public NonlinearFactor {
18 protected:
19 
20  // Store the dimensions of the variables and the dimension of the full system
21  std::vector<size_t> dims_;
22  size_t rowDim_;
23 
24 public:
25 
27  DummyFactor() : rowDim_(1) { }
28 
30  DummyFactor(const Key& key1, size_t dim1, const Key& key2, size_t dim2);
31 
32  ~DummyFactor() override {}
33 
34  // testable
35 
37  void print(const std::string& s = "", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const override;
38 
40  bool equals(const NonlinearFactor& f, double tol = 1e-9) const override;
41 
42  // access
43 
44  const std::vector<size_t>& dims() const { return dims_; }
45 
46  // factor interface
47 
51  double error(const Values& c) const override { return 0.0; }
52 
54  size_t dim() const override { return rowDim_; }
55 
57  std::shared_ptr<GaussianFactor> linearize(const Values& c) const override;
58 
66  return std::static_pointer_cast<NonlinearFactor>(
68  }
69 
70 };
71 
72 } // \namespace gtsam
73 
74 
75 
76 
key1
const Symbol key1('v', 1)
gtsam::NonlinearFactor::shared_ptr
std::shared_ptr< This > shared_ptr
Definition: NonlinearFactor.h:78
gtsam::DummyFactor::DummyFactor
DummyFactor()
Definition: gtsam_unstable/slam/DummyFactor.h:27
s
RealScalar s
Definition: level1_cplx_impl.h:126
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
gtsam::DummyFactor::clone
NonlinearFactor::shared_ptr clone() const override
Definition: gtsam_unstable/slam/DummyFactor.h:65
c
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
gtsam::DummyFactor::dims_
std::vector< size_t > dims_
Definition: gtsam_unstable/slam/DummyFactor.h:21
gtsam::DummyFactor
Definition: gtsam_unstable/slam/DummyFactor.h:17
gtsam::DefaultKeyFormatter
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition: Key.cpp:30
gtsam::DummyFactor::rowDim_
size_t rowDim_
choose dimension for the rows
Definition: gtsam_unstable/slam/DummyFactor.h:22
gtsam::print
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
key2
const Symbol key2('v', 2)
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::DummyFactor::dim
size_t dim() const override
Definition: gtsam_unstable/slam/DummyFactor.h:54
gtsam::equals
Definition: Testable.h:112
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
NonlinearFactor.h
Non-linear factor base classes.
gtsam
traits
Definition: SFMdata.h:40
gtsam::Values
Definition: Values.h:65
gtsam::NonlinearFactor
Definition: NonlinearFactor.h:68
gtsam::DummyFactor::dims
const std::vector< size_t > & dims() const
Definition: gtsam_unstable/slam/DummyFactor.h:44
gtsam::tol
const G double tol
Definition: Group.h:79
gtsam::DummyFactor::~DummyFactor
~DummyFactor() override
Definition: gtsam_unstable/slam/DummyFactor.h:32
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:97
gtsam::DummyFactor::error
double error(const Values &c) const override
Definition: gtsam_unstable/slam/DummyFactor.h:51


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:14