public class CompactNFA<I> extends AbstractCompactSimpleNondet<I,Boolean> implements MutableNFA<Integer,I>
Modifier and Type | Class and Description |
---|---|
static class |
CompactNFA.Creator<I> |
AbstractCompact.Payload
FiniteStateAcceptor.FSAGraphView<S,I,A extends FiniteStateAcceptor<S,I>>
initial, transitions
DEFAULT_INIT_CAPACITY, DEFAULT_RESIZE_FACTOR, INVALID_STATE
STATE_PROPERTIES, TRANSITION_PROPERTIES
Modifier | Constructor and Description |
---|---|
|
CompactNFA(Alphabet<I> alphabet) |
protected |
CompactNFA(Alphabet<I> alphabet,
CompactNFA<?> other) |
|
CompactNFA(Alphabet<I> alphabet,
int stateCapacity) |
Modifier and Type | Method and Description |
---|---|
Integer |
addInitialState(boolean accepting) |
Integer |
addState(boolean accepting) |
void |
clear()
Removes all states and transitions.
|
void |
flipAcceptance() |
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,
@Nullable Boolean property) |
<I2> CompactNFA<I2> |
translate(Alphabet<I2> newAlphabet) |
addTransition, addTransition, addTransition, copyTransition, createTransition, getInitialStates, getSuccessor, getTransitionProperty, getTransitions, getTransitions, getTransitions, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeAllTransitions, removeTransition, removeTransition, removeTransition, setInitial, setInitial, setTransitionProperty, setTransitions, setTransitions, setTransitions, updateTransitionStorage
addAlphabetSymbol, addIntState, addState, getInputAlphabet, getLocalInputs, getState, getStateId, getStates, getSymbolIndex, numInputs, size, stateIDs, toId, toMemoryIndex, toState, updateStateStorage, updateStateStorage, updateTransitionStorage, updateTransitionStorage, updateTransitionStorage
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
createDynamicStateMapping, createStaticStateMapping, getStates, iterator, size, stateIDs
forEach, spliterator
getSuccessors, getTransitions, powersetView
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 void flipAcceptance()
flipAcceptance
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 Integer addInitialState(boolean accepting)
addInitialState
in interface MutableFSA<Integer,I>
public Integer addState(boolean accepting)
addState
in interface MutableFSA<Integer,I>
public void clear()
MutableAutomaton
public void setStateProperty(int stateId, @Nullable Boolean property)
setStateProperty
in class AbstractCompact<I,Integer,Boolean,Void>
Copyright © 2020. All rights reserved.