linearanalyticmeasurementmodel_gaussianuncertainty.cpp
Go to the documentation of this file.
1 // $Id$
2 // Copyright (C) 2002 Klaas Gadeyne <first dot last at gmail dot com>
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation; either version 2.1 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //
18 
20 #include "../sample/sample.h"
21 #include <cassert>
22 
23 namespace BFL
24 {
25  using namespace MatrixWrapper;
26 
27 
28 
32  {}
33 
34  /*
35  LinearAnalyticMeasurementModelGaussianUncertainty::LinearAnalyticMeasurementModelGaussianUncertainty
36  ( const LinearAnalyticMeasurementModelGaussianUncertainty& l )
37  : AnalyticMeasurementModelGaussianUncertainty()
38  {
39  this->_MeasurementPdf = new LinearAnalyticConditionalGaussian(*l.MeasurementPdfGet());
40  }
41  */
42 
44  {}
45 
46 
47  ColumnVector
49  const ColumnVector& x)
50  {
51  MeasurementPdfGet()->ConditionalArgumentSet(0,x);
52  if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
53  return MeasurementPdfGet()->ExpectedValueGet();
54  }
55 
56 
57  SymmetricMatrix
59  const ColumnVector& x)
60  {
61  MeasurementPdfGet()->ConditionalArgumentSet(0,x);
62  if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
63  return MeasurementPdfGet()->CovarianceGet();
64  }
65 
66 
67  Matrix
69  const ColumnVector& x)
70  {
71  MeasurementPdfGet()->ConditionalArgumentSet(0,x);
72  if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
73  return dynamic_cast<AnalyticConditionalGaussian *>(MeasurementPdfGet())->dfGet(0);
74  }
75 
76 
77  void
79  {
80  dynamic_cast<LinearAnalyticConditionalGaussian *>(MeasurementPdfGet())->MatrixSet(0,h);
81  }
82 
83 
84  void
86  {
87  dynamic_cast<LinearAnalyticConditionalGaussian *>(MeasurementPdfGet())->MatrixSet(1,j);
88  }
89 
90 
91  const Matrix&
93  {
94  return dynamic_cast<LinearAnalyticConditionalGaussian *>(_MeasurementPdf)->MatrixGet(0);
95  }
96 
97 
98  const Matrix&
100  {
101  return dynamic_cast<LinearAnalyticConditionalGaussian *>(_MeasurementPdf)->MatrixGet(1);
102  }
103 
104 
105 }
LinearAnalyticMeasurementModelGaussianUncertainty(LinearAnalyticConditionalGaussian *pdf=NULL)
Constructor.
virtual MatrixWrapper::ColumnVector PredictionGet(const MatrixWrapper::ColumnVector &u, const MatrixWrapper::ColumnVector &x)
Returns estimation of measurement.
virtual MatrixWrapper::Matrix df_dxGet(const MatrixWrapper::ColumnVector &u, const MatrixWrapper::ColumnVector &x)
Returns H-matrix.
Abstract Class representing all FULL Analytical Conditional gaussians.
virtual MatrixWrapper::SymmetricMatrix CovarianceGet(const MatrixWrapper::ColumnVector &u, const MatrixWrapper::ColumnVector &x)
Returns covariance on the measurement.


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Jun 10 2019 12:47:59