Interface StateLocalInputSUL<I,​O>

  • Type Parameters:
    I - input symbol type
    O - output symbol type
    All Superinterfaces:
    SUL<I,​O>

    public interface StateLocalInputSUL<I,​O>
    extends SUL<I,​O>
    A System Under Learning (SUL) which can additionally report the inputs that the SUL can process in its current state, i.e. inputs that will not trigger a SULException when used in the next invocation of the SUL.step(Object) method return an otherwise "undefined" behavior.
    • Method Detail

      • currentlyEnabledInputs

        Collection<I> currentlyEnabledInputs()
        Returns the enabled symbols for the current state of the SUL.
        Returns:
        the currently enabled inputs
        Throws:
        SULException - if the SUL cannot provide information about the currently enabled inputs
      • fork

        default StateLocalInputSUL<I,​O> fork()
        Description copied from interface: SUL
        Forks this SUL, if possible. The fork of a SUL is a copy which behaves exactly the same as this SUL. This method should always return a reseted SUL, regardless of whether this call is made between a call to SUL.pre() and SUL.post().

        If SUL.canFork() returns true, this method must return a non-null object, which should behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, a UnsupportedOperationException must be thrown.

        Implementation note: if resetting a SUL changes the internal state of this object in a non-trivial way (e.g., incrementing a counter to ensure independent sessions), care must be taken that forks of this SUL manipulate the same internal state.

        Specified by:
        fork in interface SUL<I,​O>
        Returns:
        a fork of this SUL.