public final class ConstantArcSizeFSA extends FSA
FSABuilder
.FSABuilder
Modifier and Type | Field and Description |
---|---|
static int |
ADDRESS_OFFSET
Offset of the address field inside an arc.
|
static int |
ARC_SIZE
Size of a single arc structure.
|
static int |
BIT_ARC_FINAL
An arc flag indicating the target node of an arc corresponds to a final
state.
|
static int |
BIT_ARC_LAST
An arc flag indicating the arc is last within its state.
|
static int |
FLAGS_OFFSET
Offset of the flags field inside an arc.
|
static int |
FLAGS_SIZE
Size of the flags field (constant for the builder).
|
static int |
LABEL_OFFSET
Offset of the label field inside an arc.
|
static int |
LABEL_SIZE
Size of the label field (constant for the builder).
|
static int |
TARGET_ADDRESS_SIZE
Size of the target address field (constant for the builder).
|
Modifier and Type | Method and Description |
---|---|
int |
getArc(int node,
byte label) |
byte |
getArcLabel(int arc)
Return the label associated with a given
arc . |
int |
getEndNode(int arc)
Return the end node pointed to by a given
arc . |
int |
getFirstArc(int node) |
Set<FSAFlags> |
getFlags()
Returns a set of flags for this FSA instance.
|
int |
getNextArc(int arc) |
int |
getRootNode() |
boolean |
isArcFinal(int arc)
Returns
true if the destination node at the end of this
arc corresponds to an input sequence created when building
this automaton. |
boolean |
isArcTerminal(int arc)
Returns
true if this arc does not have a
terminating node (@link FSA.getEndNode(int) will throw an
exception). |
getArcCount, getRightLanguageCount, getSequences, getSequences, iterator, read, read, visitAllStates, visitInPostOrder, visitInPostOrder, visitInPreOrder, visitInPreOrder
public static final int TARGET_ADDRESS_SIZE
public static final int FLAGS_SIZE
public static final int LABEL_SIZE
public static final int ARC_SIZE
public static final int FLAGS_OFFSET
public static final int LABEL_OFFSET
public static final int ADDRESS_OFFSET
public static final int BIT_ARC_FINAL
public static final int BIT_ARC_LAST
public int getRootNode()
getRootNode
in class FSA
public int getFirstArc(int node)
getFirstArc
in class FSA
node
or 0 if the node has no outgoing arcs.public int getArc(int node, byte label)
public int getNextArc(int arc)
getNextArc
in class FSA
arc
and
leaving node
. Zero is returned if no more arcs are
available for the node.public byte getArcLabel(int arc)
FSA
arc
.getArcLabel
in class FSA
public boolean isArcFinal(int arc)
FSA
true
if the destination node at the end of this
arc
corresponds to an input sequence created when building
this automaton.isArcFinal
in class FSA
public boolean isArcTerminal(int arc)
FSA
true
if this arc
does not have a
terminating node (@link FSA.getEndNode(int)
will throw an
exception). Implies FSA.isArcFinal(int)
.isArcTerminal
in class FSA
public int getEndNode(int arc)
FSA
arc
. Terminal arcs
(those that point to a terminal state) have no end node representation
and throw a runtime exception.getEndNode
in class FSA
Copyright © 2014. All rights reserved.