Class: BesselArray

Inherits:
SfBasic show all
Defined in:
ext/numo/gsl/sf/parse_sf.rb

Constant Summary collapse

RE =
/^gsl_sf_bessel_\w+_array$/

Constants inherited from SfBasic

SfBasic::PARAM_DESC, SfBasic::PARAM_NAMES

Constants included from FuncParser

FuncParser::PARAM_DESC, FuncParser::PARAM_NAMES

Instance Attribute Summary

Attributes included from FuncParser

#args_in, #args_out, #args_param, #counter, #generate_array

Attributes inherited from ErbPP

#children, #parent

Class Method Summary collapse

Instance Method Summary collapse

Methods included from FuncParser

#argument_property, #c_args, #cdef_args, #def_ain, #def_aout, #desc_param, #desc_param_scalar, #find_name, #is_param, #method_args, #n_in, #n_input, #n_out, #n_param, #ndl_args, #param_desc, #param_names, #parse_args, #recv

Methods inherited from DefModuleFunction

#init_def

Methods inherited from DefMethod

#c_func, #c_iter, #c_name, #define_method_args, #id_op, #init_def, #op_map, #singleton

Methods included from DeclMethod

#def_alias, #def_alloc_func, #def_const, #def_method, #def_module_function, #def_singleton_method, #undef_alloc_func, #undef_method, #undef_singleton_method

Methods inherited from ErbPP

#add_child, #description, #find, #find_tmpl, #get, #init_def, #load_erb, #method_missing, #method_missing_alias, #result, #run, #set, #write

Constructor Details

#initialize(parent, tmpl, **h) ⇒ BesselArray



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'ext/numo/gsl/sf/parse_sf.rb', line 204

def initialize(parent,tmpl,**h)
  super(parent,tmpl,**h)
  if n_arg == 3
    @preproc_code = "  if (c0<0 || c1<0 || c0>c1) {\n      rb_raise(rb_eArgError,\"should be nmin>=0 && nmax>=0 && nmin<=nmax\");\n  }\n  shape[0] = c1-c0+1;\n"
  else
    @preproc_code = "  if (c0<0) {\n      rb_raise(rb_eArgError,\"should be lmax>=0\");\n  }\n  shape[0] = c0+1;\n"
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ErbPP

Class Method Details

.lookup(h) ⇒ Object



200
201
202
# File 'ext/numo/gsl/sf/parse_sf.rb', line 200

def self.lookup(h)
  "mod_func_noloop" if RE =~ h[:func_name]
end