Utils.hpp
Go to the documentation of this file.
00001 /*
00002  *      This file is part of qpOASES.
00003  *
00004  *      qpOASES -- An Implementation of the Online Active Set Strategy.
00005  *      Copyright (C) 2007-2011 by Hans Joachim Ferreau, Andreas Potschka,
00006  *      Christian Kirches et al. All rights reserved.
00007  *
00008  *      qpOASES is free software; you can redistribute it and/or
00009  *      modify it under the terms of the GNU Lesser General Public
00010  *      License as published by the Free Software Foundation; either
00011  *      version 2.1 of the License, or (at your option) any later version.
00012  *
00013  *      qpOASES is distributed in the hope that it will be useful,
00014  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  *      See the GNU Lesser General Public License for more details.
00017  *
00018  *      You should have received a copy of the GNU Lesser General Public
00019  *      License along with qpOASES; if not, write to the Free Software
00020  *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021  *
00022  */
00023 
00024 
00035 #ifndef QPOASES_UTILS_HPP
00036 #define QPOASES_UTILS_HPP
00037 
00038 
00039 #include <qpOASES/MessageHandling.hpp>
00040 
00041 
00042 
00043 BEGIN_NAMESPACE_QPOASES
00044 
00045 
00048 returnValue print(      const real_t* const v,  
00049                                         int n                                   
00050                                         );
00051 
00054 returnValue print(      const real_t* const v,          
00055                                         int n,                                          
00056                                         const int* const V_idx          
00057                                         );
00058 
00061 returnValue print(      const real_t* const v,  
00062                                         int n,                                  
00063                                         const char* name                
00064                                         );
00065 
00068 returnValue print(      const real_t* const M,  
00069                                         int nrow,                               
00070                                         int ncol                                
00071                                         );
00072 
00075 returnValue print(      const real_t* const M,          
00076                                         int nrow,                                       
00077                                         int ncol        ,                               
00078                                         const int* const ROW_idx,       
00079                                         const int* const COL_idx        
00080                                         );
00081 
00084 returnValue print(      const real_t* const M,  
00085                                         int nrow,                               
00086                                         int ncol,                               
00087                                         const char* name                
00088                                         );
00089 
00092 returnValue print(      const int* const index, 
00093                                         int n                                   
00094                                         );
00095 
00098 returnValue print(      const int* const index, 
00099                                         int n,                                  
00100                                         const char* name                
00101                                         );
00102 
00103 
00106 returnValue myPrintf(   const char* s   
00107                                                 );
00108 
00109 
00112 returnValue printCopyrightNotice( );
00113 
00114 
00119 returnValue readFromFile(       real_t* data,                           
00120                                                         int nrow,                                       
00121                                                         int ncol,                                       
00122                                                         const char* datafilename        
00123                                                         );
00124 
00129 returnValue readFromFile(       real_t* data,                           
00130                                                         int n,                                          
00131                                                         const char* datafilename        
00132                                                         );
00133 
00138 returnValue readFromFile(       int* data,                                      
00139                                                         int n,                                          
00140                                                         const char* datafilename        
00141                                                         );
00142 
00143 
00147 returnValue writeIntoFile(      const real_t* const data,       
00148                                                         int nrow,                                       
00149                                                         int ncol,                                       
00150                                                         const char* datafilename,       
00151                                                         BooleanType append                      
00152                                                         );
00153 
00157 returnValue writeIntoFile(      const real_t* const data,       
00158                                                         int n,                                          
00159                                                         const char* datafilename,       
00160                                                         BooleanType append                      
00161                                                         );
00162 
00166 returnValue writeIntoFile(      const int* const integer,       
00167                                                         int n,                                          
00168                                                         const char* datafilename,       
00169                                                         BooleanType append                      
00170                                                         );
00171 
00172 
00175 real_t getCPUtime( );
00176 
00177 
00180 real_t getNorm( const real_t* const v,  
00181                                 int n                                   
00182                                 );
00183 
00184 
00188 inline real_t getSign(  real_t arg      
00189                                                 );
00190 
00191 
00194 inline int getMax(      int x,  
00195                                         int y   
00196                                         );
00197 
00200 inline real_t getMax(   real_t x,       
00201                                                 real_t y        
00202                                                 );
00203 
00204 
00207 inline real_t getMin(   real_t x,       
00208                                                 real_t y        
00209                                                 );
00210 
00212 void getKKTResidual(    int nV,                                         
00213                                                 int nC,                                         
00214                                                 const real_t* const H,          
00215                                                 const real_t* const g,          
00216                                                 const real_t* const A,          
00217                                                 const real_t* const lb,         
00218                                                 const real_t* const ub,         
00219                                                 const real_t* const lbA,        
00220                                                 const real_t* const ubA,        
00221                                                 const real_t* const x,          
00222                                                 const real_t* const y,          
00223                                                 real_t& stat,                           
00224                                                 real_t& feas,                           
00225                                                 real_t& cmpl                            
00226                                                 );
00227 
00228 
00231 returnValue convertBooleanTypeToString( BooleanType value,              
00232                                                                                 char* const string              
00234                                                                                 );
00235 
00238 returnValue convertSubjectToStatusToString(     SubjectToStatus value,  
00239                                                                                         char* const string              
00241                                                                                         );
00242 
00245 returnValue convertPrintLevelToString(  PrintLevel value,               
00246                                                                                 char* const string              
00248                                                                                 );
00249 
00250 
00251 #ifdef __DEBUG__
00252 
00253 extern "C" void gdb_printmat(   const char *fname,                      
00254                                                                 real_t *M,                                      
00255                                                                 int n,                                          
00256                                                                 int m,                                          
00257                                                                 int ldim                                        
00258                                                                 );
00259 #endif /* __DEBUG__ */
00260 
00261 
00262 END_NAMESPACE_QPOASES
00263 
00264 
00265 #include <qpOASES/Utils.ipp>
00266 
00267 #endif  /* QPOASES_UTILS_HPP */
00268 
00269 
00270 /*
00271  *      end of file
00272  */


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