Module net.automatalib.core
Package net.automatalib.automaton.impl
Class UniversalCompactDet<I,SP,TP>
- java.lang.Object
-
- net.automatalib.automaton.base.AbstractCompact<I,T,SP,TP>
-
- net.automatalib.automaton.base.AbstractCompactDeterministic<I,CompactTransition<TP>,SP,TP>
-
- net.automatalib.automaton.impl.UniversalCompactDet<I,SP,TP>
-
- Type Parameters:
I- input symbol typeSP- state property typeTP- transition property type
- All Implemented Interfaces:
Iterable<Integer>,SupportsGrowingAlphabet<I>,Automaton<Integer,I,CompactTransition<TP>>,FiniteRepresentation,InputAlphabetHolder<I>,StateIDs<Integer>,StateLocalInput<Integer,I>,DeterministicAutomaton<Integer,I,CompactTransition<TP>>,DeterministicAutomaton.FullIntAbstraction<CompactTransition<TP>>,DeterministicAutomaton.IntAbstraction<CompactTransition<TP>>,DeterministicAutomaton.StateIntAbstraction<I,CompactTransition<TP>>,FiniteAlphabetAutomaton<Integer,I,CompactTransition<TP>>,MutableAutomaton<Integer,I,CompactTransition<TP>,SP,TP>,MutableDeterministic<Integer,I,CompactTransition<TP>,SP,TP>,MutableDeterministic.FullIntAbstraction<CompactTransition<TP>,SP,TP>,MutableDeterministic.IntAbstraction<CompactTransition<TP>,SP,TP>,MutableDeterministic.StateIntAbstraction<I,CompactTransition<TP>,SP,TP>,SimpleAutomaton<Integer,I>,SimpleDeterministicAutomaton<Integer,I>,SimpleDeterministicAutomaton.FullIntAbstraction,SimpleDeterministicAutomaton.IntAbstraction,SimpleDeterministicAutomaton.StateIntAbstraction<I>,UniversalAutomaton<Integer,I,CompactTransition<TP>,SP,TP>,UniversalDeterministicAutomaton<Integer,I,CompactTransition<TP>,SP,TP>,UniversalDeterministicAutomaton.FullIntAbstraction<CompactTransition<TP>,SP,TP>,UniversalDeterministicAutomaton.IntAbstraction<CompactTransition<TP>,SP,TP>,UniversalDeterministicAutomaton.StateIntAbstraction<I,CompactTransition<TP>,SP,TP>,UniversalFiniteAlphabetAutomaton<Integer,I,CompactTransition<TP>,SP,TP>,GraphViewable,DeterministicTransitionSystem<Integer,I,CompactTransition<TP>>,SimpleDTS<Integer,I>,SimpleTS<Integer,I>,TransitionSystem<Integer,I,CompactTransition<TP>>,UniversalDTS<Integer,I,CompactTransition<TP>,SP,TP>,UniversalTransitionSystem<Integer,I,CompactTransition<TP>,SP,TP>
- Direct Known Subclasses:
CompactSST
public class UniversalCompactDet<I,SP,TP> extends AbstractCompactDeterministic<I,CompactTransition<TP>,SP,TP>
A default implementation forAbstractCompactDeterministicthat usesCompactTransitionas transition type and supports various types of state and transition properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUniversalCompactDet.Creator<I,SP,TP>-
Nested classes/interfaces inherited from class net.automatalib.automaton.base.AbstractCompact
AbstractCompact.Payload
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.MutableDeterministic
MutableDeterministic.FullIntAbstraction<T,SP,TP>, MutableDeterministic.IntAbstraction<T,SP,TP>, MutableDeterministic.StateIntAbstraction<I,T,SP,TP>
-
-
Field Summary
-
Fields inherited from class net.automatalib.automaton.base.AbstractCompact
DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, INVALID_STATE
-
Fields inherited from interface net.automatalib.automaton.simple.SimpleDeterministicAutomaton.IntAbstraction
INVALID_STATE
-
-
Constructor Summary
Constructors Modifier Constructor Description UniversalCompactDet(Alphabet<I> alphabet)UniversalCompactDet(Alphabet<I> alphabet, int stateCapacity)UniversalCompactDet(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)protectedUniversalCompactDet(Alphabet<I> alphabet, UniversalCompactDet<?,SP,TP> other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all states and transitions.CompactTransition<TP>createTransition(int successor, TP property)intgetIntSuccessor(CompactTransition<TP> transition)Retrieves the (abstracted) successor of a transition object.SPgetStateProperty(int state)Retrieves the state property of a given (abstracted) state.@Nullable CompactTransition<TP>getTransition(int state, int input)Retrieves the outgoing transition for an (abstracted) source state and (abstracted) input symbol, or returnsnullif the automaton has no transition for this state and input.TPgetTransitionProperty(CompactTransition<TP> transition)Retrieves the transition property for the given state.voidremoveAllTransitions(Integer state)voidsetStateProperty(int state, SP property)voidsetTransition(int state, int input, int successor, @Nullable TP property)voidsetTransition(int state, int input, @Nullable CompactTransition<TP> transition)voidsetTransitionProperty(CompactTransition<TP> transition, TP property)protected voidupdateStateStorage(AbstractCompact.Payload payload)Implementing classes should override this method in order to react to changes to the layout of their array-based state data, e.g. due to calls toMutableAutomaton.addState().protected voidupdateTransitionStorage(AbstractCompact.Payload payload)Implementing 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).-
Methods inherited from class net.automatalib.automaton.base.AbstractCompactDeterministic
addIntInitialState, createTransition, fullIntAbstraction, getInitialState, getIntInitialState, getLocalInputs, getSuccessor, getSuccessor, getTransition, getTransition, setInitialState, setInitialState, setTransition, setTransition, setTransition, stateIntAbstraction
-
Methods inherited from class net.automatalib.automaton.base.AbstractCompact
addAlphabetSymbol, addIntState, addState, getInputAlphabet, getState, getStateId, getStateProperty, getStates, getSymbolIndex, numInputs, setStateProperty, size, stateIDs, toId, toMemoryIndex, toState, 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.DeterministicAutomaton.FullIntAbstraction
getSuccessor
-
Methods inherited from interface net.automatalib.ts.DeterministicTransitionSystem
getSuccessor, getSuccessors, getTransitions, powersetView
-
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, addState, addTransition, addTransitions, copyTransition, setStateProperty
-
Methods inherited from interface net.automatalib.automaton.MutableDeterministic
addTransition, fullIntAbstraction, removeAllTransitions, removeTransition, setInitial, setTransition, setTransitions
-
Methods inherited from interface net.automatalib.automaton.MutableDeterministic.IntAbstraction
addIntInitialState, addIntState, addIntState
-
Methods inherited from interface net.automatalib.automaton.simple.SimpleAutomaton
createDynamicStateMapping, createStaticStateMapping, getStates, iterator, size, stateIDs
-
Methods inherited from interface net.automatalib.automaton.simple.SimpleDeterministicAutomaton.FullIntAbstraction
numInputs
-
Methods inherited from interface net.automatalib.ts.simple.SimpleDTS
getInitialStates, getState, getStates, getSuccessor, getSuccessors
-
Methods inherited from interface net.automatalib.ts.simple.SimpleTS
getSuccessors
-
Methods inherited from interface net.automatalib.automaton.UniversalAutomaton
transitionGraphView
-
Methods inherited from interface net.automatalib.automaton.UniversalDeterministicAutomaton.FullIntAbstraction
getTransitionProperty
-
Methods inherited from interface net.automatalib.automaton.UniversalDeterministicAutomaton.StateIntAbstraction
getTransitionProperty
-
Methods inherited from interface net.automatalib.ts.UniversalDTS
getTransitionProperty
-
Methods inherited from interface net.automatalib.automaton.UniversalFiniteAlphabetAutomaton
transitionGraphView
-
Methods inherited from interface net.automatalib.ts.UniversalTransitionSystem
getStateProperty
-
-
-
-
Method Detail
-
getTransition
public @Nullable CompactTransition<TP> getTransition(int state, int input)
Description copied from interface:DeterministicAutomaton.FullIntAbstractionRetrieves the outgoing transition for an (abstracted) source state and (abstracted) input symbol, or returnsnullif the automaton has no transition for this state and input.- Parameters:
state- the integer representing the source stateinput- the integer representing the input symbol- Returns:
- the outgoing transition, or
null
-
getIntSuccessor
public int getIntSuccessor(CompactTransition<TP> transition)
Description copied from interface:DeterministicAutomaton.IntAbstractionRetrieves the (abstracted) successor of a transition object.- Parameters:
transition- the transition object- Returns:
- the integer representing the successor of the given transition
-
setStateProperty
public void setStateProperty(int state, SP property)- Specified by:
setStatePropertyin interfaceMutableDeterministic.IntAbstraction<I,SP,TP>- Specified by:
setStatePropertyin classAbstractCompact<I,CompactTransition<TP>,SP,TP>
-
setTransitionProperty
public void setTransitionProperty(CompactTransition<TP> transition, TP property)
-
createTransition
public CompactTransition<TP> createTransition(int successor, TP property)
-
removeAllTransitions
public void removeAllTransitions(Integer state)
-
setTransition
public void setTransition(int state, int input, @Nullable CompactTransition<TP> transition)
-
setTransition
public void setTransition(int state, int input, int successor, @Nullable TP property)
-
getStateProperty
public SP getStateProperty(int state)
Description copied from interface:UniversalDeterministicAutomaton.IntAbstractionRetrieves the state property of a given (abstracted) state.- Specified by:
getStatePropertyin interfaceUniversalDeterministicAutomaton.IntAbstraction<I,SP,TP>- Specified by:
getStatePropertyin classAbstractCompact<I,CompactTransition<TP>,SP,TP>- Parameters:
state- the integer representing the state of which to retrieve the property- Returns:
- the property for the given state
-
getTransitionProperty
public TP getTransitionProperty(CompactTransition<TP> transition)
Description copied from interface:UniversalTransitionSystemRetrieves the transition property for the given state.- Parameters:
transition- the transition.- Returns:
- the corresponding property.
-
clear
public void clear()
Description copied from interface:MutableAutomatonRemoves all states and transitions.- Specified by:
clearin interfaceMutableAutomaton<Integer,I,CompactTransition<TP>,SP,TP>- Overrides:
clearin classAbstractCompactDeterministic<I,CompactTransition<TP>,SP,TP>
-
updateStateStorage
protected void updateStateStorage(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 state data, e.g. due to calls toMutableAutomaton.addState().Subclasses may use one of the
AbstractCompact.updateStateStorage(Object[], 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:
updateStateStoragein classAbstractCompact<I,CompactTransition<TP>,SP,TP>- Parameters:
payload- the payload containing the necessary information for the update operation. This object must be passed as-is to theAbstractCompact.updateStateStorage(Object[], Object, Payload)... methods.
-
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,CompactTransition<TP>,SP,TP>- 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.
-
-