Go to the documentation of this file.
25 #include <sys/types.h>
48 cout <<
"Vector before sort: " << v << endl;
50 cout <<
"Index array after sort: " << i << endl;
51 cout <<
"Sorted Vector: ";
52 for (
Index j = 0; j < v.
nelem(); j++) cout <<
" " << setw(3) << v[i[j]];
73 cout <<
"Array before sort: " << a << endl;
75 cout <<
"Index array after sort: " << i << endl;
76 cout <<
"Sorted Array: ";
77 for (
Index j = 0; j < a.nelem(); j++) cout <<
" " << setw(3) << a[i[j]];
81 void profileVector(
Index n) {
82 cout <<
"Creating Vector with random numbers" << endl;
84 srandom((
unsigned int)
time(NULL));
88 cout <<
"Now sorting" << endl;
99 cerr <<
"This test is only available when compiled with POSIX support."
Implementation of Matrix, Vector, and such stuff.
This can be used to make arrays out of anything.
void get_sorted_indexes(ArrayOfIndex &sorted, const T &data)
get_sorted_indexes
Index nelem() const
Returns the number of elements.
NUMERIC Numeric
The type to use for all floating point numbers.
Time time(Workspace &ws) noexcept
INDEX Index
The type to use for all integer numbers and indices.
Contains sorting routines.
The global header file for ARTS.