public abstract class AbstractFastMutable<S extends AbstractFastState<?>,I,T,SP,TP> extends Object implements ShrinkableAutomaton<S,I,T,SP,TP>, UniversalFiniteAlphabetAutomaton<S,I,T,SP,TP>, StateIDs<S>, SupportsGrowingAlphabet<I>, StateLocalInput<S,I>, Serializable
Modifier and Type | Field and Description |
---|---|
protected Alphabet<I> |
inputAlphabet |
Constructor and Description |
---|
AbstractFastMutable(Alphabet<I> inputAlphabet) |
Modifier and Type | Method and Description |
---|---|
void |
addAlphabetSymbol(I symbol)
Notifies the data structure that a new symbol should be added to the alphabet.
|
S |
addState(SP property)
Adds a state to the automaton.
|
void |
clear()
Removes all states and transitions.
|
<V> MutableMapping<S,V> |
createDynamicStateMapping()
Creates a
MutableMapping allowing to associate arbitrary data with this transition system's states. |
protected abstract S |
createState(SP property) |
Alphabet<I> |
getInputAlphabet() |
S |
getState(int id) |
int |
getStateId(S state) |
Collection<S> |
getStates()
Retrieves all states of the transition system.
|
void |
removeAllTransitions(S state) |
void |
removeState(S state,
S replacement)
Removes a state from the automaton.
|
StateIDs<S> |
stateIDs() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
removeState, unlinkState
addInitialState, addInitialState, addState, addTransition, addTransition, addTransitions, copyTransition, createTransition, removeAllTransitions, removeTransition, setInitial, setStateProperty, setTransitionProperty, setTransitions
transitionGraphView
createStaticStateMapping, iterator, size
forEach, spliterator
getStateProperty, getTransitionProperty
getSuccessor, getSuccessors, getTransitions, powersetView
getInitialStates, getStates, getSuccessors, getSuccessors
transitionGraphView
graphView
getLocalInputs
public int getStateId(S state)
getStateId
in interface StateIDs<S extends AbstractFastState<?>>
public S getState(int id)
getState
in interface StateIDs<S extends AbstractFastState<?>>
public S addState(SP property)
MutableAutomaton
addState
in interface MutableAutomaton<S extends AbstractFastState<?>,I,T,SP,TP>
public void removeAllTransitions(S state)
removeAllTransitions
in interface MutableAutomaton<S extends AbstractFastState<?>,I,T,SP,TP>
public void removeState(S state, S replacement)
ShrinkableAutomaton
null
replacement is given, then this method behaves like the above ShrinkableAutomaton.removeState(Object)
.removeState
in interface ShrinkableAutomaton<S extends AbstractFastState<?>,I,T,SP,TP>
state
- the state to removereplacement
- the replacement state, or null
public void clear()
MutableAutomaton
clear
in interface MutableAutomaton<S extends AbstractFastState<?>,I,T,SP,TP>
public Alphabet<I> getInputAlphabet()
getInputAlphabet
in interface InputAlphabetHolder<I>
public <V> MutableMapping<S,V> createDynamicStateMapping()
SimpleTS
MutableMapping
allowing to associate arbitrary data with this transition system's states. The
returned mapping maintains the association even when the transition system is modified.createDynamicStateMapping
in interface SimpleTS<S extends AbstractFastState<?>,I>
public void addAlphabetSymbol(I symbol) throws GrowingAlphabetNotSupportedException
SupportsGrowingAlphabet
GrowingAlphabet
) to handle
potentially shared state across multiple instances. If the needed requirements are not met, a GrowingAlphabetNotSupportedException
can be thrown.addAlphabetSymbol
in interface SupportsGrowingAlphabet<I>
symbol
- the symbol to add to the alphabet.GrowingAlphabetNotSupportedException
- if the data structure was not properly initialized (e.g. with a GrowingAlphabet
).public Collection<S> getStates()
SimpleAutomaton
getStates
in interface SimpleAutomaton<S extends AbstractFastState<?>,I>
public StateIDs<S> stateIDs()
stateIDs
in interface SimpleAutomaton<S extends AbstractFastState<?>,I>
Copyright © 2019. All rights reserved.