analyticmeasurementmodel_gaussianuncertainty.cpp
Go to the documentation of this file.
00001 // $Id$
00002 // Copyright (C) 2002 Klaas Gadeyne <first dot last at gmail dot com>
00003 //
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU Lesser General Public License as published by
00006 // the Free Software Foundation; either version 2.1 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 //
00018 
00019 #include "analyticmeasurementmodel_gaussianuncertainty.h"
00020 
00021 namespace BFL
00022 {
00023 
00024   using namespace MatrixWrapper;
00025 
00026   // Constructor
00027   AnalyticMeasurementModelGaussianUncertainty::AnalyticMeasurementModelGaussianUncertainty
00028   (AnalyticConditionalGaussian* Measurementpdf)
00029     : MeasurementModel<ColumnVector,ColumnVector>(Measurementpdf)
00030   {}
00031 
00032   // Destructor
00033   AnalyticMeasurementModelGaussianUncertainty::~AnalyticMeasurementModelGaussianUncertainty()
00034   {}
00035 
00036 
00037   Matrix
00038   AnalyticMeasurementModelGaussianUncertainty::df_dxGet(const ColumnVector& u, const ColumnVector& x)
00039   {
00040     MeasurementPdfGet()->ConditionalArgumentSet(0,x);
00041     if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
00042     return dynamic_cast<AnalyticConditionalGaussian *>(MeasurementPdfGet())->dfGet(0);
00043   }
00044 
00045 
00046   ColumnVector
00047   AnalyticMeasurementModelGaussianUncertainty::PredictionGet(const ColumnVector& u, const ColumnVector& x)
00048   {
00049     MeasurementPdfGet()->ConditionalArgumentSet(0,x);
00050     if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
00051     return MeasurementPdfGet()->ExpectedValueGet();
00052   }
00053 
00054 
00055   SymmetricMatrix
00056   AnalyticMeasurementModelGaussianUncertainty::CovarianceGet(const ColumnVector& u, const ColumnVector& x)
00057   {
00058     MeasurementPdfGet()->ConditionalArgumentSet(0,x);
00059     if (MeasurementPdfGet()->NumConditionalArgumentsGet() == 2) MeasurementPdfGet()->ConditionalArgumentSet(1,u);
00060     return dynamic_cast<AnalyticConditionalGaussian *>(MeasurementPdfGet())->CovarianceGet();
00061   }
00062 
00063 }


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 Feb 11 2019 03:45:12