BasisFactors.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 
21 #include <gtsam/basis/Basis.h>
23 
24 namespace gtsam {
25 
38 template <class BASIS>
39 class EvaluationFactor : public FunctorizedFactor<double, Vector> {
40  private:
42 
43  public:
45 
56  const size_t N, double x)
57  : Base(key, z, model, typename BASIS::EvaluationFunctor(N, x)) {}
58 
71  const size_t N, double x, double a, double b)
72  : Base(key, z, model, typename BASIS::EvaluationFunctor(N, x, a, b)) {}
73 
74  virtual ~EvaluationFactor() {}
75 };
76 
93 template <class BASIS>
94 class VectorEvaluationFactor : public FunctorizedFactor<Vector, Matrix> {
95  private:
97 
98  public:
100 
113  const SharedNoiseModel &model, const size_t M,
114  const size_t N, double x)
115  : Base(key, z, model, typename BASIS::VectorEvaluationFunctor(M, N, x)) {}
116 
131  const SharedNoiseModel &model, const size_t M,
132  const size_t N, double x, double a, double b)
133  : Base(key, z, model,
134  typename BASIS::VectorEvaluationFunctor(M, N, x, a, b)) {}
135 
137 };
138 
157 template <class BASIS>
158 class VectorComponentFactor : public FunctorizedFactor<double, Matrix> {
159  private:
161 
162  public:
164 
180  const size_t P, const size_t N, size_t i, double x)
181  : Base(key, z, model,
182  typename BASIS::VectorComponentFunctor(P, N, i, x)) {}
183 
201  const size_t P, const size_t N, size_t i, double x,
202  double a, double b)
203  : Base(key, z, model,
204  typename BASIS::VectorComponentFunctor(P, N, i, x, a, b)) {}
205 
207 };
208 
226 template <class BASIS, typename T>
227 class ManifoldEvaluationFactor : public FunctorizedFactor<T, Matrix> {
228  private:
230 
231  public:
233 
245  const size_t N, double x)
246  : Base(key, z, model,
247  typename BASIS::template ManifoldEvaluationFunctor<T>(N, x)) {}
248 
262  const size_t N, double x, double a, double b)
263  : Base(
264  key, z, model,
265  typename BASIS::template ManifoldEvaluationFunctor<T>(N, x, a, b)) {
266  }
267 
269 };
270 
277 template <class BASIS>
279  : public FunctorizedFactor<double, typename BASIS::Parameters> {
280  private:
282 
283  public:
285 
296  DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model,
297  const size_t N, double x)
298  : Base(key, z, model, typename BASIS::DerivativeFunctor(N, x)) {}
299 
312  DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model,
313  const size_t N, double x, double a, double b)
314  : Base(key, z, model, typename BASIS::DerivativeFunctor(N, x, a, b)) {}
315 
316  virtual ~DerivativeFactor() {}
317 };
318 
325 template <class BASIS>
326 class VectorDerivativeFactor : public FunctorizedFactor<Vector, Matrix> {
327  private:
329  using Func = typename BASIS::VectorDerivativeFunctor;
330 
331  public:
333 
346  const SharedNoiseModel &model, const size_t M,
347  const size_t N, double x)
348  : Base(key, z, model, Func(M, N, x)) {}
349 
364  const SharedNoiseModel &model, const size_t M,
365  const size_t N, double x, double a, double b)
366  : Base(key, z, model, Func(M, N, x, a, b)) {}
367 
369 };
370 
378 template <class BASIS>
379 class ComponentDerivativeFactor : public FunctorizedFactor<double, Matrix> {
380  private:
382  using Func = typename BASIS::ComponentDerivativeFunctor;
383 
384  public:
386 
402  const SharedNoiseModel &model, const size_t P,
403  const size_t N, size_t i, double x)
404  : Base(key, z, model, Func(P, N, i, x)) {}
405 
423  const SharedNoiseModel &model, const size_t P,
424  const size_t N, size_t i, double x, double a,
425  double b)
426  : Base(key, z, model, Func(P, N, i, x, a, b)) {}
427 
429 };
430 
431 } // namespace gtsam
gtsam::VectorDerivativeFactor::VectorDerivativeFactor
VectorDerivativeFactor(Key key, const Vector &z, const SharedNoiseModel &model, const size_t M, const size_t N, double x)
Construct a new VectorDerivativeFactor object.
Definition: BasisFactors.h:345
gtsam::VectorComponentFactor::VectorComponentFactor
VectorComponentFactor()
Definition: BasisFactors.h:163
gtsam::DerivativeFactor
Definition: BasisFactors.h:278
gtsam::ManifoldEvaluationFactor::ManifoldEvaluationFactor
ManifoldEvaluationFactor(Key key, const T &z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new ManifoldEvaluationFactor object.
Definition: BasisFactors.h:244
gtsam::DerivativeFactor::DerivativeFactor
DerivativeFactor()
Definition: BasisFactors.h:284
gtsam::ManifoldEvaluationFactor
Definition: BasisFactors.h:227
gtsam::VectorComponentFactor::VectorComponentFactor
VectorComponentFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t P, const size_t N, size_t i, double x)
Construct a new VectorComponentFactor object.
Definition: BasisFactors.h:179
x
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
Definition: gnuplot_common_settings.hh:12
gtsam::ComponentDerivativeFactor::Func
typename BASIS::ComponentDerivativeFunctor Func
Definition: BasisFactors.h:382
gtsam::EvaluationFactor
Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the ...
Definition: BasisFactors.h:39
gtsam::ComponentDerivativeFactor::ComponentDerivativeFactor
ComponentDerivativeFactor()
Definition: BasisFactors.h:385
gtsam::VectorEvaluationFactor
Definition: BasisFactors.h:94
gtsam::EvaluationFactor::EvaluationFactor
EvaluationFactor(Key key, double z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new EvaluationFactor object.
Definition: BasisFactors.h:55
gtsam::ManifoldEvaluationFactor::ManifoldEvaluationFactor
ManifoldEvaluationFactor()
Definition: BasisFactors.h:232
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38
gtsam::VectorComponentFactor
Definition: BasisFactors.h:158
gtsam::VectorDerivativeFactor::VectorDerivativeFactor
VectorDerivativeFactor()
Definition: BasisFactors.h:332
gtsam::VectorEvaluationFactor::VectorEvaluationFactor
VectorEvaluationFactor(Key key, const Vector &z, const SharedNoiseModel &model, const size_t M, const size_t N, double x, double a, double b)
Construct a new VectorEvaluationFactor object.
Definition: BasisFactors.h:130
Basis.h
Compute an interpolating basis.
gtsam::ComponentDerivativeFactor::ComponentDerivativeFactor
ComponentDerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t P, const size_t N, size_t i, double x)
Construct a new ComponentDerivativeFactor object.
Definition: BasisFactors.h:401
gtsam::ManifoldEvaluationFactor::ManifoldEvaluationFactor
ManifoldEvaluationFactor(Key key, const T &z, const SharedNoiseModel &model, const size_t N, double x, double a, double b)
Construct a new ManifoldEvaluationFactor object.
Definition: BasisFactors.h:261
pybind_wrapper_test_script.z
z
Definition: pybind_wrapper_test_script.py:61
gtsam::VectorComponentFactor::VectorComponentFactor
VectorComponentFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t P, const size_t N, size_t i, double x, double a, double b)
Construct a new VectorComponentFactor object.
Definition: BasisFactors.h:200
gtsam::SharedNoiseModel
noiseModel::Base::shared_ptr SharedNoiseModel
Definition: NoiseModel.h:762
Eigen::Triplet< double >
gtsam::EvaluationFactor::~EvaluationFactor
virtual ~EvaluationFactor()
Definition: BasisFactors.h:74
gtsam::ComponentDerivativeFactor::ComponentDerivativeFactor
ComponentDerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t P, const size_t N, size_t i, double x, double a, double b)
Construct a new ComponentDerivativeFactor object.
Definition: BasisFactors.h:422
gtsam::ManifoldEvaluationFactor::~ManifoldEvaluationFactor
virtual ~ManifoldEvaluationFactor()
Definition: BasisFactors.h:268
model
noiseModel::Diagonal::shared_ptr model
Definition: doc/Code/Pose2SLAMExample.cpp:7
gtsam::EvaluationFactor::EvaluationFactor
EvaluationFactor()
Definition: BasisFactors.h:44
gtsam::VectorDerivativeFactor::VectorDerivativeFactor
VectorDerivativeFactor(Key key, const Vector &z, const SharedNoiseModel &model, const size_t M, const size_t N, double x, double a, double b)
Construct a new VectorDerivativeFactor object.
Definition: BasisFactors.h:363
gtsam::b
const G & b
Definition: Group.h:79
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
gtsam::DerivativeFactor::DerivativeFactor
DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, double x, double a, double b)
Construct a new DerivativeFactor object.
Definition: BasisFactors.h:312
gtsam::FunctorizedFactor
Definition: FunctorizedFactor.h:59
gtsam
traits
Definition: SFMdata.h:40
gtsam::VectorEvaluationFactor::~VectorEvaluationFactor
virtual ~VectorEvaluationFactor()
Definition: BasisFactors.h:136
gtsam::DerivativeFactor::DerivativeFactor
DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new DerivativeFactor object.
Definition: BasisFactors.h:296
gtsam::NoiseModelFactorN< Vector >::N
@ N
Definition: NonlinearFactor.h:436
gtsam::VectorEvaluationFactor::VectorEvaluationFactor
VectorEvaluationFactor()
Definition: BasisFactors.h:99
gtsam::VectorDerivativeFactor::~VectorDerivativeFactor
virtual ~VectorDerivativeFactor()
Definition: BasisFactors.h:368
P
static double P[]
Definition: ellpe.c:68
gtsam::VectorDerivativeFactor
Definition: BasisFactors.h:326
gtsam::VectorComponentFactor::~VectorComponentFactor
virtual ~VectorComponentFactor()
Definition: BasisFactors.h:206
gtsam::NoiseModelFactorN< Vector >::key
Key key() const
Definition: NonlinearFactor.h:582
gtsam::EvaluationFactor::EvaluationFactor
EvaluationFactor(Key key, double z, const SharedNoiseModel &model, const size_t N, double x, double a, double b)
Construct a new EvaluationFactor object.
Definition: BasisFactors.h:70
FunctorizedFactor.h
gtsam::ComponentDerivativeFactor::~ComponentDerivativeFactor
virtual ~ComponentDerivativeFactor()
Definition: BasisFactors.h:428
gtsam::Key
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:97
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
gtsam::VectorEvaluationFactor::VectorEvaluationFactor
VectorEvaluationFactor(Key key, const Vector &z, const SharedNoiseModel &model, const size_t M, const size_t N, double x)
Construct a new VectorEvaluationFactor object.
Definition: BasisFactors.h:112
gtsam::DerivativeFactor::~DerivativeFactor
virtual ~DerivativeFactor()
Definition: BasisFactors.h:316
gtsam::ComponentDerivativeFactor
Definition: BasisFactors.h:379
gtsam::VectorDerivativeFactor::Func
typename BASIS::VectorDerivativeFunctor Func
Definition: BasisFactors.h:329
M
Matrix< RealScalar, Dynamic, Dynamic > M
Definition: bench_gemm.cpp:51


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:54