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.



244
245
246
247
# File 'lib/codegraph.rb', line 244

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

Instance Method Details

#fill(*args) ⇒ Object



248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/codegraph.rb', line 248

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