m_select Module

module~~m_select~~UsesGraph module~m_select m_select module~variablekind variableKind module~variablekind->module~m_select iso_fortran_env iso_fortran_env iso_fortran_env->module~variablekind
Help

Perform a quickselect on an array. Quick select finds the kth smallest number in an array. It also puts values lower than the kth on the left, and those higher on the right This makes it perfect for finding the median.

Used By

module~~m_select~~UsedByGraph module~m_select m_select program~scaletest_coretran scaleTest_coretran module~m_select->program~scaletest_coretran module~m_tests m_tests module~m_select->module~m_tests module~m_kdtree m_KdTree module~m_select->module~m_kdtree module~m_maths m_maths module~m_select->module~m_maths program~test_coretran test_coretran module~m_tests->program~test_coretran module~m_kdtree->program~scaletest_coretran module~m_kdtree->module~m_tests module~m_maths->program~scaletest_coretran module~m_maths->module~m_tests module~m_maths->module~m_kdtree
Help


Interfaces

public interface select

Use an in-place quick select on an array of numbers

  • public subroutine quickSelect_i1D(this, k, res)

    Interfaced with select()

    Arguments

    Type IntentOptional AttributesName
    integer(kind=i32), intent(inout) :: this(:)

    Array to choose kth smallest from

    integer(kind=i32), intent(in) :: k

    kth smallest element

    integer(kind=i32) :: res
  • public subroutine quickSelect_id1D(this, k, res)

    Interfaced with select()

    Arguments

    Type IntentOptional AttributesName
    integer(kind=i64), intent(inout) :: this(:)

    Array to choose kth smallest from

    integer(kind=i32), intent(in) :: k

    kth smallest element

    integer(kind=i64) :: res
  • public subroutine quickSelect_r1D(this, k, res)

    Interfaced with select()

    Arguments

    Type IntentOptional AttributesName
    real(kind=r32), intent(inout) :: this(:)

    Array to choose kth smallest from

    integer(kind=i32), intent(in) :: k

    kth smallest element

    real(kind=r32) :: res
  • public subroutine quickSelect_d1D(this, k, res)

    Interfaced with select()

    Arguments

    Type IntentOptional AttributesName
    real(kind=r64), intent(inout) :: this(:)

    Array to choose kth smallest from

    integer(kind=i32), intent(in) :: k

    kth smallest element

    real(kind=r64) :: res

public interface argSelect

Use an indirect introspection sort on an array of numbers

  • public subroutine argQuickSelect_i1D(this, indx, k, res, left, right)

    Interfaced with argSelect()

    Arguments

    Type IntentOptional AttributesName
    integer(kind=i32), intent(in) :: this(:)

    1D array

    integer(kind=i32), intent(inout) :: indx(:)

    Index to choose kth smallest from

    integer(kind=i32), intent(in) :: k

    kth smallest element

    integer(kind=i32) :: res

    Index of the kth smallest element

    integer(kind=i32), intent(in), optional :: left

    Select over the region left:right

    integer(kind=i32), intent(in), optional :: right

    Select over the region left:right

  • public subroutine argQuickSelect_id1D(this, indx, k, res, left, right)

    Interfaced with argSelect()

    Arguments

    Type IntentOptional AttributesName
    integer(kind=i64), intent(in) :: this(:)

    1D array

    integer(kind=i32), intent(inout) :: indx(:)

    Index to choose kth smallest from

    integer(kind=i32), intent(in) :: k

    kth smallest element

    integer(kind=i32) :: res

    Index of the kth smallest element

    integer(kind=i32), intent(in), optional :: left

    Select over the region left:right

    integer(kind=i32), intent(in), optional :: right

    Select over the region left:right

  • public subroutine argQuickSelect_r1D(this, indx, k, res, left, right)

    Interfaced with argSelect()

    Arguments

    Type IntentOptional AttributesName
    real(kind=r32), intent(in) :: this(:)

    1D array

    integer(kind=i32), intent(inout) :: indx(:)

    Index to choose kth smallest from

    integer(kind=i32), intent(in) :: k

    kth smallest element

    integer(kind=i32) :: res

    Index of the kth smallest element

    integer(kind=i32), intent(in), optional :: left

    Select over the region left:right

    integer(kind=i32), intent(in), optional :: right

    Select over the region left:right

  • public subroutine argQuickSelect_d1D(this, indx, k, res, left, right)

    Interfaced with argSelect()

    Arguments

    Type IntentOptional AttributesName
    real(kind=r64), intent(in) :: this(:)

    1D array

    integer(kind=i32), intent(inout) :: indx(:)

    Index to choose kth smallest from

    integer(kind=i32), intent(in) :: k

    kth smallest element

    integer(kind=i32) :: res

    Index of the kth smallest element

    integer(kind=i32), intent(in), optional :: left

    Select over the region left:right

    integer(kind=i32), intent(in), optional :: right

    Select over the region left:right