power.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 
00027 
00035 #ifndef ACADO_TOOLKIT_POWER_HPP
00036 #define ACADO_TOOLKIT_POWER_HPP
00037 
00038 
00039 #include <acado/symbolic_operator/symbolic_operator_fwd.hpp>
00040 
00041 
00042 BEGIN_NAMESPACE_ACADO
00043 
00044 
00045 
00056 class Power : public BinaryOperator{
00057 
00058 public:
00059 
00060 
00062     Power();
00063 
00065     Power( Operator *_argument1, Operator *_argument2 );
00066 
00068     Power( const Power &arg );
00069 
00071     ~Power();
00072 
00074     Power& operator=( const Power &arg );
00075 
00076 
00077 
00084     virtual returnValue evaluate( int     number    ,
00085                                   double *x         ,
00086                                   double *result      );
00087 
00088 
00090         virtual returnValue evaluate( EvaluationBase *x );
00091 
00092 
00098      virtual Operator* differentiate( int index   );
00099 
00100 
00101 
00107      virtual Operator* AD_forward( int                dim      , 
00108                                      VariableType      *varType  , 
00109                                      int               *component, 
00110                                      Operator       **seed     , 
00111                                      int                &nNewIS  , 
00112                                      TreeProjection ***newIS     );
00113 
00114 
00115 
00121     virtual returnValue AD_backward( int           dim      , 
00122                                      VariableType *varType  , 
00123                                      int          *component, 
00124                                      Operator     *seed     , 
00125                                      Operator    **df       , 
00126                                      int           &nNewIS  , 
00127                                      TreeProjection ***newIS   );
00128 
00129     
00130     
00136      virtual returnValue AD_symmetric( int            dim       , 
00137                                       VariableType  *varType   , 
00138                                       int           *component , 
00139                                       Operator      *l         , 
00140                                       Operator     **S         , 
00141                                       int            dimS      , 
00142                                       Operator     **dfS       , 
00143                                       Operator     **ldf       , 
00144                                       Operator     **H         , 
00145                                       int            &nNewLIS  , 
00146                                       TreeProjection ***newLIS , 
00147                                       int            &nNewSIS  , 
00148                                       TreeProjection ***newSIS , 
00149                                       int            &nNewHIS  , 
00150                                       TreeProjection ***newHIS    );
00151 
00152 
00157      virtual Operator* substitute( int   index           ,
00158                                      const Operator *sub );
00159 
00160 
00161 
00169      virtual BooleanType isLinearIn( int           dim      ,    
00170                                        VariableType *varType  ,    
00171                                        int          *component,    
00172                                        BooleanType  *implicit_dep   );
00173 
00174 
00175 
00182      virtual BooleanType isPolynomialIn( int           dim      ,    
00183                                            VariableType *varType  ,    
00184                                            int          *component,    
00185                                            BooleanType  *implicit_dep   );
00186 
00187 
00188 
00195      virtual BooleanType isRationalIn( int           dim      ,    
00196                                          VariableType *varType  ,    
00197                                          int          *component,    
00198                                          BooleanType  *implicit_dep   );
00199 
00200 
00201 
00208      virtual MonotonicityType getMonotonicity( );
00209 
00210 
00211 
00219      virtual CurvatureType getCurvature( );
00220 
00221 
00222 
00229      virtual returnValue AD_forward( int     number  ,
00230                                      double *seed    ,
00231                                      double *df        );
00233 
00234 
00235 
00243      virtual returnValue AD_forward( int     number  ,
00244                                      double *x       ,
00246                                      double *seed    ,
00247                                      double *f       ,
00249                                      double *df        );
00251 
00252 
00253     // IMPORTANT REMARK FOR AD_BACKWARD: run evaluate first to define
00254     //                                   the point x and to compute f.
00255 
00261      virtual returnValue AD_backward( int    number ,
00263                                       double seed   ,
00264                                       double  *df   );
00266 
00267 
00268 
00276      virtual returnValue AD_forward2( int    number  ,
00278                                       double *seed1  ,
00279                                       double *seed2  ,
00281                                       double *df     ,
00283                                       double *ddf    );
00285 
00286 
00287 
00288     // IMPORTANT REMARK FOR AD_BACKWARD2: run AD_forward first to define
00289     //                                    the point x and to compute f and df.
00290 
00296      virtual returnValue AD_backward2( int    number ,
00298                                        double seed1  ,
00299                                        double seed2  ,
00300                                        double   *df  ,
00302                                        double  *ddf     );
00304 
00305 
00309      virtual std::ostream& print( std::ostream &stream ) const;
00310 
00311 
00315      virtual Operator* clone() const;
00316 
00317 
00321      virtual OperatorName getName();
00322 
00323 
00324      virtual returnValue initDerivative();
00325 
00326 
00327 
00328 //
00329 //  PROTECTED FUNCTIONS:
00330 //
00331 
00332 protected:
00333 
00334         TreeProjection  *derivative01;          
00335         TreeProjection  *derivative02;          
00337         TreeProjection  *derivative12;          
00339         TreeProjection  *derivative21;          
00340         TreeProjection  *derivative22;          
00341         TreeProjection  *derivative23;          
00344 //
00345 //  PROTECTED MEMBERS:
00346 //
00347 
00348 protected:
00349 
00350 };
00351 
00352 
00353 CLOSE_NAMESPACE_ACADO
00354 
00355 
00356 
00357 #endif


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:38:42