SABER
tools_qsort Module Reference

Qsort routines. More...

Data Types

interface  interchange_sort
 
interface  qsort
 
interface  quick_sort
 

Functions/Subroutines

recursive subroutine qsort_integer (n, list, order)
 Sort an integer subvector. More...
 
recursive subroutine qsort_real (n, list, order)
 Sort a real subvector. More...
 
recursive subroutine quick_sort_integer (n, left_end, right_end, list, order)
 Sort an integer subvector. More...
 
recursive subroutine quick_sort_real (n, left_end, right_end, list, order)
 Sort a real subvector. More...
 
subroutine interchange_sort_integer (n, left_end, right_end, list, order)
 Interchange integers. More...
 
subroutine interchange_sort_real (n, left_end, right_end, list, order)
 Interchange reals. More...
 

Detailed Description

Qsort routines.

Function/Subroutine Documentation

◆ interchange_sort_integer()

subroutine tools_qsort::interchange_sort_integer ( integer, intent(in)  n,
integer, intent(in)  left_end,
integer, intent(in)  right_end,
integer, dimension(n), intent(inout)  list,
integer, dimension(n), intent(inout)  order 
)
private

Interchange integers.

Parameters
[in]nInput vector size
[in]left_endLeft end of the vector
[in]right_endRight end of the vector
[in,out]listVector to sort
[in,out]orderPositions of the elements in the original order

Definition at line 215 of file tools_qsort.F90.

◆ interchange_sort_real()

subroutine tools_qsort::interchange_sort_real ( integer, intent(in)  n,
integer, intent(in)  left_end,
integer, intent(in)  right_end,
real(kind_real), dimension(n), intent(inout)  list,
integer, dimension(n), intent(inout)  order 
)
private

Interchange reals.

Parameters
[in]nInput vector size
[in]left_endLeft end of the vector
[in]right_endRight end of the vector
[in,out]listVector to sort
[in,out]orderPositions of the elements in the original order

Definition at line 249 of file tools_qsort.F90.

Here is the call graph for this function:

◆ qsort_integer()

recursive subroutine tools_qsort::qsort_integer ( integer, intent(in)  n,
integer, dimension(n), intent(inout)  list,
integer, dimension(n), intent(inout)  order 
)
private

Sort an integer subvector.

Parameters
[in]nInput vector size
[in,out]listVector to sort
[in,out]orderPositions of the elements in the original order

Definition at line 43 of file tools_qsort.F90.

◆ qsort_real()

recursive subroutine tools_qsort::qsort_real ( integer, intent(in)  n,
real(kind_real), dimension(n), intent(inout)  list,
integer, dimension(n), intent(inout)  order 
)
private

Sort a real subvector.

Parameters
[in]nInput vector size
[in,out]listVector to sort
[in,out]orderPositions of the elements in the original order

Definition at line 67 of file tools_qsort.F90.

◆ quick_sort_integer()

recursive subroutine tools_qsort::quick_sort_integer ( integer, intent(in)  n,
integer, intent(in)  left_end,
integer, intent(in)  right_end,
integer, dimension(n), intent(inout)  list,
integer, dimension(n), intent(inout)  order 
)
private

Sort an integer subvector.

Parameters
[in]nInput vector size
[in]left_endLeft end of the vector
[in]right_endRight end of the vector
[in,out]listVector to sort
[in,out]orderPositions of the elements in the original order

Definition at line 91 of file tools_qsort.F90.

◆ quick_sort_real()

recursive subroutine tools_qsort::quick_sort_real ( integer, intent(in)  n,
integer, intent(in)  left_end,
integer, intent(in)  right_end,
real(kind_real), dimension(n), intent(inout)  list,
integer, dimension(n), intent(inout)  order 
)
private

Sort a real subvector.

Parameters
[in]nInput vector size
[in]left_endLeft end of the vector
[in]right_endRight end of the vector
[in,out]listVector to sort
[in,out]orderPositions of the elements in the original order

Definition at line 153 of file tools_qsort.F90.

Here is the call graph for this function: