public class Nfa extends FiniteAutomaton implements NfaBuilder
This implementation has epsilon and lambda transitions. Both transitions are silent but the former is intended to be optimised away while the latter must be retained during optimisation. This is necessary to implement limited closure for the REs that one may want to build with this NFA.
end, nodes, start, transitions
Constructor and Description |
---|
Nfa(String name,
FiniteAlphabet alfa) |
Modifier and Type | Method and Description |
---|---|
org.biojava.utils.automata.FiniteAutomaton.Transition |
addEpsilonTransition(org.biojava.utils.automata.FiniteAutomaton.Node start,
org.biojava.utils.automata.FiniteAutomaton.Node end)
Add a silent optimisable transition to instance.
|
org.biojava.utils.automata.FiniteAutomaton.Transition |
addLambdaTransition(org.biojava.utils.automata.FiniteAutomaton.Node start,
org.biojava.utils.automata.FiniteAutomaton.Node end)
Add a silent persistent transition to instance.
|
protected int |
alphaIndex(Symbol sym) |
boolean |
containsNode(org.biojava.utils.automata.FiniteAutomaton.Node node) |
addNode, addTransition, createNodeSet, getAutomaton, getEnd, getNodes, getStart, getTransitions, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addNode, addTransition, createNodeSet, getAutomaton, getEnd, getNodes, getStart, getTransitions, toString
public Nfa(String name, FiniteAlphabet alfa)
protected int alphaIndex(Symbol sym) throws IllegalSymbolException
alphaIndex
in class FiniteAutomaton
IllegalSymbolException
public boolean containsNode(org.biojava.utils.automata.FiniteAutomaton.Node node)
public org.biojava.utils.automata.FiniteAutomaton.Transition addEpsilonTransition(org.biojava.utils.automata.FiniteAutomaton.Node start, org.biojava.utils.automata.FiniteAutomaton.Node end)
addEpsilonTransition
in interface NfaBuilder
public org.biojava.utils.automata.FiniteAutomaton.Transition addLambdaTransition(org.biojava.utils.automata.FiniteAutomaton.Node start, org.biojava.utils.automata.FiniteAutomaton.Node end)
addLambdaTransition
in interface NfaBuilder
Copyright © 2014 BioJava. All rights reserved.