public class FiniteAutomaton extends Object
This class models basic FA behaviour. More specialised behaviour is implemented by subclassing this.
Modifier and Type | Field and Description |
---|---|
protected org.biojava.utils.automata.FiniteAutomaton.Node |
end |
protected Set |
nodes |
protected org.biojava.utils.automata.FiniteAutomaton.Node |
start |
protected Set |
transitions |
Modifier and Type | Method and Description |
---|---|
org.biojava.utils.automata.FiniteAutomaton.Node |
addNode(boolean terminal)
Add a node to the FA.
|
org.biojava.utils.automata.FiniteAutomaton.Transition |
addTransition(org.biojava.utils.automata.FiniteAutomaton.Node start,
org.biojava.utils.automata.FiniteAutomaton.Node end,
Symbol sym) |
protected int |
alphaIndex(Symbol sym) |
org.biojava.utils.automata.FiniteAutomaton.NodeSet |
createNodeSet() |
FiniteAutomaton |
getAutomaton() |
org.biojava.utils.automata.FiniteAutomaton.Node |
getEnd() |
org.biojava.utils.automata.FiniteAutomaton.NodeSet |
getNodes()
get all Nodes within this instance.
|
org.biojava.utils.automata.FiniteAutomaton.Node |
getStart() |
Set |
getTransitions()
retrieve Set of all transitions in instance.
|
String |
toString()
dumps internal data of Nodes and Transitions that describe
this FiniteAutomaton.
|
protected Set transitions
protected org.biojava.utils.automata.FiniteAutomaton.Node start
protected org.biojava.utils.automata.FiniteAutomaton.Node end
public org.biojava.utils.automata.FiniteAutomaton.Node getStart()
public org.biojava.utils.automata.FiniteAutomaton.Node getEnd()
public FiniteAutomaton getAutomaton()
public org.biojava.utils.automata.FiniteAutomaton.Transition addTransition(org.biojava.utils.automata.FiniteAutomaton.Node start, org.biojava.utils.automata.FiniteAutomaton.Node end, Symbol sym)
public org.biojava.utils.automata.FiniteAutomaton.Node addNode(boolean terminal)
terminal
- Is the Node terminal?public org.biojava.utils.automata.FiniteAutomaton.NodeSet getNodes()
public Set getTransitions()
public org.biojava.utils.automata.FiniteAutomaton.NodeSet createNodeSet()
public String toString()
protected int alphaIndex(Symbol sym) throws IllegalSymbolException
IllegalSymbolException
Copyright © 2014 BioJava. All rights reserved.