71 for( i=0; i<TO->
n; ++i )
110 for( i=0; i<_THIS->
n; ++i )
129 if ( ( number < 0 ) || ( number >= _THIS->
n ) )
191 if ( ( number < 0 ) || ( number >= _THIS->
n ) )
212 if ( ( number < 0 ) || ( number >= _THIS->
n ) )
232 if ( ( number < 0 ) || ( number >= _THIS->
n ) )
236 switch (_THIS->
status[number])
254 if ( ( number1 < 0 ) || ( number1 >= _THIS->
n ) || ( number2 < 0 ) || ( number2 >= _THIS->
n ) )
276 if ( ( offset == 0 ) || ( _THIS->
n <= 1 ) )
279 if ( ( offset < 0 ) || ( offset > _THIS->
n/2 ) )
282 if ( ( _THIS->
n % offset ) != 0 )
287 for( i=0; i<_THIS->
n-offset; ++i )
294 for( i=0; i<_THIS->
n; ++i )
342 if ( ( offset == 0 ) || ( offset == _THIS->
n ) || ( _THIS->
n <= 1 ) )
345 if ( ( offset < 0 ) || ( offset > _THIS->
n ) )
350 for( i=0; i<offset; ++i )
356 for( i=0; i<_THIS->
n-offset; ++i )
362 for( i=_THIS->
n-offset; i<_THIS->n; ++i )
369 for( i=0; i<_THIS->
n; ++i )
406 #ifndef __SUPPRESSANYOUTPUT__ 413 int *FR_idx, *FX_idx;
421 snprintf( myPrintfString,
QPOASES_MAX_STRING_LENGTH,
"Bounds object comprising %d variables (%d free, %d fixed):\n",_THIS->
n,nFR,nFX );
446 for( i=0; i<_THIS->
n; ++i )
456 for( i=0; i<_THIS->
n; ++i )
466 for( i=0; i<_THIS->
n; ++i )
476 for( i=0; i<_THIS->
n; ++i )
499 if ( _THIS->
status[newnumber] == newstatus )
502 _THIS->
status[newnumber] = newstatus;
507 if ( indexlist != 0 )
531 if ( indexlist != 0 )
547 int number1,
int number2
559 if ( number1 == number2 )
565 if ( indexlist != 0 )
returnValue Bounds_print(Bounds *_THIS)
static Indexlist * Bounds_getFree(Bounds *_THIS)
SubjectToStatus status[NVMAX]
returnValue Bounds_shift(Bounds *_THIS, int offset)
BEGIN_NAMESPACE_QPOASES void BoundsCON(Bounds *_THIS, int _n)
returnValue Indexlist_removeNumber(Indexlist *_THIS, int removenumber)
returnValue Bounds_swapFree(Bounds *_THIS, int number1, int number2)
returnValue Bounds_rotate(Bounds *_THIS, int offset)
static SubjectToStatus Bounds_getStatus(Bounds *_THIS, int i)
Allows to pass back messages to the calling function.
#define THROWERROR(retval)
returnValue Bounds_swapIndex(Bounds *_THIS, Indexlist *const indexlist, int number1, int number2)
returnValue Bounds_setupAllLower(Bounds *_THIS)
returnValue Bounds_setupAllUpper(Bounds *_THIS)
returnValue Bounds_setupAllFree(Bounds *_THIS)
returnValue Bounds_addIndex(Bounds *_THIS, Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
static returnValue Bounds_setType(Bounds *_THIS, int i, SubjectToType value)
returnValue Bounds_setupAll(Bounds *_THIS, SubjectToStatus _status)
returnValue Indexlist_swapNumbers(Indexlist *_THIS, int number1, int number2)
returnValue Indexlist_addNumber(Indexlist *_THIS, int addnumber)
static int Bounds_getNFX(Bounds *_THIS)
returnValue Bounds_moveFreeToFixed(Bounds *_THIS, int number, SubjectToStatus _status)
void BoundsCPY(Bounds *FROM, Bounds *TO)
returnValue Bounds_removeIndex(Bounds *_THIS, Indexlist *const indexlist, int removenumber)
returnValue qpOASES_myPrintf(const char *s)
returnValue Indexlist_init(Indexlist *_THIS, int n)
static int Bounds_getNFR(Bounds *_THIS)
returnValue Bounds_init(Bounds *_THIS, int _n)
#define END_NAMESPACE_QPOASES
void IndexlistCPY(Indexlist *FROM, Indexlist *TO)
Stores and manages index lists.
#define THROWWARNING(retval)
returnValue qpOASES_printNI(const int *const _index, int n, const char *name)
returnValue Indexlist_getNumberArray(Indexlist *_THIS, int **const numberarray)
returnValue Bounds_moveFixedToFree(Bounds *_THIS, int number)
#define QPOASES_MAX_STRING_LENGTH
SubjectToType type[NVMAX]
returnValue Bounds_flipFixed(Bounds *_THIS, int number)
Manages working sets of bounds (= box constraints).
#define BEGIN_NAMESPACE_QPOASES
static SubjectToType Bounds_getType(Bounds *_THIS, int i)
static returnValue Bounds_setStatus(Bounds *_THIS, int i, SubjectToStatus value)
static Indexlist * Bounds_getFixed(Bounds *_THIS)
#define REFER_NAMESPACE_QPOASES
returnValue Bounds_setupBound(Bounds *_THIS, int number, SubjectToStatus _status)