net.obsearch.example.ted
Class FSliceAST

java.lang.Object
  extended by antlr.BaseAST
      extended by net.obsearch.example.ted.SliceAST
          extended by net.obsearch.example.ted.FSliceAST
All Implemented Interfaces:
antlr.collections.AST, java.io.Serializable

public class FSliceAST
extends SliceAST

FSliceAST 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.

Author:
Arnoldo Jose Muller Molina
See Also:
Serialized Form

Field Summary
 int id
           
 IntegerHolder repetitions
           
 
Fields inherited from class net.obsearch.example.ted.SliceAST
decendants, text
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
FSliceAST()
           
 
Method Summary
 boolean equals(antlr.collections.AST x)
           
 boolean equals(java.lang.Object o)
           
 FSliceAST getLeft()
           
 FSliceAST getSibbling()
           
 int hashCode()
           
 void update()
           
 
Methods inherited from class net.obsearch.example.ted.SliceAST
containsNode, depthFirst, depthFirstAux, detailedTreeAux, detailedTreeComparison, equalsTree, findFirstNodeThatMatches, getDescendants, getId, getLeftmostChild, getSize, getText, getType, initialize, initialize, initialize, prettyPrint, setText, setType, toFuriaChanTreeAux, toQ, updateContains, updateDecendantInformation, updateIdInfo
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equalsList, equalsListPartial, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, 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

id

public int id

repetitions

public IntegerHolder repetitions
Constructor Detail

FSliceAST

public FSliceAST()
Method Detail

update

public void update()

equals

public boolean equals(antlr.collections.AST x)
Specified by:
equals in interface antlr.collections.AST
Overrides:
equals in class antlr.BaseAST

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getLeft

public FSliceAST getLeft()

getSibbling

public FSliceAST getSibbling()


Copyright © 2007-2008 Arnoldo Jose Muller Molina. All Rights Reserved.