Package net.automatalib.automaton.base
Class AbstractFastMutableNondet<S extends AbstractFastState<Collection<T>>,I,T,SP,TP>
- java.lang.Object
-
- net.automatalib.automaton.base.AbstractFastMutable<S,I,T,SP,TP>
-
- net.automatalib.automaton.base.AbstractFastMutableNondet<S,I,T,SP,TP>
-
- All Implemented Interfaces:
Iterable<S>
,SupportsGrowingAlphabet<I>
,Automaton<S,I,T>
,FiniteRepresentation
,InputAlphabetHolder<I>
,StateIDs<S>
,StateLocalInput<S,I>
,FiniteAlphabetAutomaton<S,I,T>
,MutableAutomaton<S,I,T,SP,TP>
,ShrinkableAutomaton<S,I,T,SP,TP>
,SimpleAutomaton<S,I>
,UniversalAutomaton<S,I,T,SP,TP>
,UniversalFiniteAlphabetAutomaton<S,I,T,SP,TP>
,GraphViewable
,SimpleTS<S,I>
,TransitionSystem<S,I,T>
,UniversalTransitionSystem<S,I,T,SP,TP>
- Direct Known Subclasses:
FastNFA
,FastProbMealy
public abstract class AbstractFastMutableNondet<S extends AbstractFastState<Collection<T>>,I,T,SP,TP> extends AbstractFastMutable<S,I,T,SP,TP>
-
-
Field Summary
-
Fields inherited from class net.automatalib.automaton.base.AbstractFastMutable
inputAlphabet
-
-
Constructor Summary
Constructors Constructor Description AbstractFastMutableNondet(Alphabet<I> inputAlphabet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all states and transitions.Set<S>
getInitialStates()
Retrieves the set of initial states of the transition system.Collection<I>
getLocalInputs(S state)
Returns the collection of input symbols for which a successor state is defined.Collection<T>
getTransitions(S state, I input)
Retrieves the transitions that can be triggered by the given input symbol.FastPowersetDTS<S,I,T>
powersetView()
Retrieves a "powerset view" of this transition system.void
removeState(S state, @Nullable S replacement)
Removes a state from the automaton.void
setInitial(S state, boolean initial)
void
setTransitions(S state, I input, Collection<? extends T> transitions)
-
Methods inherited from class net.automatalib.automaton.base.AbstractFastMutable
addAlphabetSymbol, addState, createDynamicStateMapping, createState, getInputAlphabet, getState, getStateId, getStates, removeAllTransitions, stateIDs
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.automaton.FiniteAlphabetAutomaton
getTransitions, graphView
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface net.automatalib.automaton.MutableAutomaton
addInitialState, addInitialState, addState, addTransition, addTransition, addTransitions, copyTransition, createTransition, removeAllTransitions, removeTransition, setStateProperty, setTransitionProperty
-
Methods inherited from interface net.automatalib.automaton.ShrinkableAutomaton
removeState
-
Methods inherited from interface net.automatalib.automaton.simple.SimpleAutomaton
createStaticStateMapping, iterator, size
-
Methods inherited from interface net.automatalib.ts.simple.SimpleTS
getStates, getSuccessors, getSuccessors
-
Methods inherited from interface net.automatalib.ts.TransitionSystem
getSuccessor, getSuccessors
-
Methods inherited from interface net.automatalib.automaton.UniversalAutomaton
transitionGraphView
-
Methods inherited from interface net.automatalib.automaton.UniversalFiniteAlphabetAutomaton
transitionGraphView
-
Methods inherited from interface net.automatalib.ts.UniversalTransitionSystem
getStateProperty, getTransitionProperty
-
-
-
-
Method Detail
-
getInitialStates
public Set<S> getInitialStates()
Description copied from interface:SimpleTS
Retrieves the set of initial states of the transition system.- Returns:
- the initial states.
-
getTransitions
public Collection<T> getTransitions(S state, I input)
Description copied from interface:TransitionSystem
Retrieves the transitions that can be triggered by the given input symbol.The return value must not be
null
; if there are no transitions triggered by the specified input,Collections.emptySet()
should be returned.- Parameters:
state
- the source state.input
- the input symbol.- Returns:
- the transitions triggered by the given input
-
clear
public void clear()
Description copied from interface:MutableAutomaton
Removes all states and transitions.- Specified by:
clear
in interfaceMutableAutomaton<S extends AbstractFastState<Collection<T>>,I,T,SP,TP>
- Overrides:
clear
in classAbstractFastMutable<S extends AbstractFastState<Collection<T>>,I,T,SP,TP>
-
setInitial
public void setInitial(S state, boolean initial)
-
setTransitions
public void setTransitions(S state, I input, Collection<? extends T> transitions)
-
removeState
public void removeState(S state, @Nullable S replacement)
Description copied from interface:ShrinkableAutomaton
Removes a state from the automaton. All ingoing transitions to this state are redirected to the given replacement state. If anull
replacement is given, then this method behaves like the aboveShrinkableAutomaton.removeState(Object)
.- Specified by:
removeState
in interfaceShrinkableAutomaton<S extends AbstractFastState<Collection<T>>,I,T,SP,TP>
- Overrides:
removeState
in classAbstractFastMutable<S extends AbstractFastState<Collection<T>>,I,T,SP,TP>
- Parameters:
state
- the state to removereplacement
- the replacement state, ornull
-
powersetView
public FastPowersetDTS<S,I,T> powersetView()
Description copied from interface:TransitionSystem
Retrieves a "powerset view" of this transition system.- Returns:
- a powerset view of this transition system.
-
getLocalInputs
public Collection<I> getLocalInputs(S state)
Description copied from interface:StateLocalInput
Returns the collection of input symbols for which a successor state is defined.- Parameters:
state
- the state for which the defined inputs should be returned- Returns:
- the collection of input symbols for which a successor state is defined.
-
-