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-2008 by Hans Joachim Ferreau et al. All rights reserved.
00006  *
00007  *      qpOASES is free software; you can redistribute it and/or
00008  *      modify it under the terms of the GNU Lesser General Public
00009  *      License as published by the Free Software Foundation; either
00010  *      version 2.1 of the License, or (at your option) any later version.
00011  *
00012  *      qpOASES is distributed in the hope that it will be useful,
00013  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *      Lesser General Public License for more details.
00016  *
00017  *      You should have received a copy of the GNU Lesser General Public
00018  *      License along with qpOASES; if not, write to the Free Software
00019  *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020  *
00021  */
00022 
00023 
00035 #ifndef QPOASES_INDEXLIST_HPP
00036 #define QPOASES_INDEXLIST_HPP
00037 
00038 
00039 #include <Utils.hpp>
00040 
00041 
00048 class Indexlist
00049 {
00050         /*
00051          *      PUBLIC MEMBER FUNCTIONS
00052          */
00053         public:
00055                 Indexlist( );
00056 
00058                 Indexlist(      const Indexlist& rhs    
00059                                         );
00060 
00062                 ~Indexlist( );
00063 
00065                 Indexlist& operator=(   const Indexlist& rhs    
00066                                                                 );
00067 
00070                 returnValue init( );
00071 
00072 
00076                 returnValue     getNumberArray( int* const numberarray  
00077                                                                         ) const;
00078 
00079 
00083                 int     getIndex(       int givennumber 
00084                                                 ) const;
00085 
00089                 int     getPhysicalIndex(       int givennumber 
00090                                                                 ) const;
00091 
00095                 int     getNumber(      int physicalindex       
00096                                                 ) const;
00097 
00098 
00101                 inline int getLength( );
00102 
00105                 inline int getLastNumber( ) const;
00106 
00107 
00112                 returnValue addNumber(  int addnumber   
00113                                                                 );
00114 
00117                 returnValue removeNumber(       int removenumber        
00118                                                                         );
00119 
00122                 returnValue swapNumbers(        int number1,
00123                                                                         int number2     
00124                                                                         );
00125 
00128                 inline BooleanType isMember(    int _number     
00129                                                                                 ) const;
00130 
00131 
00132         /*
00133          *      PROTECTED MEMBER VARIABLES
00134          */
00135         protected:
00136                 int number[INDEXLISTFACTOR*(NVMAX+NCMAX)];              
00137                 int next[INDEXLISTFACTOR*(NVMAX+NCMAX)];                
00138                 int previous[INDEXLISTFACTOR*(NVMAX+NCMAX)];    
00139                 int     length;                                                                         
00140                 int     first;                                                                          
00141                 int     last;                                                                           
00142                 int     lastusedindex;                                                          
00143                 int     physicallength;                                                         
00144 };
00145 
00146 
00147 #include <Indexlist.ipp>
00148 
00149 #endif  /* QPOASES_INDEXLIST_HPP */
00150 
00151 
00152 /*
00153  *      end of file
00154  */


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