external_packages/qpOASES-3.0beta/include/qpOASES/Utils.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 
35 #ifndef QPOASES_UTILS_HPP
36 #define QPOASES_UTILS_HPP
37 
38 
39 #include <qpOASES/MessageHandling.hpp>
40 
41 
42 
44 
45 
48 returnValue print( const real_t* const v,
49  int n
50  );
51 
54 returnValue print( const real_t* const v,
55  int n,
56  const int* const V_idx
57  );
58 
61 returnValue print( const real_t* const v,
62  int n,
63  const char* name
64  );
65 
68 returnValue print( const real_t* const M,
69  int nrow,
70  int ncol
71  );
72 
75 returnValue print( const real_t* const M,
76  int nrow,
77  int ncol ,
78  const int* const ROW_idx,
79  const int* const COL_idx
80  );
81 
84 returnValue print( const real_t* const M,
85  int nrow,
86  int ncol,
87  const char* name
88  );
89 
92 returnValue print( const int* const index,
93  int n
94  );
95 
98 returnValue print( const int* const index,
99  int n,
100  const char* name
101  );
102 
103 
106 returnValue myPrintf( const char* s
107  );
108 
109 
113 
114 
120  int nrow,
121  int ncol,
122  const char* datafilename
123  );
124 
130  int n,
131  const char* datafilename
132  );
133 
138 returnValue readFromFile( int* data,
139  int n,
140  const char* datafilename
141  );
142 
143 
147 returnValue writeIntoFile( const real_t* const data,
148  int nrow,
149  int ncol,
150  const char* datafilename,
151  BooleanType append
152  );
153 
157 returnValue writeIntoFile( const real_t* const data,
158  int n,
159  const char* datafilename,
160  BooleanType append
161  );
162 
166 returnValue writeIntoFile( const int* const integer,
167  int n,
168  const char* datafilename,
169  BooleanType append
170  );
171 
172 
175 real_t getCPUtime( );
176 
177 
180 real_t getNorm( const real_t* const v,
181  int n
182  );
183 
184 
188 inline real_t getSign( real_t arg
189  );
190 
191 
194 inline int getMax( int x,
195  int y
196  );
197 
200 inline real_t getMax( real_t x,
201  real_t y
202  );
203 
204 
207 inline real_t getMin( real_t x,
208  real_t y
209  );
210 
212 void getKKTResidual( int nV,
213  int nC,
214  const real_t* const H,
215  const real_t* const g,
216  const real_t* const A,
217  const real_t* const lb,
218  const real_t* const ub,
219  const real_t* const lbA,
220  const real_t* const ubA,
221  const real_t* const x,
222  const real_t* const y,
223  real_t& stat,
224  real_t& feas,
225  real_t& cmpl
226  );
227 
228 
232  char* const string
234  );
235 
239  char* const string
241  );
242 
246  char* const string
248  );
249 
250 
251 #ifdef __DEBUG__
252 
253 extern "C" void gdb_printmat( const char *fname,
254  real_t *M,
255  int n,
256  int m,
257  int ldim
258  );
259 #endif /* __DEBUG__ */
260 
261 
263 
264 
265 #include <qpOASES/Utils.ipp>
266 
267 #endif /* QPOASES_UTILS_HPP */
268 
269 
270 /*
271  * end of file
272  */
int getMax(int x, int y)
returnValue convertPrintLevelToString(PrintLevel value, char *const string)
Allows to pass back messages to the calling function.
real_t getSign(real_t arg)
real_t getMin(real_t x, real_t y)
returnValue readFromFile(real_t *data, int nrow, int ncol, const char *datafilename)
returnValue myPrintf(const char *s)
returnValue convertSubjectToStatusToString(SubjectToStatus value, char *const string)
returnValue writeIntoFile(const real_t *const data, int nrow, int ncol, const char *datafilename, BooleanType append)
#define v
PrintLevel
returnValue convertBooleanTypeToString(BooleanType value, char *const string)
BEGIN_NAMESPACE_QPOASES returnValue print(const real_t *const v, int n)
double real_t
Definition: AD_test.c:10
void getKKTResidual(int nV, int nC, const real_t *const H, const real_t *const g, const real_t *const A, const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA, const real_t *const x, const real_t *const y, real_t &stat, real_t &feas, real_t &cmpl)


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