gaussian_noise.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023  *
00024  */
00025 
00026 
00033 #ifndef ACADO_TOOLKIT_GAUSSIAN_NOISE_HPP
00034 #define ACADO_TOOLKIT_GAUSSIAN_NOISE_HPP
00035 
00036 
00037 #include <acado/noise/noise.hpp>
00038 
00039 
00040 BEGIN_NAMESPACE_ACADO
00041 
00042 
00053 class GaussianNoise : public Noise
00054 {
00055         //
00056         //  PUBLIC MEMBER FUNCTIONS:
00057         //
00058         
00059         public:
00060 
00063                 GaussianNoise( );
00064 
00072         GaussianNoise(  const DVector& _mean,
00073                                                 const DVector& _variance
00074                                                 );
00075 
00083         GaussianNoise(  uint _dim,
00084                                                 double _mean,
00085                                                 double _variance
00086                                                 );
00087 
00092                 GaussianNoise(  const GaussianNoise& rhs
00093                                                 );
00094         
00097                 virtual ~GaussianNoise( );
00098 
00103                 GaussianNoise& operator=(       const GaussianNoise& rhs
00104                                                                         );
00105 
00110         virtual GaussianNoise* clone( ) const;
00111 
00118         virtual GaussianNoise* clone(   uint idx
00119                                                                                 ) const;
00120 
00121 
00129                 inline returnValue setMeans(    const DVector& _mean
00130                                                                                 );
00131 
00139                 inline returnValue setMeans(    double _mean
00140                                                                                 );
00141 
00151                 inline returnValue setMean(             uint idx,
00152                                                                                 double _mean
00153                                                                                 );
00154 
00155 
00163                 inline returnValue setVariances(        const DVector& _variance
00164                                                                                         );
00165 
00173                 inline returnValue setVariances(        double _variance
00174                                                                                         );
00175 
00185                 inline returnValue setVariance( uint idx,
00186                                                                                 double _variance
00187                                                                                 );
00188 
00189 
00201                 virtual returnValue init(       uint seed = 0
00202                                                                         );
00203 
00204         
00213                 virtual returnValue step(       DVector& _w
00214                                                                         );
00215 
00225                 virtual returnValue step(       VariablesGrid& _w
00226                                                                         );
00227 
00228 
00233                 inline const DVector& getMean( ) const;
00234 
00239                 inline const DVector& getVariance( ) const;
00240 
00241 
00242         
00243         //
00244         //  PROTECTED MEMBER FUNCTIONS:
00245         //
00246         protected:
00247 
00256                 double getGaussianRandomNumber( double _mean,
00257                                                                                 double _variance
00258                                                                                 ) const;
00259 
00260 
00261         //
00262         //  PROTECTED MEMBERS:
00263         //
00264         protected:
00265 
00266                 DVector mean;                                   
00267                 DVector variance;                               
00268 };
00269 
00270 
00271 CLOSE_NAMESPACE_ACADO
00272 
00273 
00274 
00275 #include <acado/noise/gaussian_noise.ipp>
00276 
00277 
00278 #endif  // ACADO_TOOLKIT_GAUSSIAN_NOISE_HPP
00279 
00280 
00281 /*
00282  *      end of file
00283  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 11:58:19