test_flag Function

public pure function test_flag(ilut, flg) result(bSet)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: ilut(0:nIfTot)
integer, intent(in) :: flg

Return Value logical


Contents

Source Code


Source Code

    pure function test_flag(ilut, flg) result(bSet)

        ! Test specified flag (0 indexed) in the bit representation.
        !
        ! In:  flg  - Integer index of flag to test
        !      ilut - Bit representation of determinant
        ! Ret: bSet - returns .true. if the flag is set, false otherwise

        integer(n_int), intent(in) :: ilut(0:nIfTot)
        integer, intent(in) :: flg
        logical :: bSet

        bSet = btest(ilut(IlutBits%ind_flag), flg)

    end function test_flag