public abstract class AbstractCompactSimpleNondet<I,SP> extends Object implements MutableAutomaton<Integer,I,Integer,SP,Void>, UniversalFiniteAlphabetAutomaton<Integer,I,Integer,SP,Void>, StateIDs<Integer>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INIT_CAPACITY |
static float |
DEFAULT_RESIZE_FACTOR |
static TIntSet |
EMPTY_SET |
Constructor and Description |
---|
AbstractCompactSimpleNondet(Alphabet<I> alphabet) |
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 |
---|---|
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<? extends Integer> |
getInitialStates()
Retrieves the set of initial states of the transition system.
|
Alphabet<I> |
getInputAlphabet() |
TIntCollection |
getIntInitialStates() |
TIntCollection |
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<? extends Integer> |
getTransitions(Integer state,
I input)
Retrieves the transitions that can be triggered by the given
input symbol.
|
TIntSet |
getTransitions(int state,
I input) |
TIntSet |
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,
int inputIdx,
TIntCollection successors) |
void |
setTransitions(int state,
I input,
TIntCollection successors) |
int |
size()
Retrieves the size (number of states) of this transition system.
|
StateIDs<Integer> |
stateIDs() |
protected TIntSet |
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 TIntSet EMPTY_SET
public static final float DEFAULT_RESIZE_FACTOR
public static final int DEFAULT_INIT_CAPACITY
public AbstractCompactSimpleNondet(Alphabet<I> alphabet, int stateCapacity)
public AbstractCompactSimpleNondet(Alphabet<I> alphabet, float resizeFactor)
public void ensureCapacity(int newCapacity)
protected void ensureCapacity(int oldCap, int newCap)
public Alphabet<I> getInputAlphabet()
getInputAlphabet
in interface InputAlphabetHolder<I>
public int size()
SimpleAutomaton
size
in interface SimpleAutomaton<Integer,I>
public Collection<Integer> getStates()
SimpleAutomaton
getStates
in interface SimpleAutomaton<Integer,I>
public int getStateId(Integer state)
getStateId
in interface StateIDs<Integer>
public TIntCollection getIntInitialStates()
public TIntCollection getIntTransitions(int state, I input)
public void removeAllTransitions(int state)
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 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 void removeAllTransitions(Integer state)
removeAllTransitions
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public Integer copyTransition(Integer trans, Integer succ)
copyTransition
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public Integer getSuccessor(Integer transition)
TransitionSystem
getSuccessor
in interface TransitionSystem<Integer,I,Integer>
transition
- the transition.public abstract SP getStateProperty(int stateId)
public SP getStateProperty(Integer state)
UniversalTransitionSystem
getStateProperty
in interface UniversalTransitionSystem<Integer,I,Integer,SP,Void>
state
- the state.public Void getTransitionProperty(Integer transition)
UniversalTransitionSystem
getTransitionProperty
in interface UniversalTransitionSystem<Integer,I,Integer,SP,Void>
transition
- the transition.protected abstract void initState(int stateId, SP property)
public int addIntState(SP property)
public int addIntState()
public int addIntInitialState(SP property)
public int addIntInitialState()
public Integer addState(SP property)
MutableAutomaton
public abstract void setStateProperty(int stateId, SP property)
public void setStateProperty(Integer state, SP property)
setStateProperty
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public void setTransitionProperty(Integer transition, Void property)
setTransitionProperty
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public Integer createTransition(Integer successor, Void properties)
createTransition
in interface MutableAutomaton<Integer,I,Integer,SP,Void>
public StateIDs<Integer> stateIDs()
stateIDs
in interface SimpleAutomaton<Integer,I>
protected TIntSet successors(int transId)
protected static Integer wrapState(int id)
public void clear()
MutableAutomaton
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 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, TIntCollection successors)
public void setTransitions(int state, int inputIdx, TIntCollection successors)
public Collection<? extends 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 TIntSet getTransitions(int state, int inputIdx)
Copyright © 2015. All rights reserved.