📄 unscentedkalmansmootherbackwardtransitionadaptor.hpp
字号:
#ifndef INDII_ML_FILTER_UNSCENTEDKALMANSMOOTHERBACKWARDTRANSITIONADAPTOR_HPP#define INDII_ML_FILTER_UNSCENTEDKALMANSMOOTHERBACKWARDTRANSITIONADAPTOR_HPP#include "UnscentedTransformationModel.hpp"namespace indii { namespace ml { namespace filter { template <class T> class UnscentedTransformation; template <class T> class UnscentedKalmanSmoother;/** * Adaptor mapping UnscentedTransformationModel interface to method calls in * UnscentedKalmanSmootherModel. * * @author Lawrence Murray <lawrence@indii.org> * @version $Rev: 329 $ * @date $Date: 2007-10-16 17:10:39 +0100 (Tue, 16 Oct 2007) $ * * @param T The type of time. * * For internal use only. */template <class T = unsigned int>class UnscentedKalmanSmootherBackwardTransitionAdaptor : public UnscentedTransformationModel<T> { friend class UnscentedTransformation<T>; friend class UnscentedKalmanSmoother<T>;private: /** * Constructor. * * @param smoother UnscentedKalmanSmoother for which to map calls. */ UnscentedKalmanSmootherBackwardTransitionAdaptor( const UnscentedKalmanSmoother<T>* smoother); /** * Maps call to UnscentedKalmanSmootherModel::backwardTransition. */ virtual indii::ml::aux::vector propagate(const indii::ml::aux::vector& x, T delta = 0); /** * Smoother for which to act as adaptor. */ const UnscentedKalmanSmoother<T>* smoother;}; } }}#include "UnscentedKalmanSmoother.hpp"#include "UnscentedKalmanSmootherModel.hpp"using namespace indii::ml::filter;namespace ublas = boost::numeric::ublas;template <class T>UnscentedKalmanSmootherBackwardTransitionAdaptor<T>::UnscentedKalmanSmootherBackwardTransitionAdaptor(const UnscentedKalmanSmoother<T>* smoother) : smoother(smoother) { // nothing further to do}template <class T>aux::vector UnscentedKalmanSmootherBackwardTransitionAdaptor<T>::propagate( const aux::vector& X, T delta) { const unsigned int N = smoother->N; const unsigned int W = smoother->W; aux::vector x(project(X, ublas::range(0,N))); aux::vector w(project(X, ublas::range(N,N+W))); return smoother->model->backwardTransition(x, w, delta);}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -