|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectenumeration.MyEnumerator
enumeration.biginteger.BIEnumerator
public class BIEnumerator
Enumerator, using big integer as the type of volume data to compute and store the specific volume data.
| Field Summary | |
|---|---|
NextMode |
nextMode
Next mode : bottom up or top down |
| Fields inherited from class enumeration.MyEnumerator |
|---|
resultType |
| Constructor Summary | |
|---|---|
BIEnumerator(MyGrammar grammar)
Creates an instance of enumerator. |
|
| Method Summary | |
|---|---|
java.math.BigInteger |
getClusterData(int n,
int pi)
Returns the volume data cluster[n][pi]. |
java.math.BigInteger |
getCubeData(int n,
int pi,
int k)
Returns the volume data cube[n][pi][k]. |
java.math.BigInteger |
getCurrentSequence()
Returns the current sequence. |
java.math.BigInteger |
getHeapData(int n,
int i)
Returns the volume data heap[n][i]. |
java.math.BigInteger |
getHierarchyData(int n,
int i)
Returns the volume data hierarchy[n][i]. |
java.math.BigInteger |
L2N(java.lang.String sentence)
Returns the sequence number of a given element (sentence represent) if the sentence does not belong to the grammar, return -1; |
java.lang.String |
N2L(java.math.BigInteger q)
Returns the q-th element |
java.lang.String |
next()
Generates the next element. |
java.lang.String |
next(java.lang.String ctree,
java.math.BigInteger q)
Returns the next concise tree of a given concise tree whose sequence number is q. |
java.lang.String |
previous()
Generates the previous element |
void |
setGrammar(MyGrammar grammar)
Sets the grammar |
void |
setSentence(java.lang.String sentence)
Sets the current sentence. |
void |
setSequence(java.math.BigInteger q)
Sets the current sequence to q. |
java.lang.String |
start()
Returns the first element of L[start] |
| Methods inherited from class enumeration.MyEnumerator |
|---|
firstHierarchy, getCurrentTree, getGrammar, getParseTree, getSentence, getStartIndex, lastHierarchy, next, previous, setStartIndex |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public NextMode nextMode
| Constructor Detail |
|---|
public BIEnumerator(MyGrammar grammar)
grammar - the grammar for enumeration| Method Detail |
|---|
public void setGrammar(MyGrammar grammar)
MyEnumerator
setGrammar in class MyEnumeratorgrammar - the grammar to setpublic java.lang.String start()
MyEnumerator
start in class MyEnumeratorpublic java.lang.String next()
MyEnumerator
next in class MyEnumerator
public java.lang.String next(java.lang.String ctree,
java.math.BigInteger q)
ctree - the given concise treeq - the given sequence number
public java.lang.String previous()
MyEnumerator
previous in class MyEnumerator
public java.math.BigInteger getHierarchyData(int n,
int i)
n - the hierarchy indexi - the variable index
java.lang.IllegalArgumentException - if n < 0 or i < 0 or i >= variable number
public java.math.BigInteger getHeapData(int n,
int i)
n - the hierarchy indexi - the variable index
java.lang.IllegalArgumentException - if n < 0 or i < 0 or i >= variable number
public java.math.BigInteger getClusterData(int n,
int pi)
n - the hierarchy indexpi - the production index
java.lang.IllegalArgumentException - if n < 0 or pi is terminal
public java.math.BigInteger getCubeData(int n,
int pi,
int k)
n - the hierarchy indexpi - the production indexk - the cube index (the variable index in the RHS)
java.lang.IllegalArgumentException - if n < 0 or pi is terminal
or k < 0 or k >= the variable number at pi's RHSpublic java.math.BigInteger getCurrentSequence()
public void setSequence(java.math.BigInteger q)
q - the sequencepublic void setSentence(java.lang.String sentence)
setSentence in class MyEnumeratorsentence - the sentence to setpublic java.lang.String N2L(java.math.BigInteger q)
q - the sequence number
public java.math.BigInteger L2N(java.lang.String sentence)
sentence - the given element (sentence represent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||