|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectantlr.BaseAST
org.kit.furia.fragment.FragmentAST
org.kit.furia.fragment.MTDFragmentAST
public class MTDFragmentAST
MTDFragmentAST A tree that holds an internal id for each unique complete subtree and a hash code computed on the string representation of this complete subtree. Additionally, the number of repetitions is included. This helps to make this algorithm O(n) for equal complete subtrees of two different trees. Once we found that two complete subtrees m,j belonging to different trees T1 T2, we can compute their intersection in linear time.
Field Summary | |
---|---|
int |
id
|
IntegerHolder |
repetitions
|
Fields inherited from class org.kit.furia.fragment.FragmentAST |
---|
decendants, text |
Fields inherited from class antlr.BaseAST |
---|
down, right |
Constructor Summary | |
---|---|
MTDFragmentAST()
|
Method Summary | |
---|---|
boolean |
equals(antlr.collections.AST x)
|
boolean |
equals(java.lang.Object o)
|
MTDFragmentAST |
getLeft()
|
MTDFragmentAST |
getSibbling()
|
int |
hashCode()
|
void |
update()
|
Methods inherited from class org.kit.furia.fragment.FragmentAST |
---|
depthFirst, depthFirstAux, getDescendants, getFirstChild, getLeftmostChild, getNextSibling, getSize, getText, getType, initialize, initialize, initialize, prettyPrint, setText, setType, toFuriaChanTree, updateDecendantInformation, updateDecendantInformationAux |
Methods inherited from class antlr.BaseAST |
---|
addChild, decode, encode, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getColumn, getLine, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int id
public IntegerHolder repetitions
Constructor Detail |
---|
public MTDFragmentAST()
Method Detail |
---|
public void update()
public boolean equals(antlr.collections.AST x)
equals
in interface antlr.collections.AST
equals
in class antlr.BaseAST
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public MTDFragmentAST getLeft()
public MTDFragmentAST getSibbling()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |