Package net.automatalib.ts.modal
Class AbstractCompactMTS<I,T,TP extends MutableModalEdgeProperty>
- java.lang.Object
-
- net.automatalib.automaton.base.AbstractCompact<I,T,Void,TP>
-
- net.automatalib.ts.modal.AbstractCompactMTS<I,T,TP>
-
- Type Parameters:
I- input symbol typeTP- (specific) transition property type
- All Implemented Interfaces:
Iterable<Integer>,SupportsGrowingAlphabet<I>,Automaton<Integer,I,T>,FiniteRepresentation,InputAlphabetHolder<I>,StateIDs<Integer>,StateLocalInput<Integer,I>,FiniteAlphabetAutomaton<Integer,I,T>,MutableAutomaton<Integer,I,T,Void,TP>,SimpleAutomaton<Integer,I>,UniversalAutomaton<Integer,I,T,Void,TP>,UniversalFiniteAlphabetAutomaton<Integer,I,T,Void,TP>,GraphViewable,ModalTransitionSystem<Integer,I,T,TP>,MutableModalTransitionSystem<Integer,I,T,TP>,SimpleTS<Integer,I>,TransitionSystem<Integer,I,T>,UniversalTransitionSystem<Integer,I,T,Void,TP>
- Direct Known Subclasses:
CompactMTS
public abstract class AbstractCompactMTS<I,T,TP extends MutableModalEdgeProperty> extends AbstractCompact<I,T,Void,TP> implements MutableModalTransitionSystem<Integer,I,T,TP>
An abstract base-implementation forMutableModalTransitionSystems.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.automatalib.automaton.base.AbstractCompact
AbstractCompact.Payload
-
Nested classes/interfaces inherited from interface net.automatalib.ts.modal.ModalTransitionSystem
ModalTransitionSystem.MTSGraphView<S extends Object,I extends Object,T extends Object,TP extends ModalEdgeProperty,M extends ModalTransitionSystem<S,I,T,TP>>
-
-
Field Summary
-
Fields inherited from class net.automatalib.automaton.base.AbstractCompact
DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, INVALID_STATE
-
-
Constructor Summary
Constructors Constructor Description AbstractCompactMTS(Alphabet<I> alphabet)AbstractCompactMTS(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)
-
Method Summary
-
Methods inherited from class net.automatalib.automaton.base.AbstractCompact
addAlphabetSymbol, addIntState, addState, getInputAlphabet, getLocalInputs, getState, getStateId, getStates, getSymbolIndex, numInputs, size, stateIDs, toId, toMemoryIndex, toState, updateStateStorage, updateStateStorage, updateTransitionStorage, updateTransitionStorage, updateTransitionStorage
-
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 net.automatalib.automaton.concept.InputAlphabetHolder
getInputAlphabet
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface net.automatalib.ts.modal.ModalTransitionSystem
iterator, size, transitionGraphView
-
Methods inherited from interface net.automatalib.automaton.MutableAutomaton
addInitialState, addInitialState, addState, addState, addTransition, addTransition, addTransitions, copyTransition, createTransition, removeTransition, setTransitionProperty
-
Methods inherited from interface net.automatalib.ts.modal.MutableModalTransitionSystem
createTransition
-
Methods inherited from interface net.automatalib.automaton.simple.SimpleAutomaton
createDynamicStateMapping, createStaticStateMapping, getStates, stateIDs
-
Methods inherited from interface net.automatalib.ts.simple.SimpleTS
getStates, getSuccessors, getSuccessors
-
Methods inherited from interface net.automatalib.ts.TransitionSystem
getSuccessor, getSuccessors, powersetView
-
Methods inherited from interface net.automatalib.automaton.UniversalFiniteAlphabetAutomaton
transitionGraphView
-
Methods inherited from interface net.automatalib.ts.UniversalTransitionSystem
getTransitionProperty
-
-
-
-
Method Detail
-
setInitial
public void setInitial(Integer state, boolean initial)
- Specified by:
setInitialin interfaceMutableAutomaton<Integer,I,T,Void,TP extends MutableModalEdgeProperty>
-
setStateProperty
public void setStateProperty(Integer state, Void property)
- Specified by:
setStatePropertyin interfaceMutableAutomaton<Integer,I,T,Void,TP extends MutableModalEdgeProperty>
-
setStateProperty
public void setStateProperty(int state, Void property)- Specified by:
setStatePropertyin classAbstractCompact<I,T,Void,TP extends MutableModalEdgeProperty>
-
setTransitions
public void setTransitions(Integer state, I input, Collection<? extends T> transitions)
- Specified by:
setTransitionsin interfaceMutableAutomaton<Integer,I,T,Void,TP extends MutableModalEdgeProperty>
-
removeAllTransitions
public void removeAllTransitions(Integer state, I input)
- Specified by:
removeAllTransitionsin interfaceMutableAutomaton<Integer,I,T,Void,TP extends MutableModalEdgeProperty>
-
removeAllTransitions
public void removeAllTransitions(Integer state)
- Specified by:
removeAllTransitionsin interfaceMutableAutomaton<Integer,I,T,Void,TP extends MutableModalEdgeProperty>
-
addModalTransition
public T addModalTransition(Integer src, I input, Integer tgt, ModalEdgeProperty.ModalType modalType)
- Specified by:
addModalTransitionin interfaceMutableModalTransitionSystem<Integer,I,T,TP extends MutableModalEdgeProperty>
-
getStateProperty
public Void getStateProperty(Integer state)
- Specified by:
getStatePropertyin interfaceUniversalTransitionSystem<Integer,I,T,Void,TP extends MutableModalEdgeProperty>
-
getTransitions
public Collection<T> getTransitions(Integer state, I input)
- Specified by:
getTransitionsin interfaceTransitionSystem<I,T,TP extends MutableModalEdgeProperty>
-
getInitialStates
public Set<Integer> getInitialStates()
- Specified by:
getInitialStatesin interfaceSimpleTS<I,T>
-
clear
public void clear()
- Specified by:
clearin interfaceMutableAutomaton<Integer,I,T,Void,TP extends MutableModalEdgeProperty>- Overrides:
clearin classAbstractCompact<I,T,Void,TP extends MutableModalEdgeProperty>
-
updateTransitionStorage
protected void updateTransitionStorage(AbstractCompact.Payload payload)
Description copied from class:AbstractCompactImplementing classes should override this method in order to react to changes to the layout of their array-based transition data, e.g. due to calls toMutableAutomaton.addState()orAbstractCompact.addAlphabetSymbol(Object).Subclasses may use one of the
AbstractCompact.updateTransitionStorage(Object[], IntFunction, Object, Payload)... methods to conveniently delegate this task to this base class. This leaves subclasses only with the task to invoke the provided update methods for each of their local array storages.- Overrides:
updateTransitionStoragein classAbstractCompact<I,T,Void,TP extends MutableModalEdgeProperty>- Parameters:
payload- the payload containing the necessary information for the update operation. This object must be passed as-is to theAbstractCompact.updateTransitionStorage(Object[], IntFunction, Object, Payload)... methods.
-
getDefaultTransitionProperty
protected abstract TP getDefaultTransitionProperty()
-
buildModalProperty
protected abstract TP buildModalProperty(ModalEdgeProperty.ModalType type)
-
-