right Subroutine

private subroutine right(n, h, i, ir)

given as input the integer i and the vector h of logical, compute the the minimum integer ir such that ir>i and h(il) is true.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

length of the vector h

logical, intent(in) :: h(n)

vector of logical

integer, intent(in) :: i

integer

integer, intent(out) :: ir

minimum integer such that ir>i, h(ir)=.true.


Called by

proc~~right~~CalledByGraph proc~right polyroots_module::right proc~cmerge polyroots_module::cmerge proc~cmerge->proc~right proc~cnvex polyroots_module::cnvex proc~cnvex->proc~cmerge proc~start polyroots_module::start proc~start->proc~cnvex proc~polzeros polyroots_module::polzeros proc~polzeros->proc~start

Source Code

    subroutine right(n, h, i, ir)

        !! given as input the integer i and the vector h of logical, compute the
        !! the minimum integer ir such that ir>i and h(il) is true.

        implicit none

        integer,intent(in) :: n !! length of the vector h
        logical ,intent(in):: h(n) !! vector of logical
        integer,intent(in) :: i !! integer
        integer,intent(out) :: ir !! minimum integer such that ir>i, h(ir)=.true.

        do ir = i + 1, n
            if (h(ir)) return
        end do

    end subroutine right