pic_sorting_sort Submodule

This submodule implements the overloaded sorting subroutine SORT that can be used to sort four kinds of INTEGER arrays and three kinds of REAL arrays. Sorting is in order of increasing value, with the worst case run time performance of O(N Ln(N)).

SORT uses the INTROSORT sorting algorithm of David Musser, http://www.cs.rpi.edu/~musser/gp/introsort.ps. introsort is a hybrid unstable comparison algorithm combining quicksort, insertion sort, and heap sort. While this algorithm is always O(N Ln(N)) it is relatively fast on randomly ordered data, but inconsistent in performance on partly sorted data, sometimes having merge sort performance, sometimes having better than quicksort performance.


Uses

  • module~~pic_sorting_sort~~UsesGraph module~pic_sorting_sort pic_sorting_sort module~pic_sorting pic_sorting module~pic_sorting_sort->module~pic_sorting module~pic_optional_value pic_optional_value module~pic_sorting->module~pic_optional_value module~pic_types pic_types module~pic_sorting->module~pic_types module~pic_optional_value->module~pic_types iso_c_binding iso_c_binding module~pic_types->iso_c_binding iso_fortran_env iso_fortran_env module~pic_types->iso_fortran_env

Subroutines

pure subroutine char_decrease_sort(array)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: array(0:)

pure subroutine char_increase_sort(array)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: array(0:)

pure subroutine dp_decrease_sort(array)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: array(0:)

pure subroutine dp_increase_sort(array)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: array(0:)

pure subroutine int32_decrease_sort(array)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout) :: array(0:)

pure subroutine int32_increase_sort(array)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout) :: array(0:)

pure subroutine int64_decrease_sort(array)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(inout) :: array(0:)

pure subroutine int64_increase_sort(array)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(inout) :: array(0:)

pure subroutine sp_decrease_sort(array)

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(inout) :: array(0:)

pure subroutine sp_increase_sort(array)

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(inout) :: array(0:)

Module Subroutines

pure module subroutine char_sort(array, reverse)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: array(0:)
logical, intent(in), optional :: reverse

pure module subroutine dp_sort(array, reverse)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: array(0:)
logical, intent(in), optional :: reverse

pure module subroutine int32_sort(array, reverse)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout) :: array(0:)
logical, intent(in), optional :: reverse

pure module subroutine int64_sort(array, reverse)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(inout) :: array(0:)
logical, intent(in), optional :: reverse

pure module subroutine sp_sort(array, reverse)

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(inout) :: array(0:)
logical, intent(in), optional :: reverse