public abstract class AbstractCompactSimpleDet<I,SP> extends AbstractMutableDeterministic<Integer,I,Integer,SP,Void> implements UniversalGraph<Integer,TransitionEdge<I,Integer>,SP,TransitionEdge.Property<I,Void>>, FiniteAlphabetAutomaton<Integer,I,Integer>, StateIDs<Integer>, NodeIDs<Integer>, DOTPlottableGraph<Integer,TransitionEdge<I,Integer>>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INIT_CAPACITY |
static float |
DEFAULT_RESIZE_FACTOR |
Constructor and Description |
---|
AbstractCompactSimpleDet(Alphabet<I> alphabet) |
AbstractCompactSimpleDet(Alphabet<I> alphabet,
float resizeFactor) |
AbstractCompactSimpleDet(Alphabet<I> alphabet,
int stateCapacity) |
AbstractCompactSimpleDet(Alphabet<I> alphabet,
int stateCapacity,
float resizeFactor) |
Modifier and Type | Method and Description |
---|---|
int |
addIntState(SP property) |
Integer |
addState(SP property)
Adds a state to the automaton.
|
void |
clear()
Removes all states and transitions.
|
Integer |
copyTransition(Integer trans,
Integer succ) |
<V> MutableMapping<Integer,V> |
createDynamicNodeMapping() |
<V> MutableMapping<Integer,V> |
createStaticNodeMapping() |
Integer |
createTransition(Integer successor,
Void properties) |
void |
ensureCapacity(int newCapacity) |
protected void |
ensureCapacity(int oldCap,
int newCap) |
TransitionEdge.Property<I,Void> |
getEdgeProperty(TransitionEdge<I,Integer> edge)
Retrieves the property of a given edge.
|
GraphDOTHelper<Integer,TransitionEdge<I,Integer>> |
getGraphDOTHelper() |
Integer |
getInitialState()
Retrieves the initial state of this transition system.
|
Alphabet<I> |
getInputAlphabet() |
Integer |
getNode(int id) |
int |
getNodeId(Integer node) |
SP |
getNodeProperty(Integer node)
Retrieves the property of a given node.
|
Collection<Integer> |
getNodes()
Retrieves an (unmodifiable) collection of the nodes in this graph.
|
Collection<TransitionEdge<I,Integer>> |
getOutgoingEdges(Integer node)
Retrieves the outgoing edges of a given node.
|
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.
|
Integer |
getTarget(TransitionEdge<I,Integer> edge)
Retrieves, for a given edge, its target node.
|
Integer |
getTransition(Integer state,
I input)
Retrieves the transition triggered by the given input symbol.
|
Void |
getTransitionProperty(Integer transition)
Retrieves the transition property for the given state.
|
abstract void |
initState(int stateId,
SP property) |
NodeIDs<Integer> |
nodeIDs() |
void |
removeAllTransitions(int state) |
void |
removeAllTransitions(Integer state) |
void |
setInitialState(int state) |
void |
setInitialState(Integer state)
Sets the initial state to the given state
|
void |
setStateProperty(Integer state,
SP property) |
abstract void |
setStateProperty(int stateId,
SP property) |
void |
setTransition(Integer state,
I input,
Integer transition)
Sets the transition for the given state and input symbol.
|
void |
setTransition(int state,
I input,
int succ) |
void |
setTransition(int state,
int inputIdx,
int succ) |
void |
setTransitionProperty(Integer transition,
Void property) |
int |
size()
Retrieves the size (number of states) of this transition system.
|
StateIDs<Integer> |
stateIDs() |
addInitialState, addInitialState, addState, addTransition, addTransition, addTransition, addTransitions, removeAllTransitions, removeAllTransitions, removeTransition, removeTransition, setInitial, setInitial, setTransition, setTransition, setTransitions, setTransitions
iterator
getInitialStates, getInitialStates, getState, getState, getSuccessor, getSuccessor, getSuccessor, getSuccessor, getTransitions, getTransitions
createDynamicStateMapping, createDynamicStateMapping, createStaticStateMapping, createStaticStateMapping, getStates, getStates, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, powersetView, powersetView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTransitions, powersetView
createDynamicStateMapping, createStaticStateMapping, getInitialStates, getStates, getSuccessors, getSuccessors, getSuccessors
forEach, iterator, spliterator
getState, getSuccessor, getSuccessor
public static final float DEFAULT_RESIZE_FACTOR
public static final int DEFAULT_INIT_CAPACITY
public AbstractCompactSimpleDet(Alphabet<I> alphabet)
public AbstractCompactSimpleDet(Alphabet<I> alphabet, int stateCapacity)
public AbstractCompactSimpleDet(Alphabet<I> alphabet, float resizeFactor)
public AbstractCompactSimpleDet(Alphabet<I> alphabet, int stateCapacity, 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>
size
in interface Graph<Integer,TransitionEdge<I,Integer>>
size
in class AbstractDeterministicAutomaton<Integer,I,Integer>
public Collection<Integer> getStates()
SimpleAutomaton
getStates
in interface SimpleAutomaton<Integer,I>
public int getStateId(Integer state)
getStateId
in interface StateIDs<Integer>
public Integer getInitialState()
SimpleDTS
getInitialState
in interface SimpleDTS<Integer,I>
SimpleTS.getInitialStates()
public Integer getTransition(Integer state, I input)
DeterministicTransitionSystem
getTransition
in interface DeterministicTransitionSystem<Integer,I,Integer>
state
- the source state.input
- the input symbol.null
if no transition is triggered.TransitionSystem.getTransitions(Object, Object)
public void setInitialState(int state)
public void setInitialState(Integer state)
MutableDeterministic
setInitialState
in interface MutableDeterministic<Integer,I,Integer,SP,Void>
state
- the new initial statepublic void setTransition(int state, int inputIdx, int succ)
public void setTransition(int state, I input, int succ)
public void setTransition(Integer state, I input, Integer transition)
MutableDeterministic
setTransition
in interface MutableDeterministic<Integer,I,Integer,SP,Void>
state
- the source stateinput
- the triggering input symboltransition
- the transitionpublic void clear()
MutableAutomaton
public void removeAllTransitions(int state)
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.public int addIntState(SP property)
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>
stateIDs
in class AbstractDeterministicAutomaton<Integer,I,Integer>
public SP getNodeProperty(Integer node)
UniversalIndefiniteGraph
getNodeProperty
in interface UniversalIndefiniteGraph<Integer,TransitionEdge<I,Integer>,SP,TransitionEdge.Property<I,Void>>
node
- the nodepublic TransitionEdge.Property<I,Void> getEdgeProperty(TransitionEdge<I,Integer> edge)
UniversalIndefiniteGraph
getEdgeProperty
in interface UniversalIndefiniteGraph<Integer,TransitionEdge<I,Integer>,SP,TransitionEdge.Property<I,Void>>
edge
- the edgepublic Collection<TransitionEdge<I,Integer>> getOutgoingEdges(Integer node)
IndefiniteGraph
getOutgoingEdges
in interface IndefiniteGraph<Integer,TransitionEdge<I,Integer>>
node
- the node.Collection
of all outgoing edges, or null
if
the node has no outgoing edges.public Integer getTarget(TransitionEdge<I,Integer> edge)
IndefiniteGraph
getTarget
in interface IndefiniteGraph<Integer,TransitionEdge<I,Integer>>
edge
- the edge.public <V> MutableMapping<Integer,V> createStaticNodeMapping()
createStaticNodeMapping
in interface IndefiniteGraph<Integer,TransitionEdge<I,Integer>>
public <V> MutableMapping<Integer,V> createDynamicNodeMapping()
createDynamicNodeMapping
in interface IndefiniteGraph<Integer,TransitionEdge<I,Integer>>
public Collection<Integer> getNodes()
Graph
public GraphDOTHelper<Integer,TransitionEdge<I,Integer>> getGraphDOTHelper()
getGraphDOTHelper
in interface DOTPlottableGraph<Integer,TransitionEdge<I,Integer>>
Copyright © 2015. All Rights Reserved.