OpenKalman
LinearTransform.hpp
Go to the documentation of this file.
1 /* This file is part of OpenKalman, a header-only C++ library for
2  * Kalman filters and other recursive filters.
3  *
4  * Copyright (c) 2017-2021 Christopher Lee Ogden <ogden@gatech.edu>
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0. If a copy of the MPL was not distributed with this
8  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
9  */
10 
16 #ifndef OPENKALMAN_LINEARTRANSFORM_HPP
17 #define OPENKALMAN_LINEARTRANSFORM_HPP
18 
19 
20 namespace OpenKalman
21 {
22  namespace oin = OpenKalman::internal;
23 
27  class LinearTransform : public oin::LinearTransformBase<LinearTransform>
28  {
30  friend Base;
31 
32 
38  template<typename Trans>
39  struct TransformModel
40  {
41 
42  private:
43 
44  const Trans& transformation;
45 
46  public:
47 
52  TransformModel(const Trans& t) : transformation(t) {}
53 
54 
60  template<typename InputMean, typename ... NoiseMean>
61  auto operator()(const InputMean& x, const NoiseMean& ... n) const
62  {
63  return std::tuple {transformation(x, n...), oin::get_Taylor_term<1>(transformation)(x, n...)};
64  }
65 
66  };
67 
68 
69  };
70 
71 }
72 
73 
74 #endif //OPENKALMAN_LINEARTRANSFORM_HPP
The root namespace for OpenKalman.
Definition: basics.hpp:34
auto operator()(const InputDist &x, const Ts &...ts) const
Perform one or more consecutive linear(ized) transforms.
Definition: LinearTransformBase.hpp:160
A linear tests from one statistical distribution to another.
Definition: LinearTransform.hpp:27
Definition: LinearTransformBase.hpp:45
Definition: basics.hpp:48