merge sort declaration
More...
#include <stdlib.h>
#include <xt/sort_common.h>
Go to the source code of this file.
|
void | xt_mergesort_int (int a[], size_t n) |
|
void | xt_mergesort_xt_int (Xt_int a[], size_t n) |
|
void | xt_mergesort_idxpos (idxpos_type *v, size_t n) |
|
void | xt_mergesort_index (Xt_int *a, int n, int *idx, int reset_index) |
|
void | xt_mergesort_xt_int_permutation (Xt_int *a, size_t n, int *permutation) |
|
void | xt_mergesort_int_permutation (int *a, size_t n, int *permutation) |
|
◆ xt_mergesort_idxpos()
mergesort changing structured values
- Parameters
-
[in,out] | v | data to be sorted |
[in] | n | number of elements in v |
◆ xt_mergesort_index()
void xt_mergesort_index |
( |
Xt_int * | a, |
|
|
int | n, |
|
|
int * | idx, |
|
|
int | reset_index ) |
mergesort changing values and indices
- Parameters
-
[in,out] | a | data to be sorted |
[in] | n | length of data |
[in,out] | idx | old index of sorted returned a |
[in] | reset_index | override given idx by identity idx |
◆ xt_mergesort_int()
void xt_mergesort_int |
( |
int | a[], |
|
|
size_t | n ) |
mergesort changing structured values
- Parameters
-
[in,out] | a | array of ints to be sorted |
[in] | n | length of data |
◆ xt_mergesort_int_permutation()
void xt_mergesort_int_permutation |
( |
int * | a, |
|
|
size_t | n, |
|
|
int * | permutation ) |
mergesort changing values and indices
- Parameters
-
[in,out] | a | array to be sorted |
[in] | n | number of elements in a and idx |
[in,out] | permutation | contents permuted exactly as a and used to resolve ordering if two elements of a have the same value |
◆ xt_mergesort_xt_int()
void xt_mergesort_xt_int |
( |
Xt_int | a[], |
|
|
size_t | n ) |
mergesort changing structured values
- Parameters
-
[in,out] | a | array of ints to be sorted |
[in] | n | length of data |
- Examples
- test_idxlist_utils.c.
◆ xt_mergesort_xt_int_permutation()
void xt_mergesort_xt_int_permutation |
( |
Xt_int * | a, |
|
|
size_t | n, |
|
|
int * | permutation ) |
mergesort changing values and indices
- Parameters
-
[in,out] | a | array to be sorted |
[in] | n | number of elements in a and idx |
[in,out] | permutation | contents permuted exactly as a and used to resolve ordering if two elements of a have the same value |