Yet Another eXchange Tool 0.11.2
Loading...
Searching...
No Matches
mergesort.h File Reference

merge sort declaration More...

#include <stdlib.h>
#include <xt/sort_common.h>
Include dependency graph for mergesort.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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)
 

Detailed Description

merge sort declaration

Author
Jörg Behrens behre.nosp@m.ns@d.nosp@m.krz.d.nosp@m.e Moritz Hanke hanke.nosp@m.@dkr.nosp@m.z.de Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Definition in file mergesort.h.

Function Documentation

◆ xt_mergesort_idxpos()

void xt_mergesort_idxpos ( idxpos_type * v,
size_t n )

mergesort changing structured values

Parameters
[in,out]vdata to be sorted
[in]nnumber 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]adata to be sorted
[in]nlength of data
[in,out]idxold index of sorted returned a
[in]reset_indexoverride given idx by identity idx

◆ xt_mergesort_int()

void xt_mergesort_int ( int a[],
size_t n )

mergesort changing structured values

Parameters
[in,out]aarray of ints to be sorted
[in]nlength 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]aarray to be sorted
[in]nnumber of elements in a and idx
[in,out]permutationcontents 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]aarray of ints to be sorted
[in]nlength 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]aarray to be sorted
[in]nnumber of elements in a and idx
[in,out]permutationcontents permuted exactly as a and used to resolve ordering if two elements of a have the same value