58 INTEGER,
PARAMETER :: ELEMENT_NOT_FOUND = -1
59 CHARACTER(CHRLEN),
PARAMETER,
PRIVATE :: &
60 RCSIdentString =
'$RCSfile: ModSortSearch.F90,v $ $Revision: 1.18 $'
110 INTEGER,
INTENT(IN) ::
n,
v
111 INTEGER,
INTENT(IN) ::
a(
n)
112 INTEGER,
INTENT(OUT) ::
i
113 INTEGER,
INTENT(INOUT),
OPTIONAL ::
j
131 IF (
v <
a(im) )
THEN
133 ELSE IF (
v >
a(im) )
THEN
138 IF ( present(
j) .EQV. .true. )
THEN
146 i = element_not_found
148 IF ( present(
j) .EQV. .true. )
THEN
200 INTEGER,
INTENT(IN) ::
i,na,
v
201 INTEGER,
INTENT(INOUT) ::
a(na)
214 IF (
a(
i) /=
v )
THEN
273 INTEGER,
INTENT(IN) :: na,nb,ncmax
274 INTEGER,
INTENT(OUT) :: nc,errorflag
275 INTEGER,
INTENT(IN) ::
a(na),
b(nb)
276 INTEGER,
INTENT(OUT) ::
c(ncmax)
298 IF (
b(1) ==
a(ia) )
THEN
299 iloc = element_not_found + 1
301 iloc = element_not_found
305 IF ( iloc /= element_not_found )
THEN
308 IF ( nc > ncmax )
THEN
309 errorflag = err_none - 1
368 INTEGER,
INTENT(IN) :: na,nb,nm
369 INTEGER,
INTENT(IN) ::
a(na),
b(nb)
372 INTEGER,
INTENT(OUT) :: im
373 INTEGER,
INTENT(OUT) ::
m(nm)
379 INTEGER ::
i,ia,ib,na2,nb2,tbi
380 INTEGER :: a2(na),b2(nb)
405 IF ( ia <= na2 .AND. ib <= nb2 )
THEN
406 IF ( a2(ia) > b2(ib) )
THEN
419 IF ( tbi /=
m(im) )
THEN
424 CALL
errorstop(global,err_merge_sorted,__line__)
436 IF ( ia <= na2 )
THEN
438 IF ( a2(
i) /=
m(im) )
THEN
445 IF ( b2(
i) /=
m(im) )
THEN
489 INTEGER,
INTENT(IN) ::
n
490 INTEGER,
INTENT(INOUT) ::
a(
n)
494 INTEGER ::
i,
j,
k, l,
r,
s, stackl(50), stackr(50)
609 INTEGER,
INTENT(IN) ::
n
610 INTEGER,
INTENT(INOUT) ::
a(
n),
b(
n)
614 INTEGER ::
i,
j,
k, l,
r,
s, stackl(50), stackr(50)
729 INTEGER,
INTENT(IN) ::
n
730 REAL(KIND=RFREAL),
INTENT(INOUT) ::
a(
n)
734 INTEGER ::
i,
j,
k, l,
r,
s, stackl(50), stackr(50)
735 REAL(KIND=RFREAL) :: w,
x
847 INTEGER,
INTENT(IN) ::
n
848 INTEGER,
INTENT(INOUT) ::
b(
n)
849 REAL(KIND=RFREAL),
INTENT(INOUT) ::
a(
n)
853 INTEGER ::
i,
j,
k, l,
r,
s, stackl(50), stackr(50),
v
854 REAL(KIND=RFREAL) :: w,
x
973 INTEGER,
INTENT(IN) :: na
974 INTEGER,
INTENT(IN) :: nb
975 INTEGER,
INTENT(OUT) :: nb2
976 INTEGER,
INTENT(IN) ::
a(na)
977 INTEGER,
INTENT(INOUT) ::
b(nb)
983 INTEGER :: ia,ib2,iloc
994 IF ( iloc /= element_not_found )
THEN
1051 INTEGER,
INTENT(IN) :: na,nb,ncmax
1052 INTEGER,
INTENT(OUT) :: errorflag,na2,nb2,nc
1053 INTEGER,
INTENT(INOUT) ::
a(na),
b(nb)
1054 INTEGER,
INTENT(OUT) ::
c(ncmax)
1060 INTEGER :: ia,ib2,iloc
1066 errorflag = err_none
1078 IF (
b(1) ==
a(ia) )
THEN
1079 iloc = element_not_found + 1
1081 iloc = element_not_found
1085 IF ( iloc /= element_not_found )
THEN
1088 IF ( nc > ncmax )
THEN
1089 errorflag = err_none - 1
1101 IF ( ia > na2 )
THEN
1143 INTEGER,
INTENT(IN) :: iloc
1144 INTEGER,
INTENT(INOUT) :: na
1145 INTEGER,
INTENT(INOUT) ::
a(:)
1161 a(na) = crazy_value_int
1209 INTEGER,
INTENT(IN) :: na
1210 INTEGER,
INTENT(INOUT) ::
a(na)
1211 INTEGER,
INTENT(OUT) :: nb
1230 IF (
a(ia) /=
a(ia-1) )
THEN
subroutine findcommonsortedintegers(a, na, b, nb, c, ncMax, nc, errorFlag)
subroutine removeinteger(a, na, iLoc)
subroutine cyclelist(a, na, i, v)
subroutine simplifysortedintegers(a, na, nb)
subroutine quicksortinteger(a, n)
subroutine binarysearchinteger(a, n, v, i, j)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
subroutine removecommonsortedintegersfancy(a, na, na2, b, nb, nb2, c, ncMax, nc, errorFlag)
subroutine quicksortintegerinteger(a, b, n)
subroutine quicksortrfreal(a, n)
subroutine quicksortrfrealinteger(a, b, n)
subroutine removecommonsortedintegers(a, na, b, nb, nb2)
subroutine mergesortedintegers(global, na, nb, a, b, nm, im, m)
subroutine errorstop(global, errorCode, errorLine, addMessage)