Class: EightFunctionGraph

Inherits:
FunctionGraph
  • Object
show all
Defined in:
lib/codegraph.rb

Constant Summary

Constants inherited from FunctionGraph

FunctionGraph::Params

Instance Attribute Summary

Attributes inherited from FunctionGraph

#adds, #debug, #excludes, #funx

Instance Method Summary collapse

Methods inherited from FunctionGraph

#display, #display_functionbody, #limit, #to_dot, #to_txt, #to_type

Constructor Details

#initialize(func) ⇒ EightFunctionGraph

Returns a new instance of EightFunctionGraph.



296
297
298
299
# File 'lib/codegraph.rb', line 296

def initialize(func)
  super()
  @func = func
end

Instance Method Details

#fill(*args) ⇒ Object



300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File 'lib/codegraph.rb', line 300

def fill(*args)
  g_down = SingleFunctionGraph.new(@func)
  g_down.fill(*args)

  g_up   = UpperFunctionGraph.new(@func)
  g_up.fill(*args)

  g_down.each_edge do |u,v|
    self.add_edge(u,v)
  end
  g_up.each_edge do |u,v|
    self.add_edge(u,v)
  end
end