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
Matrix< RealScalar, Dynamic, Dynamic > M
Definition: bench_gemm.cpp:51
DerivativeFactor(Key key, const double &z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new DerivativeFactor object.
Definition: BasisFactors.h:296
noiseModel::Diagonal::shared_ptr model
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
typename BASIS::VectorDerivativeFunctor Func
Definition: BasisFactors.h:329
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
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
Eigen::VectorXd Vector
Definition: Vector.h:38
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
Factor for enforcing the scalar value of the polynomial BASIS representation at x is the same as the ...
Definition: BasisFactors.h:39
Compute an interpolating basis.
EvaluationFactor(Key key, double z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new EvaluationFactor object.
Definition: BasisFactors.h:55
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
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
const G & b
Definition: Group.h:86
traits
Definition: chartTesting.h:28
ManifoldEvaluationFactor(Key key, const T &z, const SharedNoiseModel &model, const size_t N, double x)
Construct a new ManifoldEvaluationFactor object.
Definition: BasisFactors.h:244
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
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
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
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
typename BASIS::ComponentDerivativeFunctor Func
Definition: BasisFactors.h:382
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
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
noiseModel::Base::shared_ptr SharedNoiseModel
Definition: NoiseModel.h:741
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
Author(s):
autogenerated on Tue Jul 4 2023 02:33:57