Class: StatsBasic
- Inherits:
-
DefModuleFunction
- Object
- ErbPP
- DefMethod
- DefModuleFunction
- StatsBasic
- Includes:
- FuncParser
- Defined in:
- ext/numo/gsl/stats/parse_stats.rb
Constant Summary collapse
- PARAM_DESC =
{}
- PARAM_NAMES =
{ "double" => %w[csphase], "int" => [], #%w[n m i j l kmax lmax nmin nmax size order_min order_max], "size_t" => [], #%w[lmax], }
Instance Attribute Summary
Attributes included from FuncParser
#args_in, #args_out, #args_param, #counter, #generate_array
Attributes inherited from ErbPP
Instance Method Summary collapse
- #argument_property(type, name) ⇒ Object
-
#initialize(parent, tmpl, **h) ⇒ StatsBasic
constructor
A new instance of StatsBasic.
Methods included from FuncParser
#c_args, #cdef_args, #def_ain, #def_aout, #desc_param, #desc_param_scalar, #find_name, #is_param, lookup, #method_args, #n_in, #n_input, #n_out, #n_param, #ndl_args, #param_desc, #param_names, #parse_args, #recv
Methods inherited from DefModuleFunction
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) ⇒ StatsBasic
Returns a new instance of StatsBasic.
43 44 45 46 47 48 49 50 |
# File 'ext/numo/gsl/stats/parse_stats.rb', line 43 def initialize(parent,tmpl,**h) m = h[:func_name].sub(/^gsl_stats_/,"") super(parent, tmpl, name:m, **h) parse_args(h) @varg = -1 set n_arg: -1 @preproc_code = "" end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ErbPP
Instance Method Details
#argument_property(type, name) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 |
# File 'ext/numo/gsl/stats/parse_stats.rb', line 52 def argument_property(type,name) case name when "return"; {output:true, narray:true, pass: :return} when /\[\]/; {input:true, narray:true, pass: :array} when /^w?stride/,"n"; {} else if /(.+)\*$/ =~ type; {output:true, narray:true, pass: :return} else; {input:true, param:true} end end end |