equivalent_nfa_state_set Function

public pure elemental function equivalent_nfa_state_set(a, b) result(res)

This function determines if two NFA state sets (logical vectors) are equivalent.

It takes two NFA state sets, compares all elements of a logical vector, perform a logical AND, and returns it.

Arguments

Type IntentOptional Attributes Name
type(nfa_state_set_t), intent(in) :: a
type(nfa_state_set_t), intent(in) :: b

Return Value logical


Source Code

   pure elemental function equivalent_nfa_state_set(a, b) result(res)
      implicit none
      type(nfa_state_set_t), intent(in) :: a, b

      logical        :: res

      ! If all elements match, set the result `res` to `.true.` indicating equivalence.
      res = all(a%vec .eqv. b%vec)

   end function equivalent_nfa_state_set