public class CompactDFA<I> extends AbstractCompactSimpleDet<I,Boolean> implements MutableDFA<Integer,I>, DOTPlottableAutomaton<Integer,I,Integer>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INIT_CAPACITY |
static float |
DEFAULT_RESIZE_FACTOR |
STATE_PROPERTIES, TRANSITION_PROPERTIES
Constructor and Description |
---|
CompactDFA(Alphabet<I> alphabet) |
CompactDFA(Alphabet<I> alphabet,
float resizeFactor) |
CompactDFA(Alphabet<I> alphabet,
int stateCapacity) |
CompactDFA(Alphabet<I> alphabet,
int stateCapacity,
float resizeFactor) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Iterable<I> input)
Determines whether the given input word is accepted by this acceptor.
|
Integer |
addInitialState(boolean accepting) |
Integer |
addState(boolean accepting) |
void |
clear()
Removes all states and transitions.
|
Boolean |
computeOutput(Iterable<I> input) |
Boolean |
computeSuffixOutput(Iterable<I> prefix,
Iterable<I> suffix) |
void |
ensureCapacity(int oldCap,
int newCap) |
void |
flipAcceptance() |
GraphDOTHelper<Integer,TransitionEdge<I,Integer>> |
getDOTHelper() |
Boolean |
getStateProperty(int stateId) |
void |
initState(int stateId,
Boolean property) |
boolean |
isAccepting(int stateId) |
boolean |
isAccepting(Integer state)
Checks whether the given state is accepting.
|
void |
setAccepting(int state,
boolean accepting) |
void |
setAccepting(Integer state,
boolean accepting) |
void |
setStateProperty(int stateId,
Boolean property) |
addIntState, addState, copyTransition, createDynamicNodeMapping, createStaticNodeMapping, createTransition, ensureCapacity, getEdgeProperty, getGraphDOTHelper, getInitialState, getInputAlphabet, getNode, getNodeId, getNodeProperty, getNodes, getOutgoingEdges, getState, getStateId, getStateProperty, getStates, getSuccessor, getTarget, getTransition, getTransitionProperty, nodeIDs, removeAllTransitions, removeAllTransitions, setInitialState, setInitialState, setStateProperty, setTransition, setTransition, setTransition, setTransitionProperty, size, 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
getStates, size, stateIDs
forEach, iterator, spliterator
getTransition
getSuccessor, getTransitions, powersetView
getInitialState, getState, getSuccessor, getSuccessor
createDynamicStateMapping, createStaticStateMapping, getInitialStates, getStates, getSuccessors, getSuccessors, getSuccessors
setInitialState, setTransition, setTransition
addInitialState, addInitialState, addState, addState, addTransition, addTransition, addTransitions, copyTransition, createTransition, removeAllTransitions, removeAllTransitions, removeTransition, setInitial, setStateProperty, setTransitionProperty, setTransitions
getStateProperty, getTransitionProperty
getInputAlphabet
public static final float DEFAULT_RESIZE_FACTOR
public static final int DEFAULT_INIT_CAPACITY
public CompactDFA(Alphabet<I> alphabet)
public CompactDFA(Alphabet<I> alphabet, int stateCapacity)
public CompactDFA(Alphabet<I> alphabet, float resizeFactor)
public CompactDFA(Alphabet<I> alphabet, int stateCapacity, float resizeFactor)
public void ensureCapacity(int oldCap, int newCap)
ensureCapacity
in class AbstractCompactSimpleDet<I,Boolean>
public void flipAcceptance()
flipAcceptance
in interface MutableFSA<Integer,I>
public void clear()
MutableAutomaton
public void setAccepting(int state, boolean accepting)
public void setAccepting(Integer state, boolean accepting)
setAccepting
in interface MutableFSA<Integer,I>
public Integer addState(boolean accepting)
addState
in interface MutableFSA<Integer,I>
public boolean isAccepting(int stateId)
public boolean isAccepting(Integer state)
AcceptorTS
isAccepting
in interface AcceptorTS<Integer,I>
state
- the statetrue
if the state is accepting, false
otherwise.public boolean accepts(Iterable<I> input)
AcceptorTS
accepts
in interface AcceptorTS<Integer,I>
input
- the input word.true
if the input word is accepted,
false
otherwise.public Boolean computeSuffixOutput(Iterable<I> prefix, Iterable<I> suffix)
computeSuffixOutput
in interface SuffixOutput<I,Boolean>
public Boolean computeOutput(Iterable<I> input)
computeOutput
in interface Output<I,Boolean>
public Boolean getStateProperty(int stateId)
getStateProperty
in class AbstractCompactSimpleDet<I,Boolean>
public void initState(int stateId, Boolean property)
initState
in class AbstractCompactSimpleDet<I,Boolean>
public void setStateProperty(int stateId, Boolean property)
setStateProperty
in class AbstractCompactSimpleDet<I,Boolean>
public Integer addInitialState(boolean accepting)
addInitialState
in interface MutableFSA<Integer,I>
public GraphDOTHelper<Integer,TransitionEdge<I,Integer>> getDOTHelper()
getDOTHelper
in interface DOTPlottableAutomaton<Integer,I,Integer>
Copyright © 2015. All Rights Reserved.