9 namespace admb_deprecated {
31 int l=1,jstack=0,j,ir,iq,i;
44 for (i=j-1;i>0 && arr[i]>a;i--) arr[i+1]=arr[i];
60 iq=l+((ir-l+1)*fx)/FM;
65 while (j > 0 && a < arr[j]) j--;
72 while (i <= n && a > arr[i] ) i++;
93 cerr <<
"Need to increase the stack in sort(const ivector&)\n";
122 cerr <<
" Incompatible array sizes in vector v and ivector index\n"
123 <<
" in ivector sort(const ivector& v, const ivector& index)\n";
134 int l=1,jstack=0,j,ir,iq,i;
146 for (j=l+1;j<=ir;j++)
175 iq=l+((ir-l+1)*fx)/FM;
182 while (j > 0 && a < arr[j]) j--;
191 while (i <= n && a > arr[i]) i++;
203 istack[++jstack]=i+1;
209 istack[++jstack]=i-1;
214 cerr <<
"Need to increase the stack in sort(const ivector&)\n";
dvector sort(const dvector &v, int NSTACK)
Quicksort.
unsigned int size() const
void fill_seqadd(int, int)
Fills ivector elements with values starting from base and incremented by offset.
Array of integers(int) with indexes from index_min to indexmax.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
ivector & shift(int min)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.