class that encapsulates the quicksort algorithm
main subroutine of the quick sort algorithm.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(quicksort), | intent(inout) | :: | my_sort |
A quicksort object |
||
real(kind=wp), | intent(inout), | dimension (:) | :: | list |
A real vector with the values to be sorted. |
|
integer, | intent(inout), | dimension (:) | :: | order |
An integer vector with the positions of the ordered samples. quick sort routine from: brainerd, w.s., goldberg, c.h. & adams, j.c. (1990) "programmer's guide to fortran 90", mcgraw-hill isbn 0-07-000248-7, pages 149-150. modified by alan miller to include an associated integer array which gives the positions of the elements in the original order. |
type, extends(sort_base) :: quicksort !! class that encapsulates the quicksort algorithm contains procedure, pass :: sort => quick_sort end type quicksort