I
- input symbol typeSP
- state property type@ParametersAreNonnullByDefault public abstract class AbstractCompactSimpleNondet<I,SP> extends AbstractCompact<I,Integer,SP,Void>
AbstractCompact
for transition-property-less automata. As a result,
transitions may be represented as integers (where a transition object effectively is the successor).AbstractCompact.Payload
Modifier and Type | Field and Description |
---|---|
protected Set<Integer> |
initial |
protected Set<Integer>[] |
transitions |
DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, INVALID_STATE
Modifier | Constructor and Description |
---|---|
protected |
AbstractCompactSimpleNondet(Alphabet<I> alphabet,
AbstractCompactSimpleNondet<?,?> other) |
|
AbstractCompactSimpleNondet(Alphabet<I> alphabet,
int stateCapacity,
float resizeFactor) |
Modifier and Type | Method and Description |
---|---|
void |
addTransition(Integer state,
I input,
Integer transition) |
void |
addTransition(int stateId,
I input,
int succId) |
void |
addTransition(int stateId,
int inputIdx,
int succId) |
void |
clear()
Removes all states and transitions.
|
Integer |
copyTransition(Integer trans,
Integer succ) |
Integer |
createTransition(Integer successor,
Void properties) |
Set<Integer> |
getInitialStates()
Retrieves the set of initial states of the transition system.
|
Integer |
getSuccessor(Integer transition)
Retrieves the successor state of a given transition.
|
Void |
getTransitionProperty(Integer transition)
Retrieves the transition property for the given state.
|
Collection<Integer> |
getTransitions(Integer state,
I input)
Retrieves the transitions that can be triggered by the given input symbol.
|
Set<Integer> |
getTransitions(int state,
I input) |
Set<Integer> |
getTransitions(int state,
int inputIdx) |
void |
removeAllTransitions(int state) |
void |
removeAllTransitions(Integer state) |
void |
removeAllTransitions(Integer state,
I input) |
void |
removeAllTransitions(int stateId,
I input) |
void |
removeAllTransitions(int stateId,
int inputIdx) |
void |
removeTransition(Integer state,
I input,
Integer transition) |
void |
removeTransition(int stateId,
I input,
int successorId) |
void |
removeTransition(int stateId,
int inputIdx,
int successorId) |
void |
setInitial(int state,
boolean initial) |
void |
setInitial(Integer state,
boolean initial) |
void |
setTransitionProperty(Integer transition,
Void property) |
void |
setTransitions(Integer state,
I input,
Collection<? extends Integer> transitions) |
void |
setTransitions(int state,
I input,
Collection<? extends Integer> successors) |
void |
setTransitions(int state,
int inputIdx,
Collection<? extends Integer> successors) |
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 to
MutableAutomaton.addState() or AbstractCompact.addAlphabetSymbol(Object) . |
addAlphabetSymbol, addIntState, addState, getInputAlphabet, getLocalInputs, getState, getStateId, getStates, getSymbolIndex, numInputs, setStateProperty, size, stateIDs, toId, toMemoryIndex, toState, updateStateStorage, updateStateStorage, updateTransitionStorage, updateTransitionStorage, updateTransitionStorage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addInitialState, addInitialState, addState, addTransition, addTransitions, setStateProperty
transitionGraphView
transitionGraphView
getStateProperty
graphView
getSuccessors, powersetView
createStaticStateMapping, iterator
createDynamicStateMapping, getStates, getSuccessors, getSuccessors
forEach, spliterator
public AbstractCompactSimpleNondet(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)
protected AbstractCompactSimpleNondet(Alphabet<I> alphabet, AbstractCompactSimpleNondet<?,?> other)
protected void updateTransitionStorage(AbstractCompact.Payload payload)
AbstractCompact
MutableAutomaton.addState()
or AbstractCompact.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.
updateTransitionStorage
in class AbstractCompact<I,Integer,SP,Void>
payload
- the payload containing the necessary information for the update operation. This object must be passed
as-is to the AbstractCompact.updateTransitionStorage(Object[], IntFunction, Object, Payload)
... methods.public Void getTransitionProperty(Integer transition)
UniversalTransitionSystem
transition
- the transition.public void setInitial(Integer state, boolean initial)
public void setInitial(int state, boolean initial)
public void clear()
MutableAutomaton
public void removeTransition(int stateId, I input, int successorId)
public void removeTransition(int stateId, int inputIdx, int successorId)
public void removeAllTransitions(int stateId, I input)
public void removeAllTransitions(int stateId, int inputIdx)
public void removeAllTransitions(Integer state)
public void removeAllTransitions(int state)
public void addTransition(int stateId, I input, int succId)
public void addTransition(int stateId, int inputIdx, int succId)
public void setTransitions(Integer state, I input, Collection<? extends Integer> transitions)
public void setTransitions(int state, I input, Collection<? extends Integer> successors)
public void setTransitions(int state, int inputIdx, Collection<? extends Integer> successors)
public Integer getSuccessor(Integer transition)
TransitionSystem
transition
- the transition.public Collection<Integer> getTransitions(Integer state, I input)
TransitionSystem
The return value must not be null
; if there are no transitions triggered by the specified input, Collections.emptySet()
should be returned.
state
- the source state.input
- the input symbol.Copyright © 2019. All rights reserved.