quotient.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_QUOTIENT_HPP
00036 #define ACADO_TOOLKIT_QUOTIENT_HPP
00037 
00038 
00039 #include <acado/symbolic_operator/symbolic_operator_fwd.hpp>
00040 
00041 
00042 BEGIN_NAMESPACE_ACADO
00043 
00044 
00055 class Quotient : public BinaryOperator{
00056 
00057 public:
00058 
00060     Quotient();
00061 
00063     Quotient( Operator *_argument1, Operator *_argument2 );
00064 
00066     Quotient( const Quotient &arg );
00067 
00069     ~Quotient();
00070 
00072     Quotient& operator=( const Quotient &arg );
00073 
00074 
00081     virtual returnValue evaluate( int     number    ,
00082                                   double *x         ,
00083                                   double *result      );
00084 
00085 
00087         virtual returnValue evaluate( EvaluationBase *x );
00088         
00089         
00095      virtual Operator* differentiate( int index   );
00096 
00097 
00098 
00104      virtual Operator* AD_forward( int                dim      , 
00105                                      VariableType      *varType  , 
00106                                      int               *component, 
00107                                      Operator       **seed     , 
00108                                      int                &nNewIS  , 
00109                                      TreeProjection ***newIS     );
00110 
00111 
00112 
00118     virtual returnValue AD_backward( int           dim      , 
00119                                      VariableType *varType  , 
00120                                      int          *component, 
00121                                      Operator     *seed     , 
00122                                      Operator    **df       , 
00123                                      int           &nNewIS  , 
00124                                      TreeProjection ***newIS   );
00125 
00126     
00132      virtual returnValue AD_symmetric( int            dim       , 
00133                                       VariableType  *varType   , 
00134                                       int           *component , 
00135                                       Operator      *l         , 
00136                                       Operator     **S         , 
00137                                       int            dimS      , 
00138                                       Operator     **dfS       , 
00139                                       Operator     **ldf       , 
00140                                       Operator     **H         , 
00141                                       int            &nNewLIS  , 
00142                                       TreeProjection ***newLIS , 
00143                                       int            &nNewSIS  , 
00144                                       TreeProjection ***newSIS , 
00145                                       int            &nNewHIS  , 
00146                                       TreeProjection ***newHIS    );
00147      
00148      
00153      virtual Operator* substitute( int   index           ,
00154                                      const Operator *sub );
00155 
00156 
00157 
00165      virtual BooleanType isLinearIn( int           dim      ,    
00166                                        VariableType *varType  ,    
00167                                        int          *component,    
00168                                        BooleanType  *implicit_dep   );
00169 
00170 
00171 
00178      virtual BooleanType isPolynomialIn( int           dim      ,    
00179                                            VariableType *varType  ,    
00180                                            int          *component,    
00181                                            BooleanType  *implicit_dep   );
00182 
00183 
00184 
00191      virtual BooleanType isRationalIn( int           dim      ,    
00192                                          VariableType *varType  ,    
00193                                          int          *component,    
00194                                          BooleanType  *implicit_dep   );
00195 
00196 
00197 
00204      virtual MonotonicityType getMonotonicity( );
00205 
00206 
00207 
00215      virtual CurvatureType getCurvature( );
00216 
00217 
00219      virtual double getValue() const;
00220 
00221 
00228      virtual returnValue AD_forward( int     number  ,
00229                                      double *seed    ,
00230                                      double *df        );
00232 
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 
00312 
00316      virtual Operator* clone() const;
00317 
00318 
00322      virtual OperatorName getName();
00323 
00324 
00325      virtual returnValue initDerivative();
00326 
00327 
00328 //
00329 //  PROTECTED FUNCTIONS:
00330 //
00331 
00332 protected:
00333 
00334 
00335 //
00336 //  PROTECTED MEMBERS:
00337 //
00338 
00339 protected:
00340 
00341         TreeProjection  *derivative0;           
00342         TreeProjection  *derivative1;           
00343         TreeProjection  *derivative2;           
00345 };
00346 
00347 
00348 CLOSE_NAMESPACE_ACADO
00349 
00350 
00351 
00352 #endif


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