DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

Sort

Sort a block of data

SYNOPSIS

#include "dip_sort.h"

dip_Error dip_Sort ( data, size, algorithm, dataType )

FUNCTION

Sorts a block of data (of size size and data type dataType ) using the algorithm specified by algorithm.

ARGUMENTS

Data typeNameDescription
void *dataData
dip_intsizeSize
dip_SortalgorithmSort algorithm
dip_DataTypedataTypeData type. See DIPlib's data types

The sortType parameter is one of:

NameDescription
DIP_SORT_DEFAULTDefault sort algorithm
DIP_SORT_QUICK_SORTQuick sort
DIP_SORT_DISTRIBUTION_SORTDistribution sort
DIP_SORT_INSERTION_SORTInsertion sort

SEE ALSO

General information about sorting

DistributionSort, InsertionSort, QuickSort, ImageSort, SortIndices, SortIndices16, ImageSortIndices