## Documentation for module cp_array_sort

Routine for sorting an array

source: cp_array_sort.F

#### public Subroutines/Functions:

SUBROUTINE
cp_1d_i4_sort (arr, n, indices)
Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.
SUBROUTINE
cp_1d_i8_sort (arr, n, indices)
Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.
SUBROUTINE
cp_1d_r_sort (arr, n, indices)
Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.
SUBROUTINE
cp_1d_s_sort (arr, n, indices)
Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.

#### SUBROUTINEcp_1d_i4_sort(arr, n, indices)^

Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.

##### Arguments:
 INTEGER(int_4), INTENT(inout) :: arr(1:n) the array to sort INTEGER, INTENT(in) :: n length of array INTEGER, INTENT(out) :: indices(1:n) returns elements-indices before the sort

#### SUBROUTINEcp_1d_i8_sort(arr, n, indices)^

Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.

##### Arguments:
 INTEGER(int_8), INTENT(inout) :: arr(1:n) the array to sort INTEGER, INTENT(in) :: n length of array INTEGER, INTENT(out) :: indices(1:n) returns elements-indices before the sort

#### SUBROUTINEcp_1d_r_sort(arr, n, indices)^

Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.

##### Arguments:
 REAL(dp), INTENT(inout) :: arr(1:n) the array to sort INTEGER, INTENT(in) :: n length of array INTEGER, INTENT(out) :: indices(1:n) returns elements-indices before the sort

#### SUBROUTINEcp_1d_s_sort(arr, n, indices)^

Sorts an array inplace using a combination of merge- and bubble-sort. It also returns the indices, which the elements had before the sort.

##### Arguments:
 REAL(sp), INTENT(inout) :: arr(1:n) the array to sort INTEGER, INTENT(in) :: n length of array INTEGER, INTENT(out) :: indices(1:n) returns elements-indices before the sort