Class CompactMealy<I,O>
- java.lang.Object
-
- net.automatalib.automaton.base.AbstractCompact<I,T,SP,TP>
-
- net.automatalib.automaton.base.AbstractCompactDeterministic<I,CompactTransition<O>,Void,O>
-
- net.automatalib.automaton.transducer.CompactMealy<I,O>
-
- All Implemented Interfaces:
Iterable<Integer>
,SupportsGrowingAlphabet<I>
,Automaton<Integer,I,CompactTransition<O>>
,DetOutputAutomaton<Integer,I,CompactTransition<O>,Word<O>>
,DetSuffixOutputAutomaton<Integer,I,CompactTransition<O>,Word<O>>
,FiniteRepresentation
,InputAlphabetHolder<I>
,MutableTransitionOutput<CompactTransition<O>,O>
,Output<I,Word<O>>
,OutputAutomaton<Integer,I,CompactTransition<O>,Word<O>>
,StateIDs<Integer>
,StateLocalInput<Integer,I>
,SuffixOutput<I,Word<O>>
,TransitionOutput<CompactTransition<O>,O>
,DeterministicAutomaton<Integer,I,CompactTransition<O>>
,DeterministicAutomaton.FullIntAbstraction<CompactTransition<O>>
,DeterministicAutomaton.IntAbstraction<CompactTransition<O>>
,DeterministicAutomaton.StateIntAbstraction<I,CompactTransition<O>>
,FiniteAlphabetAutomaton<Integer,I,CompactTransition<O>>
,MutableAutomaton<Integer,I,CompactTransition<O>,Void,O>
,MutableDeterministic<Integer,I,CompactTransition<O>,Void,O>
,MutableDeterministic.FullIntAbstraction<CompactTransition<O>,Void,O>
,MutableDeterministic.IntAbstraction<CompactTransition<O>,Void,O>
,MutableDeterministic.StateIntAbstraction<I,CompactTransition<O>,Void,O>
,SimpleAutomaton<Integer,I>
,SimpleDeterministicAutomaton<Integer,I>
,SimpleDeterministicAutomaton.FullIntAbstraction
,SimpleDeterministicAutomaton.IntAbstraction
,SimpleDeterministicAutomaton.StateIntAbstraction<I>
,MealyMachine<Integer,I,CompactTransition<O>,O>
,MutableMealyMachine<Integer,I,CompactTransition<O>,O>
,StateLocalInputMealyMachine<Integer,I,CompactTransition<O>,O>
,TransitionOutputAutomaton<Integer,I,CompactTransition<O>,O>
,UniversalAutomaton<Integer,I,CompactTransition<O>,Void,O>
,UniversalDeterministicAutomaton<Integer,I,CompactTransition<O>,Void,O>
,UniversalDeterministicAutomaton.FullIntAbstraction<CompactTransition<O>,Void,O>
,UniversalDeterministicAutomaton.IntAbstraction<CompactTransition<O>,Void,O>
,UniversalDeterministicAutomaton.StateIntAbstraction<I,CompactTransition<O>,Void,O>
,UniversalFiniteAlphabetAutomaton<Integer,I,CompactTransition<O>,Void,O>
,GraphViewable
,DeterministicTransitionSystem<Integer,I,CompactTransition<O>>
,DeterministicOutputTS<Integer,I,CompactTransition<O>,O>
,DeterministicTransitionOutputTS<Integer,I,CompactTransition<O>,O>
,MealyTransitionSystem<Integer,I,CompactTransition<O>,O>
,SimpleDTS<Integer,I>
,SimpleTS<Integer,I>
,TransitionSystem<Integer,I,CompactTransition<O>>
,UniversalDTS<Integer,I,CompactTransition<O>,Void,O>
,UniversalTransitionSystem<Integer,I,CompactTransition<O>,Void,O>
public class CompactMealy<I,O> extends AbstractCompactDeterministic<I,CompactTransition<O>,Void,O> implements MutableMealyMachine<Integer,I,CompactTransition<O>,O>, StateLocalInputMealyMachine<Integer,I,CompactTransition<O>,O>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompactMealy.Creator<I,O>
-
Nested classes/interfaces inherited from class net.automatalib.automaton.base.AbstractCompact
AbstractCompact.Payload
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.DeterministicAutomaton
DeterministicAutomaton.FullIntAbstraction<T>, DeterministicAutomaton.IntAbstraction<T>, DeterministicAutomaton.StateIntAbstraction<I,T>
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.transducer.MealyMachine
MealyMachine.MealyGraphView<S,I,T,O,A extends MealyMachine<S,I,T,O>>
-
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>
-
Nested classes/interfaces inherited from interface net.automatalib.automaton.UniversalDeterministicAutomaton
UniversalDeterministicAutomaton.FullIntAbstraction<T,SP,TP>, UniversalDeterministicAutomaton.IntAbstraction<T,SP,TP>, UniversalDeterministicAutomaton.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 CompactMealy(Alphabet<I> alphabet)
CompactMealy(Alphabet<I> alphabet, int stateCapacity)
CompactMealy(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)
protected
CompactMealy(Alphabet<I> alphabet, CompactMealy<?,O> other)
CompactMealy(CompactMealy<I,O> other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all states and transitions.CompactTransition<O>
createTransition(int succId, O property)
int
getIntSuccessor(CompactTransition<O> transition)
Retrieves the (abstracted) successor of a transition object.Void
getStateProperty(int stateId)
Retrieves the state property of a given (abstracted) state.@Nullable CompactTransition<O>
getTransition(int state, int input)
Retrieves the outgoing transition for an (abstracted) source state and (abstracted) input symbol, or returnsnull
if the automaton has no transition for this state and input.O
getTransitionOutput(CompactTransition<O> transition)
O
getTransitionProperty(CompactTransition<O> transition)
Retrieves the transition property for the given state.void
removeAllTransitions(Integer state)
void
setStateProperty(int state, Void property)
void
setTransition(int state, int input, int successor, @Nullable O property)
void
setTransition(int state, int input, @Nullable CompactTransition<O> transition)
void
setTransitionOutput(CompactTransition<O> transition, O output)
void
setTransitionProperty(CompactTransition<O> transition, O property)
protected void
updateTransitionStorage(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, getStateProperty, getSuccessor, getTransition, getTransition, powersetView, setInitialState, setInitialState, setStateProperty, setTransition, setTransition, setTransition, stateIntAbstraction
-
Methods inherited from class net.automatalib.automaton.base.AbstractCompact
addAlphabetSymbol, addIntState, addState, getInputAlphabet, 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.DeterministicAutomaton.FullIntAbstraction
getSuccessor
-
Methods inherited from interface net.automatalib.automaton.DeterministicAutomaton.StateIntAbstraction
getSuccessor
-
Methods inherited from interface net.automatalib.ts.output.DeterministicOutputTS
trace
-
Methods inherited from interface net.automatalib.ts.output.DeterministicTransitionOutputTS
getOutput, trace
-
Methods inherited from interface net.automatalib.ts.DeterministicTransitionSystem
getSuccessor, getSuccessors, getTransition, getTransitions
-
Methods inherited from interface net.automatalib.automaton.concept.DetSuffixOutputAutomaton
computeOutput, computeSuffixOutput
-
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.transducer.MealyMachine
transitionGraphView
-
Methods inherited from interface net.automatalib.ts.output.MealyTransitionSystem
getStateProperty
-
Methods inherited from interface net.automatalib.automaton.MutableAutomaton
addInitialState, addInitialState, addState, addState, addTransition, addTransitions, copyTransition, createTransition
-
Methods inherited from interface net.automatalib.automaton.MutableDeterministic
addTransition, fullIntAbstraction, fullIntAbstraction, removeAllTransitions, removeTransition, setInitial, setInitialState, setTransition, setTransition, setTransitions, stateIntAbstraction
-
Methods inherited from interface net.automatalib.automaton.MutableDeterministic.IntAbstraction
addIntInitialState, addIntState, addIntState
-
Methods inherited from interface net.automatalib.automaton.transducer.MutableMealyMachine
setStateProperty
-
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
getInitialState, getInitialStates, getState, getStates, getSuccessor, getSuccessors, getSuccessors
-
Methods inherited from interface net.automatalib.ts.simple.SimpleTS
getSuccessors
-
Methods inherited from interface net.automatalib.automaton.concept.StateLocalInput
getLocalInputs
-
Methods inherited from interface net.automatalib.automaton.transducer.TransitionOutputAutomaton
computeStateOutput
-
Methods inherited from interface net.automatalib.ts.TransitionSystem
getSuccessor, powersetView
-
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
-
-
-
-
Constructor Detail
-
CompactMealy
public CompactMealy(CompactMealy<I,O> other)
-
CompactMealy
protected CompactMealy(Alphabet<I> alphabet, CompactMealy<?,O> other)
-
-
Method Detail
-
updateTransitionStorage
protected void updateTransitionStorage(AbstractCompact.Payload payload)
Description copied from class:AbstractCompact
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)
.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:
updateTransitionStorage
in classAbstractCompact<I,CompactTransition<O>,Void,O>
- 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.
-
getTransitionOutput
public O getTransitionOutput(CompactTransition<O> transition)
- Specified by:
getTransitionOutput
in interfaceTransitionOutput<I,O>
-
getTransitionProperty
public O getTransitionProperty(CompactTransition<O> transition)
Description copied from interface:UniversalTransitionSystem
Retrieves the transition property for the given state.- Specified by:
getTransitionProperty
in interfaceMealyTransitionSystem<Integer,I,CompactTransition<O>,O>
- Specified by:
getTransitionProperty
in interfaceUniversalDeterministicAutomaton.IntAbstraction<CompactTransition<O>,Void,O>
- Specified by:
getTransitionProperty
in interfaceUniversalTransitionSystem<Integer,I,CompactTransition<O>,Void,O>
- Parameters:
transition
- the transition.- Returns:
- the corresponding property.
-
setTransitionProperty
public void setTransitionProperty(CompactTransition<O> transition, O property)
- Specified by:
setTransitionProperty
in interfaceMutableAutomaton<Integer,I,CompactTransition<O>,Void,O>
- Specified by:
setTransitionProperty
in interfaceMutableDeterministic.IntAbstraction<CompactTransition<O>,Void,O>
- Specified by:
setTransitionProperty
in interfaceMutableMealyMachine<Integer,I,CompactTransition<O>,O>
-
setTransitionOutput
public void setTransitionOutput(CompactTransition<O> transition, O output)
- Specified by:
setTransitionOutput
in interfaceMutableTransitionOutput<I,O>
-
removeAllTransitions
public void removeAllTransitions(Integer state)
- Specified by:
removeAllTransitions
in interfaceMutableAutomaton<Integer,I,CompactTransition<O>,Void,O>
-
getIntSuccessor
public int getIntSuccessor(CompactTransition<O> transition)
Description copied from interface:DeterministicAutomaton.IntAbstraction
Retrieves the (abstracted) successor of a transition object.- Specified by:
getIntSuccessor
in interfaceDeterministicAutomaton.IntAbstraction<I>
- Parameters:
transition
- the transition object- Returns:
- the integer representing the successor of the given transition
-
createTransition
public CompactTransition<O> createTransition(int succId, O property)
- Specified by:
createTransition
in interfaceMutableDeterministic.IntAbstraction<CompactTransition<O>,Void,O>
-
setStateProperty
public void setStateProperty(int state, Void property)
- Specified by:
setStateProperty
in interfaceMutableDeterministic.IntAbstraction<CompactTransition<O>,Void,O>
- Specified by:
setStateProperty
in classAbstractCompact<I,CompactTransition<O>,Void,O>
-
getStateProperty
public Void getStateProperty(int stateId)
Description copied from interface:UniversalDeterministicAutomaton.IntAbstraction
Retrieves the state property of a given (abstracted) state.- Specified by:
getStateProperty
in interfaceUniversalDeterministicAutomaton.IntAbstraction<CompactTransition<O>,Void,O>
- Parameters:
stateId
- the integer representing the state of which to retrieve the property- Returns:
- the property for the given state
-
setTransition
public void setTransition(int state, int input, @Nullable CompactTransition<O> transition)
- Specified by:
setTransition
in interfaceMutableDeterministic.FullIntAbstraction<CompactTransition<O>,Void,O>
-
setTransition
public void setTransition(int state, int input, int successor, @Nullable O property)
- Specified by:
setTransition
in interfaceMutableDeterministic.FullIntAbstraction<CompactTransition<O>,Void,O>
-
clear
public void clear()
Description copied from interface:MutableAutomaton
Removes all states and transitions.- Specified by:
clear
in interfaceMutableAutomaton<Integer,I,CompactTransition<O>,Void,O>
- Overrides:
clear
in classAbstractCompactDeterministic<I,CompactTransition<O>,Void,O>
-
getTransition
public @Nullable CompactTransition<O> getTransition(int state, int input)
Description copied from interface:DeterministicAutomaton.FullIntAbstraction
Retrieves the outgoing transition for an (abstracted) source state and (abstracted) input symbol, or returnsnull
if the automaton has no transition for this state and input.- Specified by:
getTransition
in interfaceDeterministicAutomaton.FullIntAbstraction<I>
- Parameters:
state
- the integer representing the source stateinput
- the integer representing the input symbol- Returns:
- the outgoing transition, or
null
-
-