public class CompactNFA<I> extends AbstractCompactSimpleNondet<I,Boolean> implements MutableNFA<Integer,I>
Modifier and Type | Class and Description |
---|---|
static class |
CompactNFA.Creator<I> |
FiniteStateAcceptor.FSAGraphView<S,I,A extends FiniteStateAcceptor<S,I>>
alphabet, alphabetSize, DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, initial, numStates, stateCapacity, transitions
STATE_PROPERTIES, TRANSITION_PROPERTIES
Modifier | Constructor and Description |
---|---|
|
CompactNFA(Alphabet<I> alphabet) |
protected |
CompactNFA(Alphabet<I> alphabet,
CompactNFA<?> other) |
|
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 |
---|---|
Integer |
addInitialState(boolean accepting) |
Integer |
addState(boolean accepting) |
void |
clear()
Removes all states and transitions.
|
CompactDFA<I> |
determinize() |
void |
flipAcceptance() |
Boolean |
getStateProperty(int stateId) |
protected void |
initState(int stateId,
Boolean property) |
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) |
<I2> CompactNFA<I2> |
translate(Alphabet<I2> newAlphabet) |
addIntInitialState, addIntInitialState, addIntState, addIntState, addState, addTransition, addTransition, addTransition, copyTransition, createTransition, ensureCapacity, ensureCapacity, getInitialStates, getInputAlphabet, getIntInitialStates, getIntTransitions, getState, getStateId, getStateProperty, getStates, getSuccessor, getTransitionProperty, getTransitions, getTransitions, getTransitions, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeTransition, removeTransition, removeTransition, setInitial, setInitial, setStateProperty, setTransitionProperty, setTransitions, setTransitions, setTransitions, size, stateIDs, successors, wrapState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAccepting
addInitialState, addInitialState, addState, addState, copyTransition, createTransition, setStateProperty, setTransitionProperty
computeOutput, computeSuffixOutput, transitionGraphView
accepts, getStateProperty, getSuccessor, getTransitionProperty
addTransition, addTransition, addTransitions, removeAllTransitions, removeAllTransitions, removeTransition, setInitial, setTransitions
createStaticStateMapping, getStates, iterator, size, stateIDs
forEach, spliterator
getSuccessors, getTransitions, powersetView
createDynamicStateMapping, getInitialStates, getStates, getSuccessors, getSuccessors
transitionGraphView
graphView
protected CompactNFA(Alphabet<I> alphabet, CompactNFA<?> other)
public <I2> CompactNFA<I2> translate(Alphabet<I2> newAlphabet)
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 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()
Copyright © 2015. All rights reserved.