Class: DefSpMatrix
- Inherits:
-
DefGslClass
- Object
- ErbPP
- DefModule
- DefClass
- DefGslClass
- DefSpMatrix
- Defined in:
- ext/numo/gsl/spmatrix/parse_spmatrix.rb
Instance Attribute Summary
Attributes inherited from ErbPP
Instance Method Summary collapse
Methods inherited from DefGslClass
#check_func, #define_method, #to_method_name
Methods included from ErbppGsl
FM, dbl, dblp, int, intp, long, read_const, read_enum, read_eval, read_func, read_func_pattern, read_type, str, szt, sztp, tp, uint, ulong, void
Methods inherited from DefClass
#_mod_var, #free_func, #init_erb, #initialize, #super_class
Methods inherited from DefModule
#_mod_var, #def_id, #id_list, #init_def, #init_erb, #initialize, #method_code
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, #initialize, #load_erb, #method_missing, #method_missing_alias, #result, #run, #set, #write
Constructor Details
This class inherits a constructor from DefClass
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ErbPP
Instance Method Details
#lookup(h) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'ext/numo/gsl/spmatrix/parse_spmatrix.rb', line 4 def lookup(h) case h when FM(name:/_free$/); false when FM(name:/_alloc$/); false when FM(name:/_alloc_nzmax$/); "spmatrix_new" when FM(name:/_sp2d$/); "spmatrix_sp2d" when FM(name:/_d2sp$/); "spmatrix_d2sp" when FM(tp,tp,tp,name:/_add$/); "spmatrix_add" when FM(tp,*[szt]*2,type:"double"); "c_DFloat_f_SZ_x2" when FM(tp,*[szt]*2,"double"); "c_self_f_SZ_x2_DFloat" when FM(szt,tp); h[:postpose]=true; "c_self_f_sizet" when FM(tp,"double"); "c_self_f_double" when FM(tp,*["double *"]*2); "c_double_x2_f_void" when FM(tp,type:tp); "c_other_f_void" when FM(tp,tp,type:"int"); "c_self_f_other" when FM(tp,type:"size_t"); "c_sizet_f_void" when FM(tp,type:"int"); "c_self_f_void" end end |