Function approximateRejectingWordSet

  • Returns a set of inputs rejected by the given iterator using the given input character set.

    If the iterator accepts all words, undefined is guaranteed to be returned.

    This algorithm implements an approximation to determine rejecting inputs in order to guarantee non-exponential worst-case execution time. Consequently, the algorithm can't find rejecting inputs for some iterators and returns undefined instead.

    Type Parameters

    • S

    Parameters

    • iter: FAIterator<S, Iterable<[S, CharSet]>>
    • inputCharacters: CharSet

      The set of input characters.

      All character sets in the returned word set will be subsets of the set of input characters.

      If all characters are allowed, use CharSet.all(maxCharacter).

    Returns WordSet | undefined