public class CompactNFA<I> extends AbstractCompactSimpleNondet<I,Boolean> implements MutableNFA<Integer,I>, DOTPlottableAutomaton<Integer,I,Integer>
DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, EMPTY_SET
STATE_PROPERTIES, TRANSITION_PROPERTIES
Constructor and Description |
---|
CompactNFA(Alphabet<I> alphabet) |
CompactNFA(Alphabet<I> alphabet,
float resizeFactor) |
CompactNFA(Alphabet<I> alphabet,
int stateCapacity) |
CompactNFA(Alphabet<I> alphabet,
int stateCapacity,
float resizeFactor) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Iterable<? extends 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<? extends I> input) |
Boolean |
computeSuffixOutput(Iterable<? extends I> prefix,
Iterable<? extends I> suffix) |
CompactDFA<I> |
determinize() |
void |
flipAcceptance() |
GraphDOTHelper<Integer,TransitionEdge<I,Integer>> |
getDOTHelper() |
Boolean |
getStateProperty(int stateId) |
protected void |
initState(int stateId,
Boolean property) |
boolean |
isAccepting(Collection<? extends Integer> states) |
boolean |
isAccepting(int stateId) |
boolean |
isAccepting(Integer state)
Checks whether the given state is accepting.
|
void |
setAccepting(int stateId,
boolean accepting) |
void |
setAccepting(Integer state,
boolean accepting) |
void |
setStateProperty(int stateId,
Boolean property) |
addIntInitialState, addIntInitialState, addIntState, addIntState, addState, addTransition, addTransition, addTransition, copyTransition, createDynamicNodeMapping, createStaticNodeMapping, createTransition, ensureCapacity, ensureCapacity, getEdgeProperty, getGraphDOTHelper, getInitialStates, getInputAlphabet, getIntInitialStates, getIntTransitions, getNode, getNodeId, getNodeProperty, getNodes, getOutgoingEdges, getState, getStateId, getStateProperty, getStates, getSuccessor, getTarget, getTransitionProperty, getTransitions, getTransitions, getTransitions, nodeIDs, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeTransition, removeTransition, removeTransition, setInitial, setInitial, setStateProperty, setTransitionProperty, setTransitions, setTransitions, setTransitions, size, stateIDs, successors, wrapState
addInitialState, addInitialState, addInitialState, addInitialState, addState, addState, addTransition, addTransition, addTransition, addTransitions, addTransitions, removeAllTransitions, removeTransition
createStaticStateMapping, createStaticStateMapping, iterator, iterator, size, stateIDs
createDynamicStateMapping, createDynamicStateMapping, createStaticStateMapping, getStates, getStates, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, getSuccessors, powersetView, powersetView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addInitialState, addInitialState, addState, addState, addTransition, addTransition, addTransitions, copyTransition, createTransition, removeAllTransitions, removeAllTransitions, removeTransition, setInitial, setStateProperty, setTransitionProperty, setTransitions
getStates, size, stateIDs
forEach, iterator, spliterator
getStateProperty, getTransitionProperty
getSuccessor, getTransitions, powersetView
createDynamicStateMapping, createStaticStateMapping, getInitialStates, getStates, getSuccessors, getSuccessors, getSuccessors
getInputAlphabet
public boolean isAccepting(Collection<? extends Integer> states)
isAccepting
in interface NFA<Integer,I>
public boolean isAccepting(Integer state)
AcceptorTS
isAccepting
in interface AcceptorTS<Integer,I>
state
- the statetrue
if the state is accepting, false
otherwise.public boolean isAccepting(int stateId)
public boolean accepts(Iterable<? extends 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<? extends I> prefix, Iterable<? extends I> suffix)
computeSuffixOutput
in interface SuffixOutput<I,Boolean>
public Boolean computeOutput(Iterable<? extends I> input)
computeOutput
in interface Output<I,Boolean>
public Integer addState(boolean accepting)
addState
in interface MutableFSA<Integer,I>
public Integer addInitialState(boolean accepting)
addInitialState
in interface MutableFSA<Integer,I>
public void setAccepting(Integer state, boolean accepting)
setAccepting
in interface MutableFSA<Integer,I>
public void setAccepting(int stateId, boolean accepting)
public void flipAcceptance()
flipAcceptance
in interface MutableFSA<Integer,I>
public Boolean getStateProperty(int stateId)
getStateProperty
in class AbstractCompactSimpleNondet<I,Boolean>
protected void initState(int stateId, Boolean property)
initState
in class AbstractCompactSimpleNondet<I,Boolean>
public void setStateProperty(int stateId, Boolean property)
setStateProperty
in class AbstractCompactSimpleNondet<I,Boolean>
public void clear()
MutableAutomaton
public CompactDFA<I> determinize()
public GraphDOTHelper<Integer,TransitionEdge<I,Integer>> getDOTHelper()
getDOTHelper
in interface DOTPlottableAutomaton<Integer,I,Integer>
Copyright © 2015. All rights reserved.