external_packages/qpOASES-3.0beta/include/qpOASES/Indexlist.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of qpOASES.
3  *
4  * qpOASES -- An Implementation of the Online Active Set Strategy.
5  * Copyright (C) 2007-2011 by Hans Joachim Ferreau, Andreas Potschka,
6  * Christian Kirches et al. All rights reserved.
7  *
8  * qpOASES is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * qpOASES is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with qpOASES; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23 
24 
36 #ifndef QPOASES_INDEXLIST_HPP
37 #define QPOASES_INDEXLIST_HPP
38 
39 
40 #include <qpOASES/Utils.hpp>
41 
42 
44 
45 
55 class Indexlist
56 {
57  /*
58  * FRIENDS
59  */
60  friend class DenseMatrix;
61  friend class SymDenseMat;
62  friend class SparseMatrix;
63  friend class SymSparseMat;
64 
65  /*
66  * PUBLIC MEMBER FUNCTIONS
67  */
68  public:
70  Indexlist( );
71 
73  Indexlist( int n
74  );
75 
77  Indexlist( const Indexlist& rhs
78  );
79 
81  ~Indexlist( );
82 
85  );
86 
87 
91  returnValue init( int n = 0
92  );
93 
94 
98  returnValue getNumberArray( int** const numberarray
99  ) const;
100 
101 
105  int getIndex( int givennumber
106  ) const;
107 
111  int getNumber( int physicalindex
112  ) const;
113 
114 
117  inline int getLength( ) const;
118 
121  inline int getLastNumber( ) const;
122 
123 
128  returnValue addNumber( int addnumber
129  );
130 
133  returnValue removeNumber( int removenumber
134  );
135 
138  returnValue swapNumbers( int number1,
139  int number2
140  );
141 
144  inline BooleanType isMember( int _number
145  ) const;
146 
147 
148  /*
149  * PROTECTED MEMBER FUNCTIONS
150  */
151  protected:
154  returnValue clear( );
155 
158  returnValue copy( const Indexlist& rhs
159  );
160 
165  int findInsert( int i
166  ) const;
167 
168 
169  /*
170  * PROTECTED MEMBER VARIABLES
171  */
172  protected:
173  int* number;
174  int* iSort;
176  int length;
177  int first;
178  int last;
179  int lastusedindex;
180  int physicallength;
181 };
182 
184 
185 #include <qpOASES/Indexlist.ipp>
186 
187 #endif /* QPOASES_INDEXLIST_HPP */
188 
189 
190 /*
191  * end of file
192  */
Interfaces matrix-vector operations tailored to symmetric sparse matrices.
int getLastNumber() const
Allows to pass back messages to the calling function.
Interfaces matrix-vector operations tailored to symmetric dense matrices.
Interfaces matrix-vector operations tailored to general dense matrices.
Interfaces matrix-vector operations tailored to general sparse matrices.
int getLength()
returnValue copy(const Indexlist &rhs)
void rhs(const real_t *x, real_t *f)
BooleanType isMember(int _number) const
int getNumber(int physicalindex) const


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:41