Class: LeastCommonAncestorPreprocessing

Inherits:
Object
  • Object
show all
Defined in:
lib/visitor/numbering_visitor.rb

Instance Method Summary collapse

Constructor Details

#initialize(startNode) ⇒ LeastCommonAncestorPreprocessing

Returns a new instance of LeastCommonAncestorPreprocessing.



222
223
224
225
226
227
228
229
# File 'lib/visitor/numbering_visitor.rb', line 222

def initialize(startNode)
  dfs = OrderedDFS.new(NumberingVisitor.new)
  dfs.traverse(startNode)
  dfs = OrderedDFS.new(RunDefiningVisitor.new)
  dfs.traverse(startNode)
  dfs = DFS.new(RunBitVisitor.new(startNode))
  dfs.traverse(startNode)
end