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;
63 iq=l+((ir-l+1.0)*fx)/FM;
69 while (j > 0 && a < arr[j]) j--;
76 while (i <= n && a > arr[i] ) i++;
97 cerr <<
"Need to increase the stack in sort(const dvector&)\n";
126 cerr <<
" Incompatible array sizes in vector v and ivector index\n"
127 <<
" in dvector sort(const dvector& v, const ivector& index)\n";
138 int l=1,jstack=0,j,ir,iq,i;
150 for (j=l+1;j<=ir;j++)
179 iq=l+((ir-l+1)*fx)/FM;
182 iq=l+((ir-l+1.0)*fx)/FM;
190 while (j > 0 && a < arr[j]) j--;
199 while (i <= n && a > arr[i]) i++;
211 istack[++jstack]=i+1;
217 istack[++jstack]=i-1;
222 cerr <<
"Need to increase the stack in sort(const dvector&)\n";
dvector sort(const dvector &v, int NSTACK)
Quicksort.
unsigned int size() const
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
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.
int indexmax() const
Get maximum valid index.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
dvector & shift(int min)
Shift valid range of subscripts.
unsigned int size() const
Get number of elements in array.
ivector & shift(int min)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.