31 size_t * a,
size_t n,
size_t * b,
double * c );
37 int * a,
size_t n,
size_t * b,
size_t * c );
39 int * a,
size_t n,
size_t * b,
yac_int * c );
47 int (*compar)(
const void*,
const void*));
61 unsigned prev = array[0];
63 for (
size_t i = 1; i < N; ++i) {
65 if (array[i] == prev)
continue;
70 if (pos != i) array[pos] = array[i];
88 double prev = array[0];
90 for (
size_t i = 1; i < N; ++i) {
92 if (array[i] == prev)
continue;
97 if (pos != i) array[pos] = array[i];
115 size_t prev = array[0];
117 for (
size_t i = 1; i < N; ++i) {
119 if (array[i] == prev)
continue;
124 if (pos != i) array[pos] = array[i];
136 size_t (*array)[2],
size_t * n) {
143 size_t prev[2] = {array[0][0],
146 for (
size_t i = 1; i < N; ++i) {
148 if ((array[i][0] == prev[0]) &&
149 (array[i][1] == prev[1]))
continue;
151 prev[0] = array[i][0];
152 prev[1] = array[i][1];
156 array[pos][0] = array[i][0];
157 array[pos][1] = array[i][1];
170 size_t (*array)[3],
size_t * n) {
177 size_t prev[3] = {array[0][0],
181 for (
size_t i = 1; i < N; ++i) {
183 if ((array[i][0] == prev[0]) &&
184 (array[i][1] == prev[1]) &&
185 (array[i][2] == prev[2]))
continue;
187 prev[0] = array[i][0];
188 prev[1] = array[i][1];
189 prev[2] = array[i][2];
193 array[pos][0] = array[i][0];
194 array[pos][1] = array[i][1];
195 array[pos][2] = array[i][2];
217 for (
size_t i = 1; i < N; ++i) {
219 if (array[i] == prev)
continue;
224 if (pos != i) array[pos] = array[i];
232 fprintf(stderr, "### Assertion violation: %s in %s:%d\n",\
233 #c, __FILE__, __LINE__);\
237#define COPY_DATA(data, count) \
239 xmalloc((size_t)(count) * sizeof(*(data))), \
240 (data), (size_t)(count) * sizeof(*(data))))
void yac_mergesort(void *base, size_t num, size_t size, int(*compar)(const void *, const void *))
void yac_quicksort_index_yac_int_size_t(yac_int *a, size_t n, size_t *idx)
void yac_quicksort_index_size_t_size_t_double(size_t *a, size_t n, size_t *b, double *c)
void yac_quicksort_index_int_yac_int(int *a, size_t n, yac_int *idx)
static void yac_remove_duplicates_size_t_3(size_t(*array)[3], size_t *n)
void yac_quicksort_index_int_double(int *a, size_t n, double *idx)
void yac_quicksort_index_yac_int_yac_int_size_t(yac_int *a, size_t n, yac_int *b, size_t *c)
void yac_quicksort_index_size_t_yac_int(size_t *a, size_t n, yac_int *idx)
void yac_quicksort_index_size_t_void_p(size_t *a, size_t n, void **idx)
static void yac_remove_duplicates_uint(unsigned *array, size_t *n)
void yac_quicksort_index_yac_int_int(yac_int *a, size_t n, int *idx)
void yac_quicksort_index_int_size_t(int *a, size_t n, size_t *idx)
void yac_quicksort_index_int_size_t_size_t(int *a, size_t n, size_t *b, size_t *c)
static void yac_remove_duplicates_size_t(size_t *array, size_t *n)
void yac_quicksort_index_size_t_int(size_t *a, size_t n, int *idx)
void yac_quicksort_index_uint64_t_size_t(uint64_t *a, size_t n, size_t *idx)
static void yac_remove_duplicates_double(double *array, size_t *n)
void yac_quicksort_index_size_t_size_t(size_t *a, size_t n, size_t *idx)
void yac_quicksort_index(int *a, size_t n, int *idx)
void yac_quicksort_index_yac_int_yac_int(yac_int *a, size_t n, yac_int *idx)
void yac_quicksort_index_yac_int_uint64_t(yac_int *a, size_t n, uint64_t *idx)
void yac_quicksort_index_int_size_t_yac_int(int *a, size_t n, size_t *b, yac_int *c)
void yac_quicksort_index_yac_int_yac_int_double(yac_int *a, size_t n, yac_int *b, double *c)
static void yac_remove_duplicates_size_t_2(size_t(*array)[2], size_t *n)
static void yac_remove_duplicates_yac_int(yac_int *array, size_t *n)