19 #define double_lt(a,b) ((*a)<(*b))
28 #define double_lt(a,b) ((*a)<(*b))
43 unsigned int size = v.
size();
45 double* doublearray =
new double[size];
46 for (
unsigned int i = 0; i < size; ++i)
48 doublearray[i] = v(lb);
58 for(
unsigned int i = 0; i < size; ++i)
60 arr(lb) = doublearray[i];
64 delete [] doublearray;
84 cerr <<
" Incompatible array sizes in vector v and ivector index\n"
85 <<
" in ivector sort(const ivector& v, const ivector& index)\n";
89 unsigned int size = v.
size();
90 double* doublearray =
new double[size];
91 for (
unsigned int i = 0; i < size; ++i)
93 doublearray[i] = v(lb);
97 int* intarray =
new int[size];
98 for (
unsigned int i = 0; i < size; ++i)
110 for (
unsigned int i = 0; i < size; ++i)
112 arr(lb) = doublearray[i];
116 for (
unsigned int i = 0; i < size; ++i)
118 index(lb) = intarray[i];
122 delete[] doublearray;
unsigned int size() const
#define QSORT2(QSORT_TYPE, QSORT_TYPE2, QSORT_BASE, QSORT_BASE2, QSORT_NELT, QSORT_LT)
void double_qsort(double *arr, unsigned n)
A subroutine used in Quicksort.
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
dmatrix sort(const dmatrix &m, int column, int NSTACK)
Description not yet available.
Array of integers(int) with indexes from index_min to indexmax.
#define QSORT(QSORT_TYPE, QSORT_BASE, QSORT_NELT, QSORT_LT)
int indexmax() const
Get maximum valid index.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
unsigned int size() const
Get number of elements in array.
void double_qsort2(double *arr, int *arr2, unsigned n)
A subroutine used in Quicksort.