DIPlib Documentation - ©1995-2013 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 type | Name | Description
`void *` | `data` | Data
`dip_int` | `size` | Size
`dip_Sort` | `algorithm` | Sort algorithm
`dip_DataType` | `dataType` | Data type. See DIPlib's data types

The `sortType` parameter is one of:

Name | Description
`DIP_SORT_DEFAULT` | Default sort algorithm
`DIP_SORT_QUICK_SORT` | Quick sort
`DIP_SORT_DISTRIBUTION_SORT` | Distribution sort
`DIP_SORT_INSERTION_SORT` | Insertion sort

## SEE ALSO

General information about sorting

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