|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.buffalo.nsf.xmlcqa.data.dtd.NDFA
edu.buffalo.nsf.xmlcqa.data.dtd.RegExpr
An abstract class facilitating construction of regular expressions. The semantics
of regular expression is expressed by means of nondeterministic finite automata.
Therefore this class extends NDFA
. Also this class
allows to delegate construction of all methods specified by
NDFA
by implementing four of it abstract methods:
_getStateCount()
,
_fillFinalStates(boolean[] f , int offset)
,
_fillDelta(boolean[][][] delta, int offset)
, and
_fillEpsilonDelta(boolean[][] epsilon, int offset)
.
Three of those methods have a parameter offset
, which facilitates
structural composition of regular expressions. An object implementing those methods
should assume that numbers of its states start with the value offset
.
The values specified by abstract methods in NDFA
are memoized once they
have been computed. Should the value of the parameters change, the vlaues will be
recomputed.
Field Summary |
---|
Fields inherited from class edu.buffalo.nsf.xmlcqa.data.dtd.NDFA |
---|
EPSILON |
Fields inherited from interface edu.buffalo.nsf.xmlcqa.Constants |
---|
INF |
Constructor Summary | |
---|---|
RegExpr()
|
Method Summary | |
---|---|
protected abstract void |
_fillDelta(boolean[][][] delta,
int offset)
Used to fill tag driven part of the transition table of a regular expression whose position if relative to offset . |
protected abstract void |
_fillEpsilonDelta(boolean[][] delta,
int offset)
Used to fill epsilon part of the transition talbe of a regular expressio whose possition is relative to offset . |
protected abstract void |
_fillFinalStates(boolean[] f,
int offset)
Used to indicate final states of a regular expression whose position is relative to offset . |
protected abstract int |
_getStateCount()
Should return the number of states the implementation is using. |
boolean[][][] |
getDelta()
Returns the tag controled part of the transition relation. |
boolean[][] |
getEpsilonDelta()
Returns the epsilon part of the transition relation. |
boolean[] |
getFinalStates()
Returns a boolean vector specifying final states. |
int[][][] |
getFstIndTrDelta(DTD d)
Returns a two dimensional array containing vectors of suffixes of the cheapest paths between each pair of vertices. |
Tag[][][] |
getFstTagTrDelta(DTD d)
Returns a two dimentional array containing vectors of suffizes of labels of the cheapest paths between each pair of vertices. |
int[][] |
getMinCostDelta(DTD d)
Returns an array containing costs of cheapest paths between every pari of states. |
int |
getStateCount()
Returns the number of states used by the underlying NDFA. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RegExpr()
Method Detail |
protected abstract void _fillDelta(boolean[][][] delta, int offset)
offset
. The implementing class doesn't
have indicate transitions obtained in a consequence of clousure under epsilon transition.
This clousure will be computed automatically by this class.
protected abstract void _fillEpsilonDelta(boolean[][] delta, int offset)
offset
. The implementing class doesn't
have indicate transitions obtained in the consequence of the clousure. This clousure
will be computed by this class.
protected abstract void _fillFinalStates(boolean[] f, int offset)
offset
.
protected abstract int _getStateCount()
getStateCount()
method (memoization).
public boolean[][][] getDelta()
NDFA
getDelta()[t][i][j]
is true
if
and only if there is transition with a tag of identifier
equal to t
, from the state i
to the state j
getDelta
in class NDFA
public boolean[][] getEpsilonDelta()
NDFA
getEpsilonDelta()[i][j]
is true
if and only if there is an epsilon transition from the state
i
to the state j
.
getEpsilonDelta
in class NDFA
public boolean[] getFinalStates()
NDFA
i
is final
if and only if getFinalStates()[i]
is true
.
getFinalStates
in class NDFA
public int[][][] getFstIndTrDelta(DTD d)
NDFA
getFstIndTrDelta
in class NDFA
public Tag[][][] getFstTagTrDelta(DTD d)
NDFA
getFstTagTrDelta
in class NDFA
public int[][] getMinCostDelta(DTD d)
NDFA
DTD.getMinTreeSize(Tag)
.
getMinCostDelta
in class NDFA
public int getStateCount()
NDFA
getStateCount
in class NDFA
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |