public abstract class AbstractCompactSimpleNondet<I,SP> extends Object implements MutableAutomaton<Integer,I,Integer,SP,Void>, UniversalFiniteAlphabetAutomaton<Integer,I,Integer,SP,Void>, StateIDs<Integer>, GrowableAlphabetAutomaton<I>
Modifier and Type | Field and Description |
---|---|
protected Alphabet<I> |
alphabet |
protected int |
alphabetSize |
static int |
DEFAULT_INIT_CAPACITY |
static float |
DEFAULT_RESIZE_FACTOR |
protected Set<Integer> |
initial |
protected int |
numStates |
protected int |
stateCapacity |
protected Set<Integer>[] |
transitions |
Modifier | Constructor and Description |
---|---|
|
AbstractCompactSimpleNondet(Alphabet<I> alphabet) |
protected |
AbstractCompactSimpleNondet(Alphabet<I> alphabet,
AbstractCompactSimpleNondet<?,?> other) |
|
AbstractCompactSimpleNondet(Alphabet<I> alphabet,
float resizeFactor) |
|
AbstractCompactSimpleNondet(Alphabet<I> alphabet,
int stateCapacity) |
|
AbstractCompactSimpleNondet(Alphabet<I> alphabet,
int stateCapacity,
float resizeFactor) |
Modifier and Type | Method and Description |
---|---|
void |
addAlphabetSymbol(I symbol)
Adds a new symbol to the alphabet of the automaton.
|
int |
addIntInitialState() |
int |
addIntInitialState(SP property) |
int |
addIntState() |
int |
addIntState(SP property) |
Integer |
addState(SP property)
Adds a state to the automaton.
|
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) |
void |
ensureCapacity(int newCapacity) |
protected void |
ensureCapacity(int oldCap,
int newCap) |
Set<Integer> |
getInitialStates()
Retrieves the set of initial states of the transition system.
|
Alphabet<I> |
getInputAlphabet() |
Set<Integer> |
getIntInitialStates() |
Set<Integer> |
getIntTransitions(int state,
I input) |
Integer |
getState(int id) |
int |
getStateId(Integer state) |
abstract SP |
getStateProperty(int stateId) |
SP |
getStateProperty(Integer state)
Retrieves the state property for the given state.
|
Collection<Integer> |
getStates()
Retrieves all 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) |
protected abstract void |
initState(int stateId,
SP property) |
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 |
setStateProperty(Integer state,
SP property) |
abstract void |
setStateProperty(int stateId,
SP property) |
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) |
int |
size()
Retrieves the size (number of states) of this transition system.
|
StateIDs<Integer> |
stateIDs() |
protected Set<Integer> |
successors(int transId) |
protected static Integer |
wrapState(int id) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addInitialState, addInitialState, addState, addTransition, addTransitions
transitionGraphView
transitionGraphView
graphView
getSuccessors, powersetView
createStaticStateMapping, iterator
createDynamicStateMapping, getStates, getSuccessors, getSuccessors
forEach, spliterator
public static final float DEFAULT_RESIZE_FACTOR
public static final int DEFAULT_INIT_CAPACITY
protected int alphabetSize
protected int stateCapacity
protected int numStates
public AbstractCompactSimpleNondet(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)
public AbstractCompactSimpleNondet(Alphabet<I> alphabet, int stateCapacity)
public AbstractCompactSimpleNondet(Alphabet<I> alphabet, float resizeFactor)
protected AbstractCompactSimpleNondet(Alphabet<I> alphabet, AbstractCompactSimpleNondet<?,?> other)
protected static Integer wrapState(int id)
public Alphabet<I> getInputAlphabet()
getInputAlphabet
in interface InputAlphabetHolder<I>
public Collection<Integer> getStates()
SimpleAutomaton
getStates
in interface SimpleAutomaton<Integer,I>
public StateIDs<Integer> stateIDs()
stateIDs
in interface SimpleAutomaton<Integer,I>
public int size()
SimpleAutomaton
size
in interface SimpleAutomaton<Integer,I>
public int getStateId(Integer state)
getStateId
in interface StateIDs<Integer>
public SP getStateProperty(Integer state)
UniversalTransitionSystem
getStateProperty
in interface UniversalTransitionSystem<Integer,I,Integer,SP,Void>
state
- the state.public abstract SP getStateProperty(int stateId)
public Void getTransitionProperty(Integer transition)
UniversalTransitionSystem
getTransitionProperty
in interface UniversalTransitionSystem<Integer,I,Integer,SP,Void>
transition
- the transition.public int addIntState()
public int addIntState(SP property)
public void ensureCapacity(int newCapacity)
protected void ensureCapacity(int oldCap, int newCap)
protected abstract void initState(int stateId, SP property)
public int addIntInitialState()
public int addIntInitialState(SP property)
public void setInitial(Integer state, boolean initial)
setInitial
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void setInitial(int state, boolean initial)
public void clear()
MutableAutomaton
public Integer addState(SP property)
MutableAutomaton
public void setStateProperty(Integer state, SP property)
setStateProperty
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public abstract void setStateProperty(int stateId, SP property)
public void setTransitionProperty(Integer transition, Void property)
setTransitionProperty
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void removeTransition(Integer state, I input, Integer transition)
removeTransition
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void removeTransition(int stateId, I input, int successorId)
public void removeTransition(int stateId, int inputIdx, int successorId)
public void removeAllTransitions(Integer state, I input)
removeAllTransitions
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void removeAllTransitions(int stateId, I input)
public void removeAllTransitions(int stateId, int inputIdx)
public void removeAllTransitions(Integer state)
removeAllTransitions
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void removeAllTransitions(int state)
public Integer createTransition(Integer successor, Void properties)
createTransition
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void addTransition(Integer state, I input, Integer transition)
addTransition
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void addTransition(int stateId, I input, int succId)
public void addTransition(int stateId, int inputIdx, int succId)
public Integer copyTransition(Integer trans, Integer succ)
copyTransition
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void setTransitions(Integer state, I input, Collection<? extends Integer> transitions)
setTransitions
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
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
getSuccessor
in interface TransitionSystem<Integer,I,Integer>
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.
getTransitions
in interface TransitionSystem<Integer,I,Integer>
state
- the source state.input
- the input symbol.public Set<Integer> getInitialStates()
SimpleTS
getInitialStates
in interface SimpleTS<Integer,I>
public void addAlphabetSymbol(I symbol)
GrowableAlphabetAutomaton
addAlphabetSymbol
in interface GrowableAlphabetAutomaton<I>
symbol
- The symbol to add to the alphabet.Copyright © 2018. All rights reserved.