48 integer,
intent(in) :: n
49 integer,
intent(inout) :: list(n)
50 integer,
intent(inout) :: order(n)
72 integer,
intent(in) :: n
74 integer,
intent(inout) :: order(n)
96 integer,
intent(in) :: n
97 integer,
intent(in) :: left_end
98 integer,
intent(in) :: right_end
99 integer,
intent(inout) :: list(n)
100 integer,
intent(inout) :: order(n)
103 integer,
parameter :: max_simple_sort_size = 6
105 integer :: reference,temp
107 if (right_end<left_end+max_simple_sort_size)
then
112 reference = list((left_end+right_end)/2)
119 if (list(i)>=reference)
exit
124 if (list(j)<=reference)
exit
143 if (left_end<j)
call quick_sort(n,left_end,j,list,order)
144 if (i<right_end)
call quick_sort(n,i,right_end,list,order)
158 integer,
intent(in) :: n
159 integer,
intent(in) :: left_end
160 integer,
intent(in) :: right_end
162 integer,
intent(inout) :: order(n)
165 integer,
parameter :: max_simple_sort_size = 6
169 if (right_end<left_end+max_simple_sort_size)
then
174 reference = list((left_end+right_end)/2)
181 if (.not.
inf(list(i),reference))
exit
186 if (.not.
sup(list(j),reference))
exit
205 if (left_end<j)
call quick_sort(n,left_end,j,list,order)
206 if (i<right_end)
call quick_sort(n,i,right_end,list,order)
220 integer,
intent(in) :: n
221 integer,
intent(in) :: left_end
222 integer,
intent(in) :: right_end
223 integer,
intent(inout) :: list(n)
224 integer,
intent(inout) :: order(n)
230 do i=left_end,right_end-1
232 if (list(i)>list(j))
then
254 integer,
intent(in) :: n
255 integer,
intent(in) :: left_end
256 integer,
intent(in) :: right_end
257 real(kind_real),
intent(inout) :: list(n)
258 integer,
intent(inout) :: order(n)
262 real(kind_real) :: temp
264 do i=left_end,right_end-1
266 if (
sup(list(i),list(j)))
then