2 * Implement Heap sort -- direct and indirect sorting
3 * Based on descriptions in Sedgewick "Algorithms in C"
5 * Copyright (C) 1999 Thomas Walter
7 * 18 February 2000: Modified for GSL by Brian Gough
9 * This is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 3, or (at your option) any
14 * This source is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 #include <gsl/gsl_errno.h>
22 #include <gsl/gsl_vector.h>
23 #include <gsl/gsl_sort.h>
24 #include <gsl/gsl_sort_vector.h>
26 #define BASE_LONG_DOUBLE
27 #include "templates_on.h"
28 #include "sortvec_source.c"
29 #include "templates_off.h"
30 #undef BASE_LONG_DOUBLE
33 #include "templates_on.h"
34 #include "sortvec_source.c"
35 #include "templates_off.h"
39 #include "templates_on.h"
40 #include "sortvec_source.c"
41 #include "templates_off.h"
45 #include "templates_on.h"
46 #include "sortvec_source.c"
47 #include "templates_off.h"
51 #include "templates_on.h"
52 #include "sortvec_source.c"
53 #include "templates_off.h"
57 #include "templates_on.h"
58 #include "sortvec_source.c"
59 #include "templates_off.h"
63 #include "templates_on.h"
64 #include "sortvec_source.c"
65 #include "templates_off.h"
69 #include "templates_on.h"
70 #include "sortvec_source.c"
71 #include "templates_off.h"
75 #include "templates_on.h"
76 #include "sortvec_source.c"
77 #include "templates_off.h"
81 #include "templates_on.h"
82 #include "sortvec_source.c"
83 #include "templates_off.h"
87 #include "templates_on.h"
88 #include "sortvec_source.c"
89 #include "templates_off.h"