View source on GitHub |
Base class establishing interface for restarting the tree state.
A RestartIndicator
maintains a state, and each time next
is called, a bool
value is generated to indicate whether to restart, and the indicator state is
advanced.
Methods
initialize
@abc.abstractmethod
initialize()
Makes an initialized state for RestartIndicator
.
Returns | |
---|---|
An initial state. |
next
@abc.abstractmethod
next( state )
Gets next bool indicator and advances the RestartIndicator
state.
Args | |
---|---|
state
|
The current state. |
Returns | |
---|---|
A pair (value, new_state) where value is bool indicator and new_state is the advanced state. |