numo-gsl-alt 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/README.md +83 -0
- data/Rakefile +16 -0
- data/ext/numo/gsl/cdf/depend +17 -0
- data/ext/numo/gsl/cdf/erbpp_cdf.rb +44 -0
- data/ext/numo/gsl/cdf/extconf.rb +9 -0
- data/ext/numo/gsl/cdf/func_def.rb +610 -0
- data/ext/numo/gsl/const/const_2.4.rb +419 -0
- data/ext/numo/gsl/const/const_2.5.rb +419 -0
- data/ext/numo/gsl/const/const_2.6.rb +419 -0
- data/ext/numo/gsl/const/const_def.rb +419 -0
- data/ext/numo/gsl/const/depend +17 -0
- data/ext/numo/gsl/const/erbpp_const.rb +28 -0
- data/ext/numo/gsl/const/extconf.rb +9 -0
- data/ext/numo/gsl/err/depend +1 -0
- data/ext/numo/gsl/err/err.c +22 -0
- data/ext/numo/gsl/err/extconf.rb +9 -0
- data/ext/numo/gsl/extconf_gsl.rb +58 -0
- data/ext/numo/gsl/fit/depend +17 -0
- data/ext/numo/gsl/fit/erbpp_fit.rb +73 -0
- data/ext/numo/gsl/fit/extconf.rb +9 -0
- data/ext/numo/gsl/fit/func_2.4.rb +128 -0
- data/ext/numo/gsl/fit/func_2.5.rb +128 -0
- data/ext/numo/gsl/fit/func_2.6.rb +128 -0
- data/ext/numo/gsl/fit/func_def.rb +129 -0
- data/ext/numo/gsl/fit/tmpl/check_1d.c +9 -0
- data/ext/numo/gsl/fit/tmpl/fit_linear.c +53 -0
- data/ext/numo/gsl/fit/tmpl/fit_linear_est.c +56 -0
- data/ext/numo/gsl/fit/tmpl/fit_mul.c +50 -0
- data/ext/numo/gsl/fit/tmpl/fit_mul_est.c +47 -0
- data/ext/numo/gsl/fit/tmpl/fit_wlinear.c +59 -0
- data/ext/numo/gsl/fit/tmpl/fit_wmul.c +56 -0
- data/ext/numo/gsl/gen/erbln.rb +132 -0
- data/ext/numo/gsl/gen/erbpp2.rb +344 -0
- data/ext/numo/gsl/gen/erbpp_gsl.rb +170 -0
- data/ext/numo/gsl/gen/func_parser.rb +518 -0
- data/ext/numo/gsl/gen/tmpl/c_DFloat_f_DFloat.c +40 -0
- data/ext/numo/gsl/gen/tmpl/c_DFloat_f_SZ.c +41 -0
- data/ext/numo/gsl/gen/tmpl/c_DFloat_f_SZ_x2.c +44 -0
- data/ext/numo/gsl/gen/tmpl/c_DFloat_x2_f_DFloat_x2.c +45 -0
- data/ext/numo/gsl/gen/tmpl/c_double_f_double.c +16 -0
- data/ext/numo/gsl/gen/tmpl/c_double_f_sizet.c +16 -0
- data/ext/numo/gsl/gen/tmpl/c_double_f_sizet_x2.c +17 -0
- data/ext/numo/gsl/gen/tmpl/c_double_f_void.c +15 -0
- data/ext/numo/gsl/gen/tmpl/c_double_x2_f_void.c +17 -0
- data/ext/numo/gsl/gen/tmpl/c_new_DFloat.c +29 -0
- data/ext/numo/gsl/gen/tmpl/c_new_double.c +22 -0
- data/ext/numo/gsl/gen/tmpl/c_new_f_other.c +25 -0
- data/ext/numo/gsl/gen/tmpl/c_new_sizet.c +22 -0
- data/ext/numo/gsl/gen/tmpl/c_new_sizet_double.c +23 -0
- data/ext/numo/gsl/gen/tmpl/c_new_sizet_x2.c +23 -0
- data/ext/numo/gsl/gen/tmpl/c_new_void.c +21 -0
- data/ext/numo/gsl/gen/tmpl/c_other_f_void.c +19 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat.c +46 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x2.c +41 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x3.c +44 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_DFloat_x4.c +47 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_SZ_x2_DFloat.c +45 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_double.c +17 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_other.c +17 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_sizet.c +21 -0
- data/ext/numo/gsl/gen/tmpl/c_self_f_void.c +14 -0
- data/ext/numo/gsl/gen/tmpl/c_sizet_f_void.c +15 -0
- data/ext/numo/gsl/gen/tmpl/c_sizet_x2_f_void.c +17 -0
- data/ext/numo/gsl/gen/tmpl/c_str_f_void.c +15 -0
- data/ext/numo/gsl/gen/tmpl/c_super_new_void.c +18 -0
- data/ext/numo/gsl/gen/tmpl/c_uint_f_void.c +15 -0
- data/ext/numo/gsl/gen/tmpl/c_ulong_f_void.c +15 -0
- data/ext/numo/gsl/gen/tmpl/c_void_f_double.c +17 -0
- data/ext/numo/gsl/gen/tmpl/c_void_f_double_x2.c +18 -0
- data/ext/numo/gsl/gen/tmpl/c_void_f_double_x4.c +20 -0
- data/ext/numo/gsl/gen/tmpl/c_void_f_ulong.c +17 -0
- data/ext/numo/gsl/gen/tmpl/c_void_f_void.c +14 -0
- data/ext/numo/gsl/gen/tmpl/cast_1d_contiguous.c +15 -0
- data/ext/numo/gsl/gen/tmpl/cast_2d_contiguous.c +15 -0
- data/ext/numo/gsl/gen/tmpl/class.c +26 -0
- data/ext/numo/gsl/gen/tmpl/create_new_narray.c +26 -0
- data/ext/numo/gsl/gen/tmpl/init_class.c +10 -0
- data/ext/numo/gsl/gen/tmpl/init_module.c +12 -0
- data/ext/numo/gsl/gen/tmpl/lib.c +41 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_Int_f_DFloat.c +38 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat.c +35 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_Int.c +39 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_UInt.c +39 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_double.c +42 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_double_x2.c +47 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_int.c +42 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_x2.c +38 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_DFloat_x3.c +41 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_Int.c +36 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt.c +36 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32.c +36 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double.c +43 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double_uint.c +49 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_double_x2.c +48 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt32_uint_x3.c +51 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double.c +43 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double_uint.c +50 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_double_x2.c +48 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_UInt_uint_x3.c +51 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_DFloat.c +41 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_DFloat_x2.c +44 -0
- data/ext/numo/gsl/gen/tmpl/m_DFloat_f_int_x2_DFloat_x2.c +46 -0
- data/ext/numo/gsl/gen/tmpl/m_Int_f_DFloat.c +36 -0
- data/ext/numo/gsl/gen/tmpl/m_Int_f_DFloat_x3.c +42 -0
- data/ext/numo/gsl/gen/tmpl/m_Int_f_int_DFloat.c +42 -0
- data/ext/numo/gsl/gen/tmpl/m_Int_f_int_DFloat_x2.c +45 -0
- data/ext/numo/gsl/gen/tmpl/mod_func_noloop.c +54 -0
- data/ext/numo/gsl/gen/tmpl/mod_func_scalar.c +27 -0
- data/ext/numo/gsl/gen/tmpl/module.c +9 -0
- data/ext/numo/gsl/histogram/depend +17 -0
- data/ext/numo/gsl/histogram/erbpp_histogram.rb +109 -0
- data/ext/numo/gsl/histogram/extconf.rb +9 -0
- data/ext/numo/gsl/histogram/func_2.4.rb +742 -0
- data/ext/numo/gsl/histogram/func_2.5.rb +742 -0
- data/ext/numo/gsl/histogram/func_2.6.rb +742 -0
- data/ext/numo/gsl/histogram/func_def.rb +763 -0
- data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_2d_get.c +54 -0
- data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_field.c +35 -0
- data/ext/numo/gsl/histogram/tmpl/c_DFloat_f_get.c +47 -0
- data/ext/numo/gsl/histogram/tmpl/c_DFloat_x2_f_get_range.c +56 -0
- data/ext/numo/gsl/histogram/tmpl/c_bool_f_other.c +19 -0
- data/ext/numo/gsl/histogram/tmpl/c_bool_f_pdf_init.c +24 -0
- data/ext/numo/gsl/histogram/tmpl/c_self_f_2d_set_ranges.c +26 -0
- data/ext/numo/gsl/histogram/tmpl/c_self_f_set_ranges.c +21 -0
- data/ext/numo/gsl/histogram/tmpl/c_sizet_f_field.c +15 -0
- data/ext/numo/gsl/interp/depend +17 -0
- data/ext/numo/gsl/interp/erbpp_interp.rb +60 -0
- data/ext/numo/gsl/interp/extconf.rb +9 -0
- data/ext/numo/gsl/interp/func_2.4.rb +804 -0
- data/ext/numo/gsl/interp/func_2.5.rb +804 -0
- data/ext/numo/gsl/interp/func_2.6.rb +804 -0
- data/ext/numo/gsl/interp/func_def.rb +816 -0
- data/ext/numo/gsl/interp/parse_interp.rb +67 -0
- data/ext/numo/gsl/interp/tmpl/interp2d_new.c +36 -0
- data/ext/numo/gsl/interp/tmpl/interp2d_type_new.c +17 -0
- data/ext/numo/gsl/interp/tmpl/interp_bsearch.c +57 -0
- data/ext/numo/gsl/interp/tmpl/interp_new.c +29 -0
- data/ext/numo/gsl/interp/tmpl/interp_type_new.c +16 -0
- data/ext/numo/gsl/interp/tmpl/spline2d_eval.c +61 -0
- data/ext/numo/gsl/interp/tmpl/spline_eval.c +55 -0
- data/ext/numo/gsl/interp/tmpl/spline_integ.c +56 -0
- data/ext/numo/gsl/interp/type_def.rb +9 -0
- data/ext/numo/gsl/mkmf_gsl.rb +33 -0
- data/ext/numo/gsl/multifit/depend +17 -0
- data/ext/numo/gsl/multifit/erbpp_multifit.rb +99 -0
- data/ext/numo/gsl/multifit/extconf.rb +9 -0
- data/ext/numo/gsl/multifit/func_2.1.rb +1035 -0
- data/ext/numo/gsl/multifit/func_2.2.1.rb +736 -0
- data/ext/numo/gsl/multifit/func_2.2.rb +736 -0
- data/ext/numo/gsl/multifit/func_2.3.rb +872 -0
- data/ext/numo/gsl/multifit/func_2.4.rb +859 -0
- data/ext/numo/gsl/multifit/func_2.5.rb +859 -0
- data/ext/numo/gsl/multifit/func_2.6.rb +859 -0
- data/ext/numo/gsl/multifit/func_def.rb +1012 -0
- data/ext/numo/gsl/multifit/tmpl/multifit_linear.c +66 -0
- data/ext/numo/gsl/multifit/tmpl/multifit_linear_est.c +48 -0
- data/ext/numo/gsl/multifit/tmpl/multifit_linear_residuals.c +47 -0
- data/ext/numo/gsl/multifit/tmpl/multifit_wlinear.c +70 -0
- data/ext/numo/gsl/multifit/type_def.rb +1 -0
- data/ext/numo/gsl/multilarge/func_2.4.rb +216 -0
- data/ext/numo/gsl/multilarge/func_2.5.rb +216 -0
- data/ext/numo/gsl/multilarge/func_2.6.rb +216 -0
- data/ext/numo/gsl/multilarge/func_def.rb +215 -0
- data/ext/numo/gsl/numo_gsl.h +117 -0
- data/ext/numo/gsl/pdf/depend +17 -0
- data/ext/numo/gsl/pdf/erbpp_pdf.rb +27 -0
- data/ext/numo/gsl/pdf/extconf.rb +9 -0
- data/ext/numo/gsl/pdf/func_2.2.1.rb +306 -0
- data/ext/numo/gsl/pdf/func_2.2.rb +306 -0
- data/ext/numo/gsl/pdf/func_2.3.rb +306 -0
- data/ext/numo/gsl/pdf/func_2.4.rb +303 -0
- data/ext/numo/gsl/pdf/func_2.5.rb +333 -0
- data/ext/numo/gsl/pdf/func_2.6.rb +333 -0
- data/ext/numo/gsl/pdf/func_def.rb +282 -0
- data/ext/numo/gsl/pdf/parse_pdf.rb +42 -0
- data/ext/numo/gsl/pdf/tmpl/dirichlet.c +39 -0
- data/ext/numo/gsl/pdf/tmpl/multinomial.c +39 -0
- data/ext/numo/gsl/poly/depend +17 -0
- data/ext/numo/gsl/poly/erbpp_poly.rb +70 -0
- data/ext/numo/gsl/poly/extconf.rb +9 -0
- data/ext/numo/gsl/poly/func_2.4.rb +220 -0
- data/ext/numo/gsl/poly/func_2.5.rb +220 -0
- data/ext/numo/gsl/poly/func_2.6.rb +220 -0
- data/ext/numo/gsl/poly/func_def.rb +234 -0
- data/ext/numo/gsl/poly/tmpl/poly_complex_solve.c +59 -0
- data/ext/numo/gsl/poly/tmpl/poly_eval.c +70 -0
- data/ext/numo/gsl/poly/tmpl/poly_eval_derivs.c +40 -0
- data/ext/numo/gsl/ran/depend +17 -0
- data/ext/numo/gsl/ran/erbpp_ran.rb +43 -0
- data/ext/numo/gsl/ran/extconf.rb +9 -0
- data/ext/numo/gsl/ran/func_2.2.1.rb +1658 -0
- data/ext/numo/gsl/ran/func_2.2.rb +1658 -0
- data/ext/numo/gsl/ran/func_2.3.rb +1658 -0
- data/ext/numo/gsl/ran/func_2.4.rb +1526 -0
- data/ext/numo/gsl/ran/func_2.5.rb +1573 -0
- data/ext/numo/gsl/ran/func_2.6.rb +1573 -0
- data/ext/numo/gsl/ran/func_def.rb +1594 -0
- data/ext/numo/gsl/ran/parse_ran.rb +10 -0
- data/ext/numo/gsl/rng/depend +17 -0
- data/ext/numo/gsl/rng/erbpp_rng.rb +59 -0
- data/ext/numo/gsl/rng/extconf.rb +9 -0
- data/ext/numo/gsl/rng/func_2.4.rb +187 -0
- data/ext/numo/gsl/rng/func_2.5.rb +187 -0
- data/ext/numo/gsl/rng/func_2.6.rb +187 -0
- data/ext/numo/gsl/rng/func_def.rb +230 -0
- data/ext/numo/gsl/rng/parse_rng.rb +126 -0
- data/ext/numo/gsl/rng/tmpl/ran.c +44 -0
- data/ext/numo/gsl/rng/tmpl/ran_DFloat_f_DFloat.c +28 -0
- data/ext/numo/gsl/rng/tmpl/ran_DFloat_x2.c +45 -0
- data/ext/numo/gsl/rng/tmpl/ran_DFloat_x3.c +51 -0
- data/ext/numo/gsl/rng/tmpl/ran_multinomial.c +32 -0
- data/ext/numo/gsl/rng/tmpl/rng_DFloat.c +29 -0
- data/ext/numo/gsl/rng/tmpl/rng_UInt.c +44 -0
- data/ext/numo/gsl/rng/tmpl/rng_alloc.c +24 -0
- data/ext/numo/gsl/rng/tmpl/rng_type_new.c +14 -0
- data/ext/numo/gsl/rng/type_def.rb +63 -0
- data/ext/numo/gsl/rstat/depend +17 -0
- data/ext/numo/gsl/rstat/erbpp_rstat.rb +64 -0
- data/ext/numo/gsl/rstat/extconf.rb +9 -0
- data/ext/numo/gsl/rstat/func_2.2.1.rb +116 -0
- data/ext/numo/gsl/rstat/func_2.2.rb +116 -0
- data/ext/numo/gsl/rstat/func_2.3.rb +123 -0
- data/ext/numo/gsl/rstat/func_2.4.rb +122 -0
- data/ext/numo/gsl/rstat/func_2.5.rb +122 -0
- data/ext/numo/gsl/rstat/func_2.6.rb +122 -0
- data/ext/numo/gsl/rstat/func_def.rb +102 -0
- data/ext/numo/gsl/sf/depend +17 -0
- data/ext/numo/gsl/sf/erbpp_sf.rb +51 -0
- data/ext/numo/gsl/sf/extconf.rb +9 -0
- data/ext/numo/gsl/sf/func_2.4.rb +4482 -0
- data/ext/numo/gsl/sf/func_2.5.rb +4508 -0
- data/ext/numo/gsl/sf/func_2.6.rb +4538 -0
- data/ext/numo/gsl/sf/func_def.rb +4703 -0
- data/ext/numo/gsl/sf/parse_sf.rb +277 -0
- data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x2_DFloat.c +50 -0
- data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x2_DFloat_x2.c +52 -0
- data/ext/numo/gsl/sf/tmpl/c_DFloat_f_int_x3_DFloat_x2.c +55 -0
- data/ext/numo/gsl/sf/tmpl/m_DFloat_f_DFloat_mode.c +47 -0
- data/ext/numo/gsl/sf/tmpl/m_DFloat_f_lmax_array.c +41 -0
- data/ext/numo/gsl/sf/tmpl/m_DFloat_f_nmin_nmax_array.c +49 -0
- data/ext/numo/gsl/spmatrix/const_2.2.1.rb +3 -0
- data/ext/numo/gsl/spmatrix/const_2.2.rb +3 -0
- data/ext/numo/gsl/spmatrix/const_2.3.rb +3 -0
- data/ext/numo/gsl/spmatrix/const_def.rb +2 -0
- data/ext/numo/gsl/spmatrix/depend +17 -0
- data/ext/numo/gsl/spmatrix/erbpp_spmatrix.rb +101 -0
- data/ext/numo/gsl/spmatrix/extconf.rb +9 -0
- data/ext/numo/gsl/spmatrix/func_2.2.1.rb +297 -0
- data/ext/numo/gsl/spmatrix/func_2.2.rb +297 -0
- data/ext/numo/gsl/spmatrix/func_2.3.rb +297 -0
- data/ext/numo/gsl/spmatrix/func_2.4.rb +300 -0
- data/ext/numo/gsl/spmatrix/func_2.5.rb +300 -0
- data/ext/numo/gsl/spmatrix/func_2.6.rb +372 -0
- data/ext/numo/gsl/spmatrix/func_def.rb +218 -0
- data/ext/numo/gsl/spmatrix/parse_spmatrix.rb +70 -0
- data/ext/numo/gsl/spmatrix/tmpl/itersolve_iterate.c +47 -0
- data/ext/numo/gsl/spmatrix/tmpl/itersolve_new.c +22 -0
- data/ext/numo/gsl/spmatrix/tmpl/itersolve_type_new.c +16 -0
- data/ext/numo/gsl/spmatrix/tmpl/spblas_dgemm.c +35 -0
- data/ext/numo/gsl/spmatrix/tmpl/spblas_dgemv.c +43 -0
- data/ext/numo/gsl/spmatrix/tmpl/spmatrix_add.c +22 -0
- data/ext/numo/gsl/spmatrix/tmpl/spmatrix_d2sp.c +28 -0
- data/ext/numo/gsl/spmatrix/tmpl/spmatrix_new.c +40 -0
- data/ext/numo/gsl/spmatrix/tmpl/spmatrix_sp2d.c +25 -0
- data/ext/numo/gsl/spmatrix/type_def.rb +1 -0
- data/ext/numo/gsl/stats/depend +17 -0
- data/ext/numo/gsl/stats/erbpp_stats.rb +30 -0
- data/ext/numo/gsl/stats/extconf.rb +9 -0
- data/ext/numo/gsl/stats/func_2.2.1.rb +608 -0
- data/ext/numo/gsl/stats/func_2.2.rb +608 -0
- data/ext/numo/gsl/stats/func_2.3.rb +608 -0
- data/ext/numo/gsl/stats/func_2.4.rb +583 -0
- data/ext/numo/gsl/stats/func_2.5.rb +718 -0
- data/ext/numo/gsl/stats/func_2.6.rb +718 -0
- data/ext/numo/gsl/stats/func_def.rb +608 -0
- data/ext/numo/gsl/stats/parse_stats.rb +63 -0
- data/ext/numo/gsl/stats/tmpl/stats_1a0p.c +37 -0
- data/ext/numo/gsl/stats/tmpl/stats_1a0p_index.c +60 -0
- data/ext/numo/gsl/stats/tmpl/stats_1a1p.c +41 -0
- data/ext/numo/gsl/stats/tmpl/stats_1a2p.c +42 -0
- data/ext/numo/gsl/stats/tmpl/stats_2a0p.c +39 -0
- data/ext/numo/gsl/stats/tmpl/stats_2a1p.c +43 -0
- data/ext/numo/gsl/stats/tmpl/stats_2a2p.c +44 -0
- data/ext/numo/gsl/stats/tmpl/stats_minmax.c +37 -0
- data/ext/numo/gsl/stats/tmpl/stats_minmax_index.c +67 -0
- data/ext/numo/gsl/stats/tmpl/stats_spearman.c +46 -0
- data/ext/numo/gsl/sys/const_2.4.rb +20 -0
- data/ext/numo/gsl/sys/const_2.5.rb +20 -0
- data/ext/numo/gsl/sys/const_2.6.rb +20 -0
- data/ext/numo/gsl/sys/const_def.rb +21 -0
- data/ext/numo/gsl/sys/depend +17 -0
- data/ext/numo/gsl/sys/enum_def.rb +75 -0
- data/ext/numo/gsl/sys/erbpp_sys.rb +60 -0
- data/ext/numo/gsl/sys/extconf.rb +9 -0
- data/ext/numo/gsl/sys/func_2.4.rb +236 -0
- data/ext/numo/gsl/sys/func_2.5.rb +236 -0
- data/ext/numo/gsl/sys/func_2.6.rb +236 -0
- data/ext/numo/gsl/sys/func_def.rb +249 -0
- data/ext/numo/gsl/version.h +1 -0
- data/ext/numo/gsl/wavelet/depend +17 -0
- data/ext/numo/gsl/wavelet/erbpp_wavelet.rb +48 -0
- data/ext/numo/gsl/wavelet/extconf.rb +9 -0
- data/ext/numo/gsl/wavelet/func_2.4.rb +304 -0
- data/ext/numo/gsl/wavelet/func_2.5.rb +304 -0
- data/ext/numo/gsl/wavelet/func_2.6.rb +304 -0
- data/ext/numo/gsl/wavelet/func_def.rb +337 -0
- data/ext/numo/gsl/wavelet/parse_wavelet.rb +47 -0
- data/ext/numo/gsl/wavelet/tmpl/wavelet2d_transform.c +56 -0
- data/ext/numo/gsl/wavelet/tmpl/wavelet_array_check.c +56 -0
- data/ext/numo/gsl/wavelet/tmpl/wavelet_macro.c +1 -0
- data/ext/numo/gsl/wavelet/tmpl/wavelet_new.c +20 -0
- data/ext/numo/gsl/wavelet/tmpl/wavelet_transform.c +55 -0
- data/ext/numo/gsl/wavelet/tmpl/wavelet_transform2.c +22 -0
- data/ext/numo/gsl/wavelet/tmpl/wavelet_type_new.c +15 -0
- data/ext/numo/gsl/wavelet/type_def.rb +6 -0
- data/lib/numo/gsl.rb +17 -0
- data/numo-gsl-alt.gemspec +33 -0
- metadata +406 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
[{:func_name=>"gsl_spblas_dgemm",
|
|
2
|
+
:func_type=>"int",
|
|
3
|
+
:args=>
|
|
4
|
+
[["const double", "alpha"],
|
|
5
|
+
["const gsl_spmatrix *", "A"],
|
|
6
|
+
["const gsl_spmatrix *", "B"],
|
|
7
|
+
["gsl_spmatrix *", "C"]],
|
|
8
|
+
:desc=>
|
|
9
|
+
"This function computes the sparse matrix-matrix product\n" +
|
|
10
|
+
"C = \\alpha A B. The matrices must be in compressed format."},
|
|
11
|
+
{:func_name=>"gsl_spblas_dgemv",
|
|
12
|
+
:func_type=>"int",
|
|
13
|
+
:args=>
|
|
14
|
+
[["const CBLAS_TRANSPOSE_t", "TransA"],
|
|
15
|
+
["const double", "alpha"],
|
|
16
|
+
["const gsl_spmatrix *", "A"],
|
|
17
|
+
["const gsl_vector *", "x"],
|
|
18
|
+
["const double", "beta"],
|
|
19
|
+
["gsl_vector *", "y"]],
|
|
20
|
+
:desc=>
|
|
21
|
+
"This function computes the matrix-vector product and sum\n" +
|
|
22
|
+
"y \\leftarrow \\alpha op(A) x + \\beta y, where\n" +
|
|
23
|
+
"op(A) = A, A^T for TransA = CblasNoTrans,\n" +
|
|
24
|
+
"CblasTrans. In-place computations are not supported, so\n" +
|
|
25
|
+
"x and y must be distinct vectors.\n" +
|
|
26
|
+
"The matrix A may be in triplet or compressed format."},
|
|
27
|
+
{:func_name=>"gsl_splinalg_itersolve_alloc",
|
|
28
|
+
:func_type=>"gsl_splinalg_itersolve *",
|
|
29
|
+
:args=>
|
|
30
|
+
[["const gsl_splinalg_itersolve_type *", "T"],
|
|
31
|
+
["const size_t", "n"],
|
|
32
|
+
["const size_t", "m"]],
|
|
33
|
+
:desc=>
|
|
34
|
+
"This function allocates a workspace for the iterative solution of\n" +
|
|
35
|
+
"n-by-n sparse matrix systems. The iterative solver type\n" +
|
|
36
|
+
"is specified by T. The argument m specifies the size\n" +
|
|
37
|
+
"of the solution candidate subspace {\\cal K}_m. The dimension\n" +
|
|
38
|
+
"m may be set to 0 in which case a reasonable default value is used."},
|
|
39
|
+
{:func_name=>"gsl_splinalg_itersolve_free",
|
|
40
|
+
:func_type=>"void",
|
|
41
|
+
:args=>[["gsl_splinalg_itersolve *", "w"]],
|
|
42
|
+
:desc=>"This function frees the memory associated with the workspace w."},
|
|
43
|
+
{:func_name=>"gsl_splinalg_itersolve_iterate",
|
|
44
|
+
:func_type=>"int",
|
|
45
|
+
:args=>
|
|
46
|
+
[["const gsl_spmatrix *", "A"],
|
|
47
|
+
["const gsl_vector *", "b"],
|
|
48
|
+
["const double", "tol"],
|
|
49
|
+
["gsl_vector *", "x"],
|
|
50
|
+
["gsl_splinalg_itersolve *", "w"]],
|
|
51
|
+
:desc=>
|
|
52
|
+
"This function performs one iteration of the iterative method for\n" +
|
|
53
|
+
"the sparse linear system specfied by the matrix A, right hand\n" +
|
|
54
|
+
"side vector b and solution vector x. On input, x\n" +
|
|
55
|
+
"must be set to an initial guess for the solution. On output,\n" +
|
|
56
|
+
"x is updated to give the current solution estimate. The\n" +
|
|
57
|
+
"parameter tol specifies the relative tolerance between the residual\n" +
|
|
58
|
+
"norm and norm of b in order to check for convergence.\n" +
|
|
59
|
+
"When the following condition is satisfied:\n" +
|
|
60
|
+
".. only:: not texinfo\n" +
|
|
61
|
+
".. only:: texinfo\n" +
|
|
62
|
+
"the method has converged, the function returns GSL_SUCCESS and\n" +
|
|
63
|
+
"the final solution is provided in x. Otherwise, the function\n" +
|
|
64
|
+
"returns GSL_CONTINUE to signal that more iterations are\n" +
|
|
65
|
+
"required. Here, || \\cdot || represents the Euclidean norm.\n" +
|
|
66
|
+
"The input matrix A may be in triplet or compressed format."},
|
|
67
|
+
{:func_name=>"gsl_splinalg_itersolve_name",
|
|
68
|
+
:func_type=>"const char *",
|
|
69
|
+
:args=>[["const gsl_splinalg_itersolve *", "w"]],
|
|
70
|
+
:desc=>"This function returns a string pointer to the name of the solver."},
|
|
71
|
+
{:func_name=>"gsl_splinalg_itersolve_normr",
|
|
72
|
+
:func_type=>"double",
|
|
73
|
+
:args=>[["const gsl_splinalg_itersolve *", "w"]],
|
|
74
|
+
:desc=>
|
|
75
|
+
"This function returns the current residual norm\n" +
|
|
76
|
+
"||r|| = ||A x - b||, which is updated after each call to\n" +
|
|
77
|
+
"gsl_splinalg_itersolve_iterate."},
|
|
78
|
+
{:func_name=>"gsl_spmatrix_add",
|
|
79
|
+
:func_type=>"int",
|
|
80
|
+
:args=>
|
|
81
|
+
[["gsl_spmatrix *", "c"],
|
|
82
|
+
["const gsl_spmatrix *", "a"],
|
|
83
|
+
["const gsl_spmatrix *", "b"]],
|
|
84
|
+
:desc=>
|
|
85
|
+
"This function computes the sum c = a + b. The three matrices must\n" +
|
|
86
|
+
"have the same dimensions.\n" +
|
|
87
|
+
"Input matrix formats supported: :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
88
|
+
{:func_name=>"gsl_spmatrix_add_to_dense",
|
|
89
|
+
:func_type=>"int",
|
|
90
|
+
:args=>[["gsl_matrix *", "a"], ["const gsl_spmatrix *", "b"]],
|
|
91
|
+
:desc=>
|
|
92
|
+
"This function adds the elements of the sparse matrix b to the elements of\n" +
|
|
93
|
+
"the dense matrix a. The result a(i,j) \\leftarrow a(i,j) + b(i,j) is\n" +
|
|
94
|
+
"stored in a and b remains unchanged. The two matrices must have\n" +
|
|
95
|
+
"the same dimensions.\n" +
|
|
96
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
97
|
+
{:func_name=>"gsl_spmatrix_alloc",
|
|
98
|
+
:func_type=>"gsl_spmatrix *",
|
|
99
|
+
:args=>[["const size_t", "n1"], ["const size_t", "n2"]],
|
|
100
|
+
:desc=>
|
|
101
|
+
"This function allocates a sparse matrix of size n1-by-n2 and\n" +
|
|
102
|
+
"initializes it to all zeros. If the size of the matrix is not known at allocation\n" +
|
|
103
|
+
"time, both n1 and n2 may be set to 1, and they will automatically\n" +
|
|
104
|
+
"grow as elements are added to the matrix. This function sets the\n" +
|
|
105
|
+
"matrix to the triplet representation, which is the easiest for adding\n" +
|
|
106
|
+
"and accessing matrix elements. This function tries to make a reasonable guess\n" +
|
|
107
|
+
"for the number of non-zero elements (nzmax) which will be added to the matrix by\n" +
|
|
108
|
+
"assuming a sparse density of 10\\%. The function\n" +
|
|
109
|
+
"gsl_spmatrix_alloc_nzmax can be used if this number is known more\n" +
|
|
110
|
+
"accurately. The workspace is of size O(nzmax)."},
|
|
111
|
+
{:func_name=>"gsl_spmatrix_alloc_nzmax",
|
|
112
|
+
:func_type=>"gsl_spmatrix *",
|
|
113
|
+
:args=>
|
|
114
|
+
[["const size_t", "n1"],
|
|
115
|
+
["const size_t", "n2"],
|
|
116
|
+
["const size_t", "nzmax"],
|
|
117
|
+
["const size_t", "sptype"]],
|
|
118
|
+
:desc=>
|
|
119
|
+
"This function allocates a sparse matrix of size n1-by-n2 and\n" +
|
|
120
|
+
"initializes it to all zeros. If the size of the matrix is not known at allocation\n" +
|
|
121
|
+
"time, both n1 and n2 may be set to 1, and they will automatically\n" +
|
|
122
|
+
"grow as elements are added to the matrix. The parameter nzmax specifies\n" +
|
|
123
|
+
"the maximum number of non-zero elements which will be added to the matrix.\n" +
|
|
124
|
+
"It does not need to be precisely known in advance, since storage space will \n" +
|
|
125
|
+
"automatically grow using gsl_spmatrix_realloc if nzmax is not\n" +
|
|
126
|
+
"large enough. Accurate knowledge of this parameter reduces the number of\n" +
|
|
127
|
+
"reallocation calls required. The parameter sptype specifies the\n" +
|
|
128
|
+
"storage format of the sparse matrix. Possible values are\n" +
|
|
129
|
+
".. macro:: GSL_SPMATRIX_COO\n" +
|
|
130
|
+
".. macro:: GSL_SPMATRIX_CSC\n" +
|
|
131
|
+
".. macro:: GSL_SPMATRIX_CSR\n" +
|
|
132
|
+
"The allocated :type:`gsl_spmatrix` structure is of size O(nzmax)."},
|
|
133
|
+
{:func_name=>"gsl_spmatrix_compress",
|
|
134
|
+
:func_type=>"gsl_spmatrix *",
|
|
135
|
+
:args=>[["const gsl_spmatrix *", "src"], ["const int", "sptype"]],
|
|
136
|
+
:desc=>
|
|
137
|
+
"This function allocates a new sparse matrix, and stores src into it using the\n" +
|
|
138
|
+
"format specified by sptype. The input sptype can be one of\n" +
|
|
139
|
+
"GSL_SPMATRIX_COO, GSL_SPMATRIX_CSC, or GSL_SPMATRIX_CSR.\n" +
|
|
140
|
+
"A pointer to the newly allocated matrix is returned, and must be freed by the caller\n" +
|
|
141
|
+
"when no longer needed."},
|
|
142
|
+
{:func_name=>"gsl_spmatrix_csc",
|
|
143
|
+
:func_type=>"int",
|
|
144
|
+
:args=>[["gsl_spmatrix *", "dest"], ["const gsl_spmatrix *", "src"]],
|
|
145
|
+
:desc=>
|
|
146
|
+
"This function creates a sparse matrix in :ref:`compressed sparse column <sec_spmatrix-csc>`\n" +
|
|
147
|
+
"format from the input sparse matrix src which must be in COO format. The\n" +
|
|
148
|
+
"compressed matrix is stored in dest.\n" +
|
|
149
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`"},
|
|
150
|
+
{:func_name=>"gsl_spmatrix_csr",
|
|
151
|
+
:func_type=>"int",
|
|
152
|
+
:args=>[["gsl_spmatrix *", "dest"], ["const gsl_spmatrix *", "src"]],
|
|
153
|
+
:desc=>
|
|
154
|
+
"This function creates a sparse matrix in :ref:`compressed sparse row <sec_spmatrix-csr>`\n" +
|
|
155
|
+
"format from the input sparse matrix src which must be in COO format. The\n" +
|
|
156
|
+
"compressed matrix is stored in dest.\n" +
|
|
157
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`"},
|
|
158
|
+
{:func_name=>"gsl_spmatrix_d2sp",
|
|
159
|
+
:func_type=>"int",
|
|
160
|
+
:args=>[["gsl_spmatrix *", "S"], ["const gsl_matrix *", "A"]],
|
|
161
|
+
:desc=>
|
|
162
|
+
"This function converts the dense matrix A into sparse COO format\n" +
|
|
163
|
+
"and stores the result in S.\n" +
|
|
164
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`"},
|
|
165
|
+
{:func_name=>"gsl_spmatrix_equal",
|
|
166
|
+
:func_type=>"int",
|
|
167
|
+
:args=>[["const gsl_spmatrix *", "a"], ["const gsl_spmatrix *", "b"]],
|
|
168
|
+
:desc=>
|
|
169
|
+
"This function returns 1 if the matrices a and b are equal (by comparison of\n" +
|
|
170
|
+
"element values) and 0 otherwise. The matrices a and b must be in the same\n" +
|
|
171
|
+
"sparse storage format for comparison.\n" +
|
|
172
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
173
|
+
{:func_name=>"gsl_spmatrix_fprintf",
|
|
174
|
+
:func_type=>"int",
|
|
175
|
+
:args=>
|
|
176
|
+
[["FILE *", "stream"],
|
|
177
|
+
["const gsl_spmatrix *", "m"],
|
|
178
|
+
["const char *", "format"]],
|
|
179
|
+
:desc=>
|
|
180
|
+
"This function writes the elements of the matrix m line-by-line to\n" +
|
|
181
|
+
"the stream stream using the format specifier format, which\n" +
|
|
182
|
+
"should be one of the %g, %e or %f formats for\n" +
|
|
183
|
+
"floating point numbers. The function returns 0 for success and\n" +
|
|
184
|
+
"GSL_EFAILED if there was a problem writing to the file. The\n" +
|
|
185
|
+
"input matrix m may be in any storage format, and the output file\n" +
|
|
186
|
+
"will be written in MatrixMarket format.\n" +
|
|
187
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
188
|
+
{:func_name=>"gsl_spmatrix_fread",
|
|
189
|
+
:func_type=>"int",
|
|
190
|
+
:args=>[["FILE *", "stream"], ["gsl_spmatrix *", "m"]],
|
|
191
|
+
:desc=>
|
|
192
|
+
"This function reads into the matrix m from the open stream\n" +
|
|
193
|
+
"stream in binary format. The matrix m must be preallocated\n" +
|
|
194
|
+
"with the correct storage format, dimensions and have a sufficiently large nzmax\n" +
|
|
195
|
+
"in order to read in all matrix elements, otherwise GSL_EBADLEN\n" +
|
|
196
|
+
"is returned. The return value is 0 for success and\n" +
|
|
197
|
+
"GSL_EFAILED if there was a problem reading from the file. The\n" +
|
|
198
|
+
"data is assumed to have been written in the native binary format on the\n" +
|
|
199
|
+
"same architecture.\n" +
|
|
200
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
201
|
+
{:func_name=>"gsl_spmatrix_free",
|
|
202
|
+
:func_type=>"void",
|
|
203
|
+
:args=>[["gsl_spmatrix *", "m"]],
|
|
204
|
+
:desc=>
|
|
205
|
+
"This function frees the memory associated with the sparse matrix m.\n" +
|
|
206
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
207
|
+
{:func_name=>"gsl_spmatrix_fscanf",
|
|
208
|
+
:func_type=>"gsl_spmatrix *",
|
|
209
|
+
:args=>[["FILE *", "stream"]],
|
|
210
|
+
:desc=>
|
|
211
|
+
"This function reads sparse matrix data in the MatrixMarket format\n" +
|
|
212
|
+
"from the stream stream and stores it in a newly allocated matrix\n" +
|
|
213
|
+
"which is returned in :ref:`COO <sec_spmatrix-coo>` format. The function returns 0 for success and\n" +
|
|
214
|
+
"GSL_EFAILED if there was a problem reading from the file. The\n" +
|
|
215
|
+
"user should free the returned matrix when it is no longer needed."},
|
|
216
|
+
{:func_name=>"gsl_spmatrix_fwrite",
|
|
217
|
+
:func_type=>"int",
|
|
218
|
+
:args=>[["FILE *", "stream"], ["const gsl_spmatrix *", "m"]],
|
|
219
|
+
:desc=>
|
|
220
|
+
"This function writes the elements of the matrix m to the stream\n" +
|
|
221
|
+
"stream in binary format. The return value is 0 for success and\n" +
|
|
222
|
+
"GSL_EFAILED if there was a problem writing to the file. Since the\n" +
|
|
223
|
+
"data is written in the native binary format it may not be portable\n" +
|
|
224
|
+
"between different architectures.\n" +
|
|
225
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
226
|
+
{:func_name=>"gsl_spmatrix_get",
|
|
227
|
+
:func_type=>"double",
|
|
228
|
+
:args=>
|
|
229
|
+
[["const gsl_spmatrix *", "m"],
|
|
230
|
+
["const size_t", "i"],
|
|
231
|
+
["const size_t", "j"]],
|
|
232
|
+
:desc=>
|
|
233
|
+
"This function returns element (i, j) of the matrix m.\n" +
|
|
234
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
235
|
+
{:func_name=>"gsl_spmatrix_memcpy",
|
|
236
|
+
:func_type=>"int",
|
|
237
|
+
:args=>[["gsl_spmatrix *", "dest"], ["const gsl_spmatrix *", "src"]],
|
|
238
|
+
:desc=>
|
|
239
|
+
"This function copies the elements of the sparse matrix src into\n" +
|
|
240
|
+
"dest. The two matrices must have the same dimensions and be in the\n" +
|
|
241
|
+
"same storage format.\n" +
|
|
242
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
243
|
+
{:func_name=>"gsl_spmatrix_min_index",
|
|
244
|
+
:func_type=>"int",
|
|
245
|
+
:args=>
|
|
246
|
+
[["const gsl_spmatrix *", "m"], ["size_t *", "imin"], ["size_t *", "jmin"]],
|
|
247
|
+
:desc=>
|
|
248
|
+
"This function returns the indices of the minimum value in the matrix\n" +
|
|
249
|
+
"m, searching only the non-zero values, and storing them in imin and jmin.\n" +
|
|
250
|
+
"When there are several equal minimum elements then the first element found is returned.\n" +
|
|
251
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
252
|
+
{:func_name=>"gsl_spmatrix_minmax",
|
|
253
|
+
:func_type=>"int",
|
|
254
|
+
:args=>
|
|
255
|
+
[["const gsl_spmatrix *", "m"],
|
|
256
|
+
["double *", "min_out"],
|
|
257
|
+
["double *", "max_out"]],
|
|
258
|
+
:desc=>
|
|
259
|
+
"This function returns the minimum and maximum elements of the matrix\n" +
|
|
260
|
+
"m, storing them in min_out and max_out, and searching\n" +
|
|
261
|
+
"only the non-zero values.\n" +
|
|
262
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
263
|
+
{:func_name=>"gsl_spmatrix_nnz",
|
|
264
|
+
:func_type=>"size_t",
|
|
265
|
+
:args=>[["const gsl_spmatrix *", "m"]],
|
|
266
|
+
:desc=>
|
|
267
|
+
"This function returns the number of non-zero elements in m.\n" +
|
|
268
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
269
|
+
{:func_name=>"gsl_spmatrix_ptr",
|
|
270
|
+
:func_type=>"double *",
|
|
271
|
+
:args=>
|
|
272
|
+
[["gsl_spmatrix *", "m"], ["const size_t", "i"], ["const size_t", "j"]],
|
|
273
|
+
:desc=>
|
|
274
|
+
"This function returns a pointer to the (i, j) element of the matrix m.\n" +
|
|
275
|
+
"If the (i, j) element is not explicitly stored in the matrix,\n" +
|
|
276
|
+
"a null pointer is returned.\n" +
|
|
277
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
278
|
+
{:func_name=>"gsl_spmatrix_realloc",
|
|
279
|
+
:func_type=>"int",
|
|
280
|
+
:args=>[["const size_t", "nzmax"], ["gsl_spmatrix *", "m"]],
|
|
281
|
+
:desc=>
|
|
282
|
+
"This function reallocates the storage space for m to accomodate\n" +
|
|
283
|
+
"nzmax non-zero elements. It is typically called internally by\n" +
|
|
284
|
+
"gsl_spmatrix_set if the user wants to add more elements to the\n" +
|
|
285
|
+
"sparse matrix than the previously specified nzmax.\n" +
|
|
286
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
287
|
+
{:func_name=>"gsl_spmatrix_scale",
|
|
288
|
+
:func_type=>"int",
|
|
289
|
+
:args=>[["gsl_spmatrix *", "m"], ["const double", "x"]],
|
|
290
|
+
:desc=>
|
|
291
|
+
"This function scales all elements of the matrix m by the constant\n" +
|
|
292
|
+
"factor x. The result m(i,j) \\leftarrow x m(i,j) is stored in m.\n" +
|
|
293
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
294
|
+
{:func_name=>"gsl_spmatrix_scale_columns",
|
|
295
|
+
:func_type=>"int",
|
|
296
|
+
:args=>[["gsl_spmatrix *", "A"], ["const gsl_vector *", "x"]],
|
|
297
|
+
:desc=>
|
|
298
|
+
"This function scales the columns of the M-by-N sparse matrix\n" +
|
|
299
|
+
"A by the elements of the vector x, of length N. The\n" +
|
|
300
|
+
"j-th column of A is multiplied by x[j]. This is equivalent to\n" +
|
|
301
|
+
"forming\n" +
|
|
302
|
+
".. math:: A \\rightarrow A X\n" +
|
|
303
|
+
"where X = \\textrm{diag}(x).\n" +
|
|
304
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
305
|
+
{:func_name=>"gsl_spmatrix_scale_rows",
|
|
306
|
+
:func_type=>"int",
|
|
307
|
+
:args=>[["gsl_spmatrix *", "A"], ["const gsl_vector *", "x"]],
|
|
308
|
+
:desc=>
|
|
309
|
+
"This function scales the rows of the M-by-N sparse matrix\n" +
|
|
310
|
+
"A by the elements of the vector x, of length M. The\n" +
|
|
311
|
+
"i-th row of A is multiplied by x[i]. This is equivalent to\n" +
|
|
312
|
+
"forming\n" +
|
|
313
|
+
".. math:: A \\rightarrow X A\n" +
|
|
314
|
+
"where X = \\textrm{diag}(x).\n" +
|
|
315
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
316
|
+
{:func_name=>"gsl_spmatrix_set",
|
|
317
|
+
:func_type=>"int",
|
|
318
|
+
:args=>
|
|
319
|
+
[["gsl_spmatrix *", "m"],
|
|
320
|
+
["const size_t", "i"],
|
|
321
|
+
["const size_t", "j"],
|
|
322
|
+
["const double", "x"]],
|
|
323
|
+
:desc=>
|
|
324
|
+
"This function sets element (i, j) of the matrix m to\n" +
|
|
325
|
+
"the value x.\n" +
|
|
326
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`"},
|
|
327
|
+
{:func_name=>"gsl_spmatrix_set_zero",
|
|
328
|
+
:func_type=>"int",
|
|
329
|
+
:args=>[["gsl_spmatrix *", "m"]],
|
|
330
|
+
:desc=>
|
|
331
|
+
"This function sets (or resets) all the elements of the matrix m to zero.\n" +
|
|
332
|
+
"For CSC and CSR matrices, the cost of this operation is O(1). For\n" +
|
|
333
|
+
"COO matrices, the binary tree structure must be dismantled, so the cost is\n" +
|
|
334
|
+
"O(nz).\n" +
|
|
335
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
336
|
+
{:func_name=>"gsl_spmatrix_sp2d",
|
|
337
|
+
:func_type=>"int",
|
|
338
|
+
:args=>[["gsl_matrix *", "A"], ["const gsl_spmatrix *", "S"]],
|
|
339
|
+
:desc=>
|
|
340
|
+
"This function converts the sparse matrix S into a dense matrix and\n" +
|
|
341
|
+
"stores the result in A.\n" +
|
|
342
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
343
|
+
{:func_name=>"gsl_spmatrix_transpose",
|
|
344
|
+
:func_type=>"int",
|
|
345
|
+
:args=>[["gsl_spmatrix *", "m"]],
|
|
346
|
+
:desc=>
|
|
347
|
+
"This function replaces the matrix m by its transpose, but\n" +
|
|
348
|
+
"changes the storage format for compressed matrix inputs. Since\n" +
|
|
349
|
+
"compressed column storage is the transpose of compressed row storage,\n" +
|
|
350
|
+
"this function simply converts a CSC matrix to CSR and vice versa.\n" +
|
|
351
|
+
"This is the most efficient way to transpose a compressed storage\n" +
|
|
352
|
+
"matrix, but the user should note that the storage format of their\n" +
|
|
353
|
+
"compressed matrix will change on output. For COO matrix inputs,\n" +
|
|
354
|
+
"the output matrix is also in COO storage.\n" +
|
|
355
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
356
|
+
{:func_name=>"gsl_spmatrix_transpose_memcpy",
|
|
357
|
+
:func_type=>"int",
|
|
358
|
+
:args=>[["gsl_spmatrix *", "dest"], ["const gsl_spmatrix *", "src"]],
|
|
359
|
+
:desc=>
|
|
360
|
+
"This function copies the transpose of the sparse matrix src into\n" +
|
|
361
|
+
"dest. The dimensions of dest must match the transpose of the\n" +
|
|
362
|
+
"matrix src. Also, both matrices must use the same sparse storage\n" +
|
|
363
|
+
"format.\n" +
|
|
364
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"},
|
|
365
|
+
{:func_name=>"gsl_spmatrix_type",
|
|
366
|
+
:func_type=>"const char *",
|
|
367
|
+
:args=>[["const gsl_spmatrix *", "m"]],
|
|
368
|
+
:desc=>
|
|
369
|
+
"This function returns a string describing the sparse storage format of\n" +
|
|
370
|
+
"the matrix m. For example::\n" +
|
|
371
|
+
"would print something like::\n" +
|
|
372
|
+
"Input matrix formats supported: :ref:`COO <sec_spmatrix-coo>`, :ref:`CSC <sec_spmatrix-csc>`, :ref:`CSR <sec_spmatrix-csr>`"}]
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
[{:func_name=>"gsl_spblas_dgemm",
|
|
2
|
+
:func_type=>"int",
|
|
3
|
+
:args=>
|
|
4
|
+
[["const double", "alpha"],
|
|
5
|
+
["const gsl_spmatrix *", "A"],
|
|
6
|
+
["const gsl_spmatrix *", "B"],
|
|
7
|
+
["gsl_spmatrix *", "C"]],
|
|
8
|
+
:desc=>
|
|
9
|
+
"This function computes the sparse matrix-matrix product\n" +
|
|
10
|
+
"C = \\alpha A B. The matrices must be in compressed format."},
|
|
11
|
+
{:func_name=>"gsl_spblas_dgemv",
|
|
12
|
+
:func_type=>"int",
|
|
13
|
+
:args=>
|
|
14
|
+
[["const CBLAS_TRANSPOSE_t", "TransA"],
|
|
15
|
+
["const double", "alpha"],
|
|
16
|
+
["const gsl_spmatrix *", "A"],
|
|
17
|
+
["const gsl_vector *", "x"],
|
|
18
|
+
["const double", "beta"],
|
|
19
|
+
["gsl_vector *", "y"]],
|
|
20
|
+
:desc=>
|
|
21
|
+
"This function computes the matrix-vector product and sum\n" +
|
|
22
|
+
"y \\leftarrow \\alpha op(A) x + \\beta y, where\n" +
|
|
23
|
+
"op(A) = A, A^T for TransA = CblasNoTrans,\n" +
|
|
24
|
+
"CblasTrans. In-place computations are not supported, so\n" +
|
|
25
|
+
"x and y must be distinct vectors.\n" +
|
|
26
|
+
"The matrix A may be in triplet or compressed format."},
|
|
27
|
+
{:func_name=>"gsl_splinalg_itersolve_alloc",
|
|
28
|
+
:func_type=>"gsl_splinalg_itersolve *",
|
|
29
|
+
:args=>
|
|
30
|
+
[["const gsl_splinalg_itersolve_type *", "T"],
|
|
31
|
+
["const size_t", "n"],
|
|
32
|
+
["const size_t", "m"]],
|
|
33
|
+
:desc=>
|
|
34
|
+
"This function allocates a workspace for the iterative solution of\n" +
|
|
35
|
+
"n-by-n sparse matrix systems. The iterative solver type\n" +
|
|
36
|
+
"is specified by T. The argument m specifies the size\n" +
|
|
37
|
+
"of the solution candidate subspace {\\cal K}_m. The dimension\n" +
|
|
38
|
+
"m may be set to 0 in which case a reasonable default value is used."},
|
|
39
|
+
{:func_name=>"gsl_splinalg_itersolve_free",
|
|
40
|
+
:func_type=>"void",
|
|
41
|
+
:args=>[["gsl_splinalg_itersolve *", "w"]],
|
|
42
|
+
:desc=>"This function frees the memory associated with the workspace w."},
|
|
43
|
+
{:func_name=>"gsl_splinalg_itersolve_iterate",
|
|
44
|
+
:func_type=>"int",
|
|
45
|
+
:args=>
|
|
46
|
+
[["const gsl_spmatrix *", "A"],
|
|
47
|
+
["const gsl_vector *", "b"],
|
|
48
|
+
["const double", "tol"],
|
|
49
|
+
["gsl_vector *", "x"],
|
|
50
|
+
["gsl_splinalg_itersolve *", "w"]],
|
|
51
|
+
:desc=>
|
|
52
|
+
"This function performs one iteration of the iterative method for\n" +
|
|
53
|
+
"the sparse linear system specfied by the matrix A, right hand\n" +
|
|
54
|
+
"side vector b and solution vector x. On input, x\n" +
|
|
55
|
+
"must be set to an initial guess for the solution. On output,\n" +
|
|
56
|
+
"x is updated to give the current solution estimate. The\n" +
|
|
57
|
+
"parameter tol specifies the relative tolerance between the residual\n" +
|
|
58
|
+
"norm and norm of b in order to check for convergence.\n" +
|
|
59
|
+
"When the following condition is satisfied:\n" +
|
|
60
|
+
"|| A x - b || <= tol * || b ||\n" +
|
|
61
|
+
"the method has converged, the function returns GSL_SUCCESS and\n" +
|
|
62
|
+
"the final solution is provided in x. Otherwise, the function\n" +
|
|
63
|
+
"returns GSL_CONTINUE to signal that more iterations are\n" +
|
|
64
|
+
"required. Here, || \\cdot || represents the Euclidean norm.\n" +
|
|
65
|
+
"The input matrix A may be in triplet or compressed column\n" +
|
|
66
|
+
"format."},
|
|
67
|
+
{:func_name=>"gsl_splinalg_itersolve_name",
|
|
68
|
+
:func_type=>"const char *",
|
|
69
|
+
:args=>[["const gsl_splinalg_itersolve *", "w"]],
|
|
70
|
+
:desc=>"This function returns a string pointer to the name of the solver."},
|
|
71
|
+
{:func_name=>"gsl_splinalg_itersolve_normr",
|
|
72
|
+
:func_type=>"double",
|
|
73
|
+
:args=>[["const gsl_splinalg_itersolve *", "w"]],
|
|
74
|
+
:desc=>
|
|
75
|
+
"This function returns the current residual norm\n" +
|
|
76
|
+
"||r|| = ||A x - b||, which is updated after each call to\n" +
|
|
77
|
+
"gsl_splinalg_itersolve_iterate."},
|
|
78
|
+
{:func_name=>"gsl_spmatrix_add",
|
|
79
|
+
:func_type=>"int",
|
|
80
|
+
:args=>
|
|
81
|
+
[["gsl_spmatrix *", "c"],
|
|
82
|
+
["const gsl_spmatrix *", "a"],
|
|
83
|
+
["const gsl_spmatrix *", "b"]],
|
|
84
|
+
:desc=>
|
|
85
|
+
"This function computes the sum c = a + b. The three matrices must\n" +
|
|
86
|
+
"have the same dimensions and be stored in compressed column format."},
|
|
87
|
+
{:func_name=>"gsl_spmatrix_alloc",
|
|
88
|
+
:func_type=>"gsl_spmatrix *",
|
|
89
|
+
:args=>[["const size_t", "n1"], ["const size_t", "n2"]],
|
|
90
|
+
:desc=>
|
|
91
|
+
"This function allocates a sparse matrix of size n1-by-n2 and\n" +
|
|
92
|
+
"initializes it to all zeros. If the size of the matrix is not known at allocation\n" +
|
|
93
|
+
"time, both n1 and n2 may be set to 1, and they will automatically\n" +
|
|
94
|
+
"grow as elements are added to the matrix. This function sets the\n" +
|
|
95
|
+
"matrix to the triplet representation, which is the easiest for adding\n" +
|
|
96
|
+
"and accessing matrix elements. This function tries to make a reasonable guess\n" +
|
|
97
|
+
"for the number of non-zero elements (nzmax) which will be added to the matrix by\n" +
|
|
98
|
+
"assuming a sparse density of 10\\%. The function\n" +
|
|
99
|
+
"gsl_spmatrix_alloc_nzmax can be used if this number is known more\n" +
|
|
100
|
+
"accurately. The workspace is of size O(nzmax)."},
|
|
101
|
+
{:func_name=>"gsl_spmatrix_alloc_nzmax",
|
|
102
|
+
:func_type=>"gsl_spmatrix *",
|
|
103
|
+
:args=>
|
|
104
|
+
[["const size_t", "n1"],
|
|
105
|
+
["const size_t", "n2"],
|
|
106
|
+
["const size_t", "nzmax"],
|
|
107
|
+
["const size_t", "sptype"]],
|
|
108
|
+
:desc=>
|
|
109
|
+
"This function allocates a sparse matrix of size n1-by-n2 and\n" +
|
|
110
|
+
"initializes it to all zeros. If the size of the matrix is not known at allocation\n" +
|
|
111
|
+
"time, both n1 and n2 may be set to 1, and they will automatically\n" +
|
|
112
|
+
"grow as elements are added to the matrix. The parameter nzmax specifies\n" +
|
|
113
|
+
"the maximum number of non-zero elements which will be added to the matrix.\n" +
|
|
114
|
+
"It does not need to be precisely known in advance, since storage space will \n" +
|
|
115
|
+
"automatically grow using gsl_spmatrix_realloc if nzmax is not\n" +
|
|
116
|
+
"large enough. Accurate knowledge of this parameter reduces the number of\n" +
|
|
117
|
+
"reallocation calls required. The parameter sptype specifies the\n" +
|
|
118
|
+
"storage format of the sparse matrix. Possible values are\n" +
|
|
119
|
+
"The allocated gsl_spmatrix structure is of size O(nzmax)."},
|
|
120
|
+
{:func_name=>"gsl_spmatrix_compcol",
|
|
121
|
+
:func_type=>"gsl_spmatrix *",
|
|
122
|
+
:args=>[["const gsl_spmatrix *", "T"]],
|
|
123
|
+
:desc=>
|
|
124
|
+
"This function creates a sparse matrix in compressed column format\n" +
|
|
125
|
+
"from the input sparse matrix T which must be in triplet format.\n" +
|
|
126
|
+
"A pointer to a newly allocated matrix is returned. The calling function\n" +
|
|
127
|
+
"should free the newly allocated matrix when it is no longer needed."},
|
|
128
|
+
{:func_name=>"gsl_spmatrix_d2sp",
|
|
129
|
+
:func_type=>"int",
|
|
130
|
+
:args=>[["gsl_spmatrix *", "S"], ["const gsl_matrix *", "A"]],
|
|
131
|
+
:desc=>
|
|
132
|
+
"This function converts the dense matrix A into sparse triplet format\n" +
|
|
133
|
+
"and stores the result in S."},
|
|
134
|
+
{:func_name=>"gsl_spmatrix_equal",
|
|
135
|
+
:func_type=>"int",
|
|
136
|
+
:args=>[["const gsl_spmatrix *", "a"], ["const gsl_spmatrix *", "b"]],
|
|
137
|
+
:desc=>
|
|
138
|
+
"This function returns 1 if the matrices a and b are equal (by comparison of\n" +
|
|
139
|
+
"element values) and 0 otherwise. The matrices a and b must be either\n" +
|
|
140
|
+
"both triplet format or both compressed format for comparison."},
|
|
141
|
+
{:func_name=>"gsl_spmatrix_free",
|
|
142
|
+
:func_type=>"void",
|
|
143
|
+
:args=>[["gsl_spmatrix *", "m"]],
|
|
144
|
+
:desc=>
|
|
145
|
+
"This function frees the memory associated with the sparse matrix m."},
|
|
146
|
+
{:func_name=>"gsl_spmatrix_get",
|
|
147
|
+
:func_type=>"double",
|
|
148
|
+
:args=>
|
|
149
|
+
[["const gsl_spmatrix *", "m"],
|
|
150
|
+
["const size_t", "i"],
|
|
151
|
+
["const size_t", "j"]],
|
|
152
|
+
:desc=>
|
|
153
|
+
"This function returns element (i,j) of the matrix m.\n" +
|
|
154
|
+
"The matrix may be in triplet or compressed format."},
|
|
155
|
+
{:func_name=>"gsl_spmatrix_memcpy",
|
|
156
|
+
:func_type=>"int",
|
|
157
|
+
:args=>[["gsl_spmatrix *", "dest"], ["const gsl_spmatrix *", "src"]],
|
|
158
|
+
:desc=>
|
|
159
|
+
"This function copies the elements of the sparse matrix src into\n" +
|
|
160
|
+
"dest. The two matrices must have the same dimensions and be in the\n" +
|
|
161
|
+
"same storage format."},
|
|
162
|
+
{:func_name=>"gsl_spmatrix_minmax",
|
|
163
|
+
:func_type=>"int",
|
|
164
|
+
:args=>
|
|
165
|
+
[["const gsl_spmatrix *", "m"],
|
|
166
|
+
["double *", "min_out"],
|
|
167
|
+
["double *", "max_out"]],
|
|
168
|
+
:desc=>
|
|
169
|
+
"This function returns the minimum and maximum elements of the matrix\n" +
|
|
170
|
+
"m, storing them in min_out and max_out, and searching\n" +
|
|
171
|
+
"only the non-zero values."},
|
|
172
|
+
{:func_name=>"gsl_spmatrix_nnz",
|
|
173
|
+
:func_type=>"size_t",
|
|
174
|
+
:args=>[["const gsl_spmatrix *", "m"]],
|
|
175
|
+
:desc=>"This function returns the number of non-zero elements in m."},
|
|
176
|
+
{:func_name=>"gsl_spmatrix_realloc",
|
|
177
|
+
:func_type=>"int",
|
|
178
|
+
:args=>[["const size_t", "nzmax"], ["gsl_spmatrix *", "m"]],
|
|
179
|
+
:desc=>
|
|
180
|
+
"This function reallocates the storage space for m to accomodate\n" +
|
|
181
|
+
"nzmax non-zero elements. It is typically called internally by\n" +
|
|
182
|
+
"gsl_spmatrix_set if the user wants to add more elements to the\n" +
|
|
183
|
+
"sparse matrix than the previously specified nzmax."},
|
|
184
|
+
{:func_name=>"gsl_spmatrix_scale",
|
|
185
|
+
:func_type=>"int",
|
|
186
|
+
:args=>[["gsl_spmatrix *", "m"], ["const double", "x"]],
|
|
187
|
+
:desc=>
|
|
188
|
+
"This function scales all elements of the matrix m by the constant\n" +
|
|
189
|
+
"factor x. The result m(i,j) \\leftarrow x m(i,j) is stored in m."},
|
|
190
|
+
{:func_name=>"gsl_spmatrix_set",
|
|
191
|
+
:func_type=>"int",
|
|
192
|
+
:args=>
|
|
193
|
+
[["gsl_spmatrix *", "m"],
|
|
194
|
+
["const size_t", "i"],
|
|
195
|
+
["const size_t", "j"],
|
|
196
|
+
["const double", "x"]],
|
|
197
|
+
:desc=>
|
|
198
|
+
"This function sets element (i,j) of the matrix m to\n" +
|
|
199
|
+
"the value x. The matrix must be in triplet representation."},
|
|
200
|
+
{:func_name=>"gsl_spmatrix_set_zero",
|
|
201
|
+
:func_type=>"int",
|
|
202
|
+
:args=>[["gsl_spmatrix *", "m"]],
|
|
203
|
+
:desc=>
|
|
204
|
+
"This function sets (or resets) all the elements of the matrix m to zero."},
|
|
205
|
+
{:func_name=>"gsl_spmatrix_sp2d",
|
|
206
|
+
:func_type=>"int",
|
|
207
|
+
:args=>[["gsl_matrix *", "A"], ["const gsl_spmatrix *", "S"]],
|
|
208
|
+
:desc=>
|
|
209
|
+
"This function converts the sparse matrix S into a dense matrix and\n" +
|
|
210
|
+
"stores the result in A. S must be in triplet format."},
|
|
211
|
+
{:func_name=>"gsl_spmatrix_transpose_memcpy",
|
|
212
|
+
:func_type=>"int",
|
|
213
|
+
:args=>[["gsl_spmatrix *", "dest"], ["const gsl_spmatrix *", "src"]],
|
|
214
|
+
:desc=>
|
|
215
|
+
"This function copies the transpose of the sparse matrix src into\n" +
|
|
216
|
+
"dest. The dimensions of dest must match the transpose of the\n" +
|
|
217
|
+
"matrix src. Also, both matrices must use the same sparse storage\n" +
|
|
218
|
+
"format."}]
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
require_relative "../gen/erbpp_gsl"
|
|
2
|
+
|
|
3
|
+
class DefSpMatrix < DefGslClass
|
|
4
|
+
def lookup(h)
|
|
5
|
+
case h
|
|
6
|
+
when FM(name:/_free$/); false
|
|
7
|
+
when FM(name:/_alloc$/); false
|
|
8
|
+
when FM(name:/_alloc_nzmax$/); "spmatrix_new"
|
|
9
|
+
|
|
10
|
+
when FM(name:/_sp2d$/); "spmatrix_sp2d"
|
|
11
|
+
when FM(name:/_d2sp$/); "spmatrix_d2sp"
|
|
12
|
+
|
|
13
|
+
when FM(tp,tp,tp,name:/_add$/); "spmatrix_add"
|
|
14
|
+
when FM(tp,*[szt]*2,type:"double"); "c_DFloat_f_SZ_x2"
|
|
15
|
+
when FM(tp,*[szt]*2,"double"); "c_self_f_SZ_x2_DFloat"
|
|
16
|
+
when FM(szt,tp); h[:postpose]=true; "c_self_f_sizet"
|
|
17
|
+
when FM(tp,"double"); "c_self_f_double"
|
|
18
|
+
when FM(tp,*["double *"]*2); "c_double_x2_f_void"
|
|
19
|
+
when FM(tp,type:tp); "c_other_f_void"
|
|
20
|
+
when FM(tp,tp,type:"int"); "c_self_f_other"
|
|
21
|
+
when FM(tp,type:"size_t"); "c_sizet_f_void"
|
|
22
|
+
when FM(tp,type:"int"); "c_self_f_void"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DefSpBlas < DefGslModule
|
|
29
|
+
def lookup(h)
|
|
30
|
+
case h
|
|
31
|
+
when FM(name:/_dgemv$/); "spblas_dgemv"
|
|
32
|
+
when FM(name:/_dgemm$/); "spblas_dgemm"
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class DefIterSolve < DefGslClass
|
|
39
|
+
|
|
40
|
+
def lookup(h)
|
|
41
|
+
case h
|
|
42
|
+
when FM(name:/_free$/); false
|
|
43
|
+
when FM(name:/_itersolve_alloc$/); "itersolve_new"
|
|
44
|
+
when FM(name:/_itersolve_iterate$/); "itersolve_iterate"
|
|
45
|
+
when FM(tp, type:str); "c_str_f_void"
|
|
46
|
+
when FM(tp, type:dbl); "c_double_f_void"
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
ITERSOLVE_TYPES = ErbppGsl.read_type.select{|s|
|
|
51
|
+
/gsl_splinalg_itersolve_/ =~ s
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
def check_func(h)
|
|
55
|
+
if t = lookup(h)
|
|
56
|
+
m = h[:func_name].sub(/^gsl_splinalg_itersolve_/,"")
|
|
57
|
+
DefMethod.new(self, t, name:m, **h)
|
|
58
|
+
if /_alloc$/ =~ h[:func_name]
|
|
59
|
+
t = "itersolve_type_new"
|
|
60
|
+
ITERSOLVE_TYPES.each do |st|
|
|
61
|
+
DefSubclassNew.new(self, t, st, **h)
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
return true
|
|
65
|
+
end
|
|
66
|
+
$stderr.puts "skip #{h[:func_name]}"
|
|
67
|
+
false
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
end
|