Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(inout), | DIMENSION(:) | :: | Alphas | ||
integer, | intent(inout), | DIMENSION(:) | :: | iAlphas |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
RECURSIVE SUBROUTINE QsortC(Alphas,iAlphas)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN March 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Make sort order for an Alpha Array but store the pointers in an
! accompanying integer array which must be filled prior to the first call
! as this routine is recursive and called from within.
! METHODOLOGY EMPLOYED:
! recursion and quick-sort methodology
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(INOUT),DIMENSION(:) :: Alphas ! Alphas to be sorted
INTEGER, INTENT(INOUT),DIMENSION(:) :: iAlphas ! Pointers -- this is the array that is actually sorted
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
integer :: iq
if(size(Alphas) > 1) then
call QsortPartition(Alphas,iAlphas,iq)
call QsortC(Alphas(:iq-1),iAlphas(:iq-1))
call QsortC(Alphas(iq:),iAlphas(iq:))
endif
RETURN
END SUBROUTINE QsortC