public abstract class FastMutableDet<S extends FastDetState<S,T>,I,T,SP,TP> extends AbstractShrinkableDeterministic<S,I,T,SP,TP> implements FiniteAlphabetAutomaton<S,I,T>, UniversalGraph<S,Pair<I,T>,SP,Pair<I,TP>>, StateIDs<S>, NodeIDs<S>
Modifier and Type | Field and Description |
---|---|
protected Alphabet<I> |
inputAlphabet |
Constructor and Description |
---|
FastMutableDet(Alphabet<I> inputAlphabet) |
Modifier and Type | Method and Description |
---|---|
S |
addState(SP property)
Adds a state to the automaton.
|
void |
clear()
Removes all states and transitions.
|
<V> MutableMapping<S,V> |
createDynamicNodeMapping() |
<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) |
<V> MutableMapping<S,V> |
createStaticNodeMapping() |
<V> MutableMapping<S,V> |
createStaticStateMapping()
Creates a
MutableMapping allowing to associate arbitrary data
with this transition system's states. |
Pair<I,TP> |
getEdgeProperty(Pair<I,T> edge)
Retrieves the property of a given edge.
|
S |
getInitialState()
Retrieves the initial state of this transition system.
|
Alphabet<I> |
getInputAlphabet() |
S |
getNode(int id) |
int |
getNodeId(S node) |
SP |
getNodeProperty(S node)
Retrieves the property of a given node.
|
Collection<S> |
getNodes()
Retrieves an (unmodifiable) collection of the nodes in this graph.
|
Collection<Pair<I,T>> |
getOutgoingEdges(S node)
Retrieves the outgoing edges of a given node.
|
S |
getState(int id) |
int |
getStateId(S state) |
Collection<S> |
getStates()
Retrieves all states of the transition system.
|
S |
getTarget(Pair<I,T> edge)
Retrieves, for a given edge, its target node.
|
T |
getTransition(S state,
I input)
Retrieves the transition triggered by the given input symbol.
|
NodeIDs<S> |
nodeIDs() |
void |
removeAllTransitions(S state) |
void |
removeState(S state,
S replacement)
Removes a state from the automaton.
|
void |
setInitialState(S state)
Sets the initial state to the given state
|
void |
setTransition(S state,
I input,
T transition)
Sets the transition for the given state and input symbol.
|
StateIDs<S> |
stateIDs() |
removeState
addInitialState, addInitialState, addState, addTransition, addTransition, addTransition, addTransitions, removeAllTransitions, removeAllTransitions, removeTransition, removeTransition, setInitial, setInitial, setTransition, setTransition, setTransitions, setTransitions
iterator, size
getInitialStates, getInitialStates, getState, getState, getSuccessor, getSuccessor, getSuccessor, getSuccessor, getTransitions, getTransitions
createDynamicStateMapping, createStaticStateMapping, getStates, getStates, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, powersetView, powersetView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSuccessor, getTransitions, powersetView
size
getInitialStates, getStates, getSuccessors, getSuccessors, getSuccessors
forEach, iterator, spliterator
setTransition
getState, getSuccessor, getSuccessor
addInitialState, addInitialState, addState, addTransition, addTransition, addTransitions, copyTransition, createTransition, removeAllTransitions, removeTransition, setInitial, setStateProperty, setTransitionProperty, setTransitions
getStateProperty, getTransitionProperty
protected final Alphabet<I> inputAlphabet
public FastMutableDet(Alphabet<I> inputAlphabet)
public Collection<S> getStates()
SimpleAutomaton
getStates
in interface SimpleAutomaton<S extends FastDetState<S,T>,I>
public int getStateId(S state)
getStateId
in interface StateIDs<S extends FastDetState<S,T>>
public void setInitialState(S state)
MutableDeterministic
setInitialState
in interface MutableDeterministic<S extends FastDetState<S,T>,I,T,SP,TP>
state
- the new initial statepublic void setTransition(S state, I input, T transition)
MutableDeterministic
setTransition
in interface MutableDeterministic<S extends FastDetState<S,T>,I,T,SP,TP>
state
- the source stateinput
- the triggering input symboltransition
- the transitionpublic S getInitialState()
SimpleDTS
getInitialState
in interface SimpleDTS<S extends FastDetState<S,T>,I>
SimpleTS.getInitialStates()
public T getTransition(S state, I input)
DeterministicTransitionSystem
getTransition
in interface DeterministicTransitionSystem<S extends FastDetState<S,T>,I,T>
state
- the source state.input
- the input symbol.null
if no transition is triggered.TransitionSystem.getTransitions(Object, Object)
public void clear()
MutableAutomaton
clear
in interface MutableAutomaton<S extends FastDetState<S,T>,I,T,SP,TP>
public S addState(SP property)
MutableAutomaton
addState
in interface MutableAutomaton<S extends FastDetState<S,T>,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 FastDetState<S,T>,I,T,SP,TP>
state
- the state to removereplacement
- the replacement state, or null
public Alphabet<I> getInputAlphabet()
getInputAlphabet
in interface InputAlphabetHolder<I>
public Collection<S> getNodes()
Graph
public Collection<Pair<I,T>> getOutgoingEdges(S node)
IndefiniteGraph
getOutgoingEdges
in interface IndefiniteGraph<S extends FastDetState<S,T>,Pair<I,T>>
node
- the node.Collection
of all outgoing edges, or null
if
the node has no outgoing edges.public S getTarget(Pair<I,T> edge)
IndefiniteGraph
getTarget
in interface IndefiniteGraph<S extends FastDetState<S,T>,Pair<I,T>>
edge
- the edge.public void removeAllTransitions(S state)
removeAllTransitions
in interface MutableAutomaton<S extends FastDetState<S,T>,I,T,SP,TP>
public SP getNodeProperty(S node)
UniversalIndefiniteGraph
getNodeProperty
in interface UniversalIndefiniteGraph<S extends FastDetState<S,T>,Pair<I,T>,SP,Pair<I,TP>>
node
- the nodepublic Pair<I,TP> getEdgeProperty(Pair<I,T> edge)
UniversalIndefiniteGraph
getEdgeProperty
in interface UniversalIndefiniteGraph<S extends FastDetState<S,T>,Pair<I,T>,SP,Pair<I,TP>>
edge
- the edgepublic StateIDs<S> stateIDs()
stateIDs
in interface SimpleAutomaton<S extends FastDetState<S,T>,I>
stateIDs
in class AbstractDeterministicAutomaton<S extends FastDetState<S,T>,I,T>
public <V> MutableMapping<S,V> createStaticStateMapping()
SimpleTS
MutableMapping
allowing to associate arbitrary data
with this transition system's states. The returned mapping is however
only guaranteed to work correctly if the transition system is not
modified.createStaticStateMapping
in interface SimpleTS<S extends FastDetState<S,T>,I>
createStaticStateMapping
in class AbstractTS<S extends FastDetState<S,T>,I,T>
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 FastDetState<S,T>,I>
createDynamicStateMapping
in class AbstractTS<S extends FastDetState<S,T>,I,T>
public <V> MutableMapping<S,V> createStaticNodeMapping()
createStaticNodeMapping
in interface IndefiniteGraph<S extends FastDetState<S,T>,Pair<I,T>>
public <V> MutableMapping<S,V> createDynamicNodeMapping()
createDynamicNodeMapping
in interface IndefiniteGraph<S extends FastDetState<S,T>,Pair<I,T>>
protected abstract S createState(SP property)
Copyright © 2015. All Rights Reserved.