Hdelete Subroutine

private subroutine Hdelete(Ha, Hj, Hk, Nin, N, Nk, k, hops)

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(inout) :: Ha(Nin)
integer(kind=ip), intent(inout) :: Hj(Nin)
integer(kind=ip), intent(inout) :: Hk(Nk)
integer(kind=ip), intent(in) :: Nin
integer(kind=ip), intent(inout) :: N
integer(kind=ip), intent(in) :: Nk
integer(kind=ip), intent(in) :: k
integer(kind=ip), intent(out) :: hops

Calls

proc~~hdelete~~CallsGraph proc~hdelete lusol::Hdelete proc~hchange lusol::Hchange proc~hdelete->proc~hchange proc~hdown lusol::Hdown proc~hchange->proc~hdown proc~hup lusol::Hup proc~hchange->proc~hup

Called by

proc~~hdelete~~CalledByGraph proc~hdelete lusol::Hdelete proc~lu1fad lusol::lu1fad proc~lu1fad->proc~hdelete proc~lu1fac lusol::lu1fac proc~lu1fac->proc~lu1fad proc~solve lusol_ez_module::solve proc~solve->proc~lu1fac proc~test_1 main::test_1 proc~test_1->proc~solve proc~test_2 main::test_2 proc~test_2->proc~solve program~main~2 main program~main~2->proc~test_1 program~main~2->proc~test_2

Source Code

  subroutine Hdelete( Ha, Hj, Hk, Nin, N, Nk, k, hops )

    integer(ip),   intent(in)    :: Nin, Nk, k
    integer(ip),   intent(inout) :: N
    integer(ip),   intent(inout) :: Hj(Nin), Hk(Nk)
    real(rp),      intent(inout) :: Ha(Nin)
    integer(ip),   intent(out)   :: hops

    !==================================================================
    ! Hdelete deletes Ha(k) from heap of length N.
    !
    ! 03 Apr 2002: Current version of Hdelete.
    ! 01 May 2002: Need Nk for length of Hk.
    ! 07 May 2002: Protect input parameters N, Nk, k.
    ! 19 Dec 2004: Nin is new input parameter for length of Hj, Ha.
    ! 19 Dec 2004: Current version of Hdelete.
    ! 12 Dec 2011: First f90 version.
    !==================================================================

    integer(ip) :: jv, kx, Nkx, Nx
    real(rp)    :: v

    kx    = k
    Nkx   = Nk
    Nx    = N
    v     = Ha(N)
    jv    = Hj(N)
    N     = N - 1
    hops  = 0
    if (k <= N) then
       call Hchange( Ha, Hj, Hk, Nx, Nkx, kx, v, jv, hops )
    end if

  end subroutine Hdelete