mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
heap sort
This commit is contained in:
parent
e0812d4b41
commit
73ce5610b3
@ -51,7 +51,7 @@ subroutine sort_selection_buffer(b)
|
||||
|
||||
|
||||
allocate(iorder(b%cur), detmp(N_int, 2, size(b%det,3)), absval(b%cur), vals(size(b%val)))
|
||||
absval = -dabs(b%val(:b%cur))
|
||||
absval = b%val(:b%cur)
|
||||
do i=1,b%cur
|
||||
iorder(i) = i
|
||||
end do
|
||||
|
@ -202,11 +202,11 @@ BEGIN_TEMPLATE
|
||||
if (isize < 2) then
|
||||
return
|
||||
endif
|
||||
call sorted_$Xnumber(x,isize,n)
|
||||
if (isize == n) then
|
||||
return
|
||||
endif
|
||||
if ( isize < 32+n) then
|
||||
! call sorted_$Xnumber(x,isize,n)
|
||||
! if (isize == n) then
|
||||
! return
|
||||
! endif
|
||||
if ( isize < 16) then
|
||||
call insertion_$Xsort(x,iorder,isize)
|
||||
else
|
||||
call heap_$Xsort(x,iorder,isize)
|
||||
|
Loading…
Reference in New Issue
Block a user