114 INTEGER(INTG),
INTENT(INOUT) :: A(:)
115 INTEGER(INTG),
INTENT(OUT) :: IND(:)
116 INTEGER(INTG),
INTENT(OUT) :: ERR
119 INTEGER(INTG) :: FLAG,i,j,k,
VALUE,IVALUE
121 enters(
"BUBBLE_ISORT_INTG",err,error,*999)
123 IF(
SIZE(ind,1)==
SIZE(a,1))
THEN 131 IF(i==1) ind(j+1)=j+1
146 CALL flagerror(
"Size of input vectors does not match",err,error,*999)
149 exits(
"BUBBLE_ISORT_INTG")
151 999 errorsexits(
"BUBBLE_ISORT_INTG",err,error)
167 REAL(SP),
INTENT(INOUT) :: A(:)
168 INTEGER(INTG),
INTENT(OUT) :: IND(:)
169 INTEGER(INTG),
INTENT(OUT) :: ERR
172 INTEGER(INTG) :: FLAG,i,j,k,IVALUE
175 enters(
"BUBBLE_ISORT_SP",err,error,*999)
177 IF(
SIZE(ind,1)==
SIZE(a,1))
THEN 185 IF(i==1) ind(j+1)=j+1
200 CALL flagerror(
"Size of input vectors does not match",err,error,*999)
203 exits(
"BUBBLE_ISORT_SP")
205 999 errorsexits(
"BUBBLE_ISORT_SP",err,error)
221 REAL(DP),
INTENT(INOUT) :: A(:)
222 INTEGER(INTG),
INTENT(OUT) :: IND(:)
223 INTEGER(INTG),
INTENT(OUT) :: ERR
226 INTEGER(INTG) :: FLAG,i,j,k,IVALUE
229 enters(
"BUBBLE_ISORT_DP",err,error,*999)
231 IF(
SIZE(ind,1)==
SIZE(a,1))
THEN 239 IF(i==1) ind(j+1)=j+1
254 CALL flagerror(
"Size of input vectors does not match",err,error,*999)
257 exits(
"BUBBLE_ISORT_DP")
259 999 errorsexits(
"BUBBLE_ISORT_DP",err,error)
284 INTEGER(INTG),
INTENT(INOUT) :: A(:)
285 INTEGER(INTG),
INTENT(OUT) :: ERR
288 INTEGER(INTG) :: FLAG,i,j,k,VALUE
290 enters(
"BUBBLE_SORT_INTG",err,error,*999)
309 exits(
"BUBBLE_SORT_INTG")
311 999 errorsexits(
"BUBBLE_SORT_INTG",err,error)
327 REAL(SP),
INTENT(INOUT) :: A(:)
328 INTEGER(INTG),
INTENT(OUT) :: ERR
331 INTEGER(INTG) :: FLAG,i,j,k
334 enters(
"BUBBLE_SORT_SP",err,error,*999)
353 exits(
"BUBBLE_SORT_SP")
355 999 errorsexits(
"BUBBLE_SORT_SP",err,error)
371 REAL(DP),
INTENT(INOUT) :: A(:)
372 INTEGER(INTG),
INTENT(OUT) :: ERR
375 INTEGER(INTG) :: FLAG,i,j,k
378 enters(
"BUBBLE_SORT_DP",err,error,*999)
397 exits(
"BUBBLE_SORT_DP")
399 999 errorsexits(
"BUBBLE_SORT_DP",err,error)
424 INTEGER(INTG),
INTENT(INOUT) :: A(:)
425 INTEGER(INTG),
INTENT(OUT) :: ERR
428 INTEGER(INTG) :: I,IVALUE,J,L,VALUE
430 enters(
"HEAP_SORT_INTG",err,error,*999)
452 IF(a(j)<a(j+1)) j=j+1
466 exits(
"HEAP_SORT_INTG")
468 999 errorsexits(
"HEAP_SORT_INTG",err,error)
484 REAL(SP),
INTENT(INOUT) :: A(:)
485 INTEGER(INTG),
INTENT(OUT) :: ERR
488 INTEGER(INTG) :: I,IVALUE,J,L
491 enters(
"HEAP_SORT_SP",err,error,*999)
513 IF(a(j)<a(j+1)) j=j+1
527 exits(
"HEAP_SORT_SP")
529 999 errorsexits(
"HEAP_SORT_SP",err,error)
545 REAL(DP),
INTENT(INOUT) :: A(:)
546 INTEGER(INTG),
INTENT(OUT) :: ERR
549 INTEGER(INTG) :: I,IVALUE,J,L
552 enters(
"HEAP_SORT_DP",err,error,*999)
574 IF(a(j)<a(j+1)) j=j+1
588 exits(
"HEAP_SORT_DP")
590 999 errorsexits(
"HEAP_SORT_DP",err,error)
615 INTEGER(INTG),
INTENT(INOUT) :: A(:)
616 INTEGER(INTG),
INTENT(OUT) :: ERR
619 INTEGER(INTG) :: I,INC,J,VALUE
621 enters(
"SHELL_SORT_INTG",err,error,*999)
624 DO WHILE(inc<=
SIZE(a,1))
632 DO WHILE(a(j-inc)>
VALUE)
641 exits(
"SHELL_SORT_INTG")
643 999 errorsexits(
"SHELL_SORT_INTG",err,error)
659 REAL(SP),
INTENT(INOUT) :: A(:)
660 INTEGER(INTG),
INTENT(OUT) :: ERR
663 INTEGER(INTG) :: I,INC,J
666 enters(
"SHELL_SORT_SP",err,error,*999)
669 DO WHILE(inc<=
SIZE(a,1))
677 DO WHILE(a(j-inc)>
VALUE)
686 exits(
"SHELL_SORT_SP")
688 999 errorsexits(
"SHELL_SORT_SP",err,error)
704 REAL(DP),
INTENT(INOUT) :: A(:)
705 INTEGER(INTG),
INTENT(OUT) :: ERR
708 INTEGER(INTG) :: I,INC,J
711 enters(
"SHELL_SORT_DP",err,error,*999)
714 DO WHILE(inc<=
SIZE(a,1))
722 DO WHILE(a(j-inc)>
VALUE)
731 exits(
"SHELL_SORT_DP")
733 999 errorsexits(
"SHELL_SORT_DP",err,error)
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
subroutine heap_sort_intg(A, ERR, ERROR,)
subroutine shell_sort_sp(A, ERR, ERROR,)
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
This module contains all program wide constants.
subroutine bubble_sort_intg(A, ERR, ERROR,)
subroutine shell_sort_intg(A, ERR, ERROR,)
subroutine bubble_isort_dp(A, IND, ERR, ERROR,)
subroutine, public exits(NAME)
Records the exit out of the named procedure.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
subroutine heap_sort_sp(A, ERR, ERROR,)
subroutine bubble_sort_dp(A, ERR, ERROR,)
subroutine bubble_isort_sp(A, IND, ERR, ERROR,)
subroutine bubble_sort_sp(A, ERR, ERROR,)
This module contains all procedures for sorting. NOTE: THE ROUTINES IN THIS MODULE HAVE NOT BEEN TEST...
subroutine heap_sort_dp(A, ERR, ERROR,)
subroutine bubble_isort_intg(A, IND, ERR, ERROR,)
Flags an error condition.
subroutine shell_sort_dp(A, ERR, ERROR,)
This module contains all kind definitions.