Method: DefIterSolve#check_func

Defined in:
ext/numo/gsl/spmatrix/parse_spmatrix.rb

#check_func(h) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'ext/numo/gsl/spmatrix/parse_spmatrix.rb', line 54

def check_func(h)
  if t = lookup(h)
    m = h[:func_name].sub(/^gsl_splinalg_itersolve_/,"")
    DefMethod.new(self, t, name:m, **h)
    if /_alloc$/ =~ h[:func_name]
      t = "itersolve_type_new"
      ITERSOLVE_TYPES.each do |st|
        DefSubclassNew.new(self, t, st, **h)
      end
    end
    return true
  end
  $stderr.puts "skip #{h[:func_name]}"
  false
end