Indexlist.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 
00036 #ifndef QPOASES_INDEXLIST_HPP
00037 #define QPOASES_INDEXLIST_HPP
00038 
00039 
00040 #include <qpOASES/Utils.hpp>
00041 
00042 
00043 BEGIN_NAMESPACE_QPOASES
00044 
00045 
00055 class Indexlist
00056 {
00057         /*
00058          *  FRIENDS
00059          */
00060         friend class DenseMatrix;
00061         friend class SymDenseMat;
00062         friend class SparseMatrix;
00063         friend class SymSparseMat;
00064 
00065         /*
00066          *      PUBLIC MEMBER FUNCTIONS
00067          */
00068         public:
00070                 Indexlist( );
00071 
00073                 Indexlist(      int n   
00074                                         );
00075 
00077                 Indexlist(      const Indexlist& rhs    
00078                                         );
00079 
00081                 ~Indexlist( );
00082 
00084                 Indexlist& operator=(   const Indexlist& rhs    
00085                                                                 );
00086 
00087 
00091                 returnValue init(       int n = 0       
00092                                                         );
00093 
00094 
00098                 returnValue     getNumberArray( int** const numberarray 
00099                                                                         ) const;
00100 
00101 
00105                 int     getIndex(       int givennumber 
00106                                                 ) const;
00107 
00111                 int     getNumber(      int physicalindex       
00112                                                 ) const;
00113 
00114 
00117                 inline int getLength( ) const;
00118 
00121                 inline int getLastNumber( ) const;
00122 
00123 
00128                 returnValue addNumber(  int addnumber                   
00129                                                                 );
00130 
00133                 returnValue removeNumber(       int removenumber        
00134                                                                         );
00135 
00138                 returnValue swapNumbers(        int number1,            
00139                                                                         int number2                     
00140                                                                         );
00141 
00144                 inline BooleanType isMember(    int _number             
00145                                                                                 ) const;
00146 
00147 
00148         /*
00149          *      PROTECTED MEMBER FUNCTIONS
00150          */
00151         protected:
00154                 returnValue clear( );
00155 
00158                 returnValue copy(       const Indexlist& rhs    
00159                                                         );
00160 
00165                 int findInsert( int i
00166                                                 ) const;
00167 
00168 
00169         /*
00170          *      PROTECTED MEMBER VARIABLES
00171          */
00172         protected:
00173                 int* number;            
00174                 int* iSort;                     
00176                 int     length;                 
00177                 int     first;                  
00178                 int     last;                   
00179                 int     lastusedindex;  
00180                 int     physicallength; 
00181 };
00182 
00183 END_NAMESPACE_QPOASES
00184 
00185 #include <qpOASES/Indexlist.ipp>
00186 
00187 #endif  /* QPOASES_INDEXLIST_HPP */
00188 
00189 
00190 /*
00191  *      end of file
00192  */


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