75 for( i=0; i<TO->physicallength; ++i )
107 if (numberarray == 0)
110 *numberarray = _THIS->
number;
120 *iSortArray = _THIS->
iSort;
132 return _THIS->
number[_THIS->
iSort[myIndex]] == givennumber ? _THIS->
iSort[myIndex] : -1;
148 for (i = _THIS->
length; i > j+1; i--)
164 int iSidx = _THIS->
iSort[idx];
167 if ( _THIS->
number[iSidx] != removenumber )
171 for (i = 0; i < _THIS->
length; i++)
172 if (_THIS->
iSort[i] > iSidx) _THIS->
iSort[i]--;
173 for (i = idx+1; i < _THIS->
length; i++)
177 for( i=iSidx; i<_THIS->length-1; ++i )
197 if ( ( _THIS->
number[_THIS->
iSort[index1]] != number1 ) || ( _THIS->
number[_THIS->
iSort[index2]] != number2 ) )
205 tmp = _THIS->
iSort[index1];
207 _THIS->
iSort[index2] = tmp;
221 int fst = 0, lst = _THIS->
length-1, mid;
224 if (_THIS->
length == 0 || i < _THIS->number[_THIS->
iSort[0]])
return -1;
228 while (fst < lst - 1)
230 mid = (fst + lst) / 2;
231 if (i >= _THIS->
number[_THIS->
iSort[mid]]) fst = mid;
int Indexlist_getIndex(Indexlist *_THIS, int givennumber)
returnValue Indexlist_getISortArray(Indexlist *_THIS, int **const iSortArray)
Allows to pass back messages to the calling function.
#define THROWERROR(retval)
returnValue Indexlist_addNumber(Indexlist *_THIS, int addnumber)
void IndexlistCPY(Indexlist *FROM, Indexlist *TO)
returnValue Indexlist_removeNumber(Indexlist *_THIS, int removenumber)
returnValue Indexlist_getNumberArray(Indexlist *_THIS, int **const numberarray)
returnValue Indexlist_init(Indexlist *_THIS, int n)
BEGIN_NAMESPACE_QPOASES void IndexlistCON(Indexlist *_THIS, int n)
#define END_NAMESPACE_QPOASES
int Indexlist_findInsert(Indexlist *_THIS, int i)
returnValue Indexlist_swapNumbers(Indexlist *_THIS, int number1, int number2)
int number[INDEXLISTFACTOR *(NVMAX+NCMAX)]
Stores and manages index lists.
#define BEGIN_NAMESPACE_QPOASES