analyticsystemmodel_gaussianuncertainty.cpp
Go to the documentation of this file.
00001 // $Id: analyticsystemmodel_gaussianuncertainty.cpp 29495 2008-08-13 12:57:49Z tdelaet $
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 "analyticsystemmodel_gaussianuncertainty.h"
00020 
00021 namespace BFL
00022 {
00023 
00024   using namespace MatrixWrapper;
00025 
00026 
00027   // Constructor
00028   AnalyticSystemModelGaussianUncertainty::AnalyticSystemModelGaussianUncertainty
00029   (AnalyticConditionalGaussian* Systempdf)
00030     : SystemModel<ColumnVector>(Systempdf)
00031   {}
00032 
00033   // Copy constructor
00034   /*
00035   AnalyticSystemModelGaussianUncertainty::AnalyticSystemModelGaussianUncertainty
00036   (const AnalyticSystemModelGaussianUncertainty& model)
00037     : SystemModel<ColumnVector>(&(model.SystemPdfGet()))
00038   {}
00039   */
00040 
00041   // Destructor
00042   AnalyticSystemModelGaussianUncertainty::~AnalyticSystemModelGaussianUncertainty()
00043   {}
00044 
00045 
00046   Matrix
00047   AnalyticSystemModelGaussianUncertainty::df_dxGet(const ColumnVector& u, const ColumnVector& x)
00048   {
00049     SystemPdfGet()->ConditionalArgumentSet(0,x);
00050     if (SystemPdfGet()->NumConditionalArgumentsGet() == 2) SystemPdfGet()->ConditionalArgumentSet(1,u);
00051     return dynamic_cast<AnalyticConditionalGaussian *>(SystemPdfGet())->dfGet(0);
00052   }
00053 
00054 
00055   ColumnVector
00056   AnalyticSystemModelGaussianUncertainty::PredictionGet(const ColumnVector& u, const ColumnVector& x)
00057   {
00058     SystemPdfGet()->ConditionalArgumentSet(0,x);
00059     if (SystemPdfGet()->NumConditionalArgumentsGet() == 2) SystemPdfGet()->ConditionalArgumentSet(1,u);
00060     return SystemPdfGet()->ExpectedValueGet();
00061   }
00062 
00063 
00064   SymmetricMatrix
00065   AnalyticSystemModelGaussianUncertainty::CovarianceGet(const ColumnVector& u, const ColumnVector& x)
00066   {
00067     SystemPdfGet()->ConditionalArgumentSet(0,x);
00068     if (SystemPdfGet()->NumConditionalArgumentsGet() == 2) SystemPdfGet()->ConditionalArgumentSet(1,u);
00069     return dynamic_cast<AnalyticConditionalGaussian *>(SystemPdfGet())->CovarianceGet();
00070   }
00071 
00072 
00073 } // End namespace BFL


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 Sun Oct 5 2014 22:29:52