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,128 @@
|
|
|
1
|
+
[{:func_name=>"gsl_fit_linear",
|
|
2
|
+
:func_type=>"int",
|
|
3
|
+
:args=>
|
|
4
|
+
[["const double *", "x"],
|
|
5
|
+
["const size_t", "xstride"],
|
|
6
|
+
["const double *", "y"],
|
|
7
|
+
["const size_t", "ystride"],
|
|
8
|
+
["size_t", "n"],
|
|
9
|
+
["double *", "c0"],
|
|
10
|
+
["double *", "c1"],
|
|
11
|
+
["double *", "cov00"],
|
|
12
|
+
["double *", "cov01"],
|
|
13
|
+
["double *", "cov11"],
|
|
14
|
+
["double *", "sumsq"]],
|
|
15
|
+
:desc=>
|
|
16
|
+
"This function computes the best-fit linear regression coefficients\n" +
|
|
17
|
+
"(c0, c1) of the model Y = c_0 + c_1 X for the dataset\n" +
|
|
18
|
+
"(x, y), two vectors of length n with strides\n" +
|
|
19
|
+
"xstride and ystride. The errors on y are assumed unknown so \n" +
|
|
20
|
+
"the variance-covariance matrix for the\n" +
|
|
21
|
+
"parameters (c0, c1) is estimated from the scatter of the\n" +
|
|
22
|
+
"points around the best-fit line and returned via the parameters\n" +
|
|
23
|
+
"(cov00, cov01, cov11). \n" +
|
|
24
|
+
"The sum of squares of the residuals from the best-fit line is returned\n" +
|
|
25
|
+
"in sumsq. Note: the correlation coefficient of the data can be computed using\n" +
|
|
26
|
+
"gsl_stats_correlation, it does not depend on the fit."},
|
|
27
|
+
{:func_name=>"gsl_fit_linear_est",
|
|
28
|
+
:func_type=>"int",
|
|
29
|
+
:args=>
|
|
30
|
+
[["double", "x"],
|
|
31
|
+
["double", "c0"],
|
|
32
|
+
["double", "c1"],
|
|
33
|
+
["double", "cov00"],
|
|
34
|
+
["double", "cov01"],
|
|
35
|
+
["double", "cov11"],
|
|
36
|
+
["double *", "y"],
|
|
37
|
+
["double *", "y_err"]],
|
|
38
|
+
:desc=>
|
|
39
|
+
"This function uses the best-fit linear regression coefficients\n" +
|
|
40
|
+
"c0, c1 and their covariance\n" +
|
|
41
|
+
"cov00, cov01, cov11 to compute the fitted function\n" +
|
|
42
|
+
"y and its standard deviation y_err for the model Y = c_0 + c_1 X\n" +
|
|
43
|
+
"at the point x."},
|
|
44
|
+
{:func_name=>"gsl_fit_mul",
|
|
45
|
+
:func_type=>"int",
|
|
46
|
+
:args=>
|
|
47
|
+
[["const double *", "x"],
|
|
48
|
+
["const size_t", "xstride"],
|
|
49
|
+
["const double *", "y"],
|
|
50
|
+
["const size_t", "ystride"],
|
|
51
|
+
["size_t", "n"],
|
|
52
|
+
["double *", "c1"],
|
|
53
|
+
["double *", "cov11"],
|
|
54
|
+
["double *", "sumsq"]],
|
|
55
|
+
:desc=>
|
|
56
|
+
"This function computes the best-fit linear regression coefficient\n" +
|
|
57
|
+
"c1 of the model Y = c_1 X for the datasets (x,\n" +
|
|
58
|
+
"y), two vectors of length n with strides xstride and\n" +
|
|
59
|
+
"ystride. The errors on y are assumed unknown so the \n" +
|
|
60
|
+
"variance of the parameter c1 is estimated from\n" +
|
|
61
|
+
"the scatter of the points around the best-fit line and returned via the\n" +
|
|
62
|
+
"parameter cov11. The sum of squares of the residuals from the\n" +
|
|
63
|
+
"best-fit line is returned in sumsq."},
|
|
64
|
+
{:func_name=>"gsl_fit_mul_est",
|
|
65
|
+
:func_type=>"int",
|
|
66
|
+
:args=>
|
|
67
|
+
[["double", "x"],
|
|
68
|
+
["double", "c1"],
|
|
69
|
+
["double", "cov11"],
|
|
70
|
+
["double *", "y"],
|
|
71
|
+
["double *", "y_err"]],
|
|
72
|
+
:desc=>
|
|
73
|
+
"This function uses the best-fit linear regression coefficient c1\n" +
|
|
74
|
+
"and its covariance cov11 to compute the fitted function\n" +
|
|
75
|
+
"y and its standard deviation y_err for the model Y = c_1 X\n" +
|
|
76
|
+
"at the point x."},
|
|
77
|
+
{:func_name=>"gsl_fit_wlinear",
|
|
78
|
+
:func_type=>"int",
|
|
79
|
+
:args=>
|
|
80
|
+
[["const double *", "x"],
|
|
81
|
+
["const size_t", "xstride"],
|
|
82
|
+
["const double *", "w"],
|
|
83
|
+
["const size_t", "wstride"],
|
|
84
|
+
["const double *", "y"],
|
|
85
|
+
["const size_t", "ystride"],
|
|
86
|
+
["size_t", "n"],
|
|
87
|
+
["double *", "c0"],
|
|
88
|
+
["double *", "c1"],
|
|
89
|
+
["double *", "cov00"],
|
|
90
|
+
["double *", "cov01"],
|
|
91
|
+
["double *", "cov11"],
|
|
92
|
+
["double *", "chisq"]],
|
|
93
|
+
:desc=>
|
|
94
|
+
"This function computes the best-fit linear regression coefficients\n" +
|
|
95
|
+
"(c0, c1) of the model Y = c_0 + c_1 X for the weighted\n" +
|
|
96
|
+
"dataset (x, y), two vectors of length n with strides\n" +
|
|
97
|
+
"xstride and ystride. The vector w, of length n\n" +
|
|
98
|
+
"and stride wstride, specifies the weight of each datapoint. The\n" +
|
|
99
|
+
"weight is the reciprocal of the variance for each datapoint in y.\n" +
|
|
100
|
+
"The covariance matrix for the parameters (c0, c1) is\n" +
|
|
101
|
+
"computed using the weights and returned via the parameters\n" +
|
|
102
|
+
"(cov00, cov01, cov11). The weighted sum of squares\n" +
|
|
103
|
+
"of the residuals from the best-fit line, \\chi^2, is returned in\n" +
|
|
104
|
+
"chisq."},
|
|
105
|
+
{:func_name=>"gsl_fit_wmul",
|
|
106
|
+
:func_type=>"int",
|
|
107
|
+
:args=>
|
|
108
|
+
[["const double *", "x"],
|
|
109
|
+
["const size_t", "xstride"],
|
|
110
|
+
["const double *", "w"],
|
|
111
|
+
["const size_t", "wstride"],
|
|
112
|
+
["const double *", "y"],
|
|
113
|
+
["const size_t", "ystride"],
|
|
114
|
+
["size_t", "n"],
|
|
115
|
+
["double *", "c1"],
|
|
116
|
+
["double *", "cov11"],
|
|
117
|
+
["double *", "sumsq"]],
|
|
118
|
+
:desc=>
|
|
119
|
+
"This function computes the best-fit linear regression coefficient\n" +
|
|
120
|
+
"c1 of the model Y = c_1 X for the weighted datasets\n" +
|
|
121
|
+
"(x, y), two vectors of length n with strides\n" +
|
|
122
|
+
"xstride and ystride. The vector w, of length n\n" +
|
|
123
|
+
"and stride wstride, specifies the weight of each datapoint. The\n" +
|
|
124
|
+
"weight is the reciprocal of the variance for each datapoint in y.\n" +
|
|
125
|
+
"The variance of the parameter c1 is computed using the weights\n" +
|
|
126
|
+
"and returned via the parameter cov11. The weighted sum of\n" +
|
|
127
|
+
"squares of the residuals from the best-fit line, \\chi^2, is\n" +
|
|
128
|
+
"returned in chisq."}]
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
[{:func_name=>"gsl_fit_linear",
|
|
2
|
+
:func_type=>"int",
|
|
3
|
+
:args=>
|
|
4
|
+
[["const double *", "x"],
|
|
5
|
+
["const size_t", "xstride"],
|
|
6
|
+
["const double *", "y"],
|
|
7
|
+
["const size_t", "ystride"],
|
|
8
|
+
["size_t", "n"],
|
|
9
|
+
["double *", "c0"],
|
|
10
|
+
["double *", "c1"],
|
|
11
|
+
["double *", "cov00"],
|
|
12
|
+
["double *", "cov01"],
|
|
13
|
+
["double *", "cov11"],
|
|
14
|
+
["double *", "sumsq"]],
|
|
15
|
+
:desc=>
|
|
16
|
+
"This function computes the best-fit linear regression coefficients\n" +
|
|
17
|
+
"(c0, c1) of the model Y = c_0 + c_1 X for the dataset\n" +
|
|
18
|
+
"(x, y), two vectors of length n with strides\n" +
|
|
19
|
+
"xstride and ystride. The errors on y are assumed unknown so \n" +
|
|
20
|
+
"the variance-covariance matrix for the\n" +
|
|
21
|
+
"parameters (c0, c1) is estimated from the scatter of the\n" +
|
|
22
|
+
"points around the best-fit line and returned via the parameters\n" +
|
|
23
|
+
"(cov00, cov01, cov11). \n" +
|
|
24
|
+
"The sum of squares of the residuals from the best-fit line is returned\n" +
|
|
25
|
+
"in sumsq. Note: the correlation coefficient of the data can be computed using\n" +
|
|
26
|
+
"gsl_stats_correlation, it does not depend on the fit."},
|
|
27
|
+
{:func_name=>"gsl_fit_linear_est",
|
|
28
|
+
:func_type=>"int",
|
|
29
|
+
:args=>
|
|
30
|
+
[["double", "x"],
|
|
31
|
+
["double", "c0"],
|
|
32
|
+
["double", "c1"],
|
|
33
|
+
["double", "cov00"],
|
|
34
|
+
["double", "cov01"],
|
|
35
|
+
["double", "cov11"],
|
|
36
|
+
["double *", "y"],
|
|
37
|
+
["double *", "y_err"]],
|
|
38
|
+
:desc=>
|
|
39
|
+
"This function uses the best-fit linear regression coefficients\n" +
|
|
40
|
+
"c0, c1 and their covariance\n" +
|
|
41
|
+
"cov00, cov01, cov11 to compute the fitted function\n" +
|
|
42
|
+
"y and its standard deviation y_err for the model Y = c_0 + c_1 X\n" +
|
|
43
|
+
"at the point x."},
|
|
44
|
+
{:func_name=>"gsl_fit_mul",
|
|
45
|
+
:func_type=>"int",
|
|
46
|
+
:args=>
|
|
47
|
+
[["const double *", "x"],
|
|
48
|
+
["const size_t", "xstride"],
|
|
49
|
+
["const double *", "y"],
|
|
50
|
+
["const size_t", "ystride"],
|
|
51
|
+
["size_t", "n"],
|
|
52
|
+
["double *", "c1"],
|
|
53
|
+
["double *", "cov11"],
|
|
54
|
+
["double *", "sumsq"]],
|
|
55
|
+
:desc=>
|
|
56
|
+
"This function computes the best-fit linear regression coefficient\n" +
|
|
57
|
+
"c1 of the model Y = c_1 X for the datasets (x,\n" +
|
|
58
|
+
"y), two vectors of length n with strides xstride and\n" +
|
|
59
|
+
"ystride. The errors on y are assumed unknown so the \n" +
|
|
60
|
+
"variance of the parameter c1 is estimated from\n" +
|
|
61
|
+
"the scatter of the points around the best-fit line and returned via the\n" +
|
|
62
|
+
"parameter cov11. The sum of squares of the residuals from the\n" +
|
|
63
|
+
"best-fit line is returned in sumsq."},
|
|
64
|
+
{:func_name=>"gsl_fit_mul_est",
|
|
65
|
+
:func_type=>"int",
|
|
66
|
+
:args=>
|
|
67
|
+
[["double", "x"],
|
|
68
|
+
["double", "c1"],
|
|
69
|
+
["double", "cov11"],
|
|
70
|
+
["double *", "y"],
|
|
71
|
+
["double *", "y_err"]],
|
|
72
|
+
:desc=>
|
|
73
|
+
"This function uses the best-fit linear regression coefficient c1\n" +
|
|
74
|
+
"and its covariance cov11 to compute the fitted function\n" +
|
|
75
|
+
"y and its standard deviation y_err for the model Y = c_1 X\n" +
|
|
76
|
+
"at the point x."},
|
|
77
|
+
{:func_name=>"gsl_fit_wlinear",
|
|
78
|
+
:func_type=>"int",
|
|
79
|
+
:args=>
|
|
80
|
+
[["const double *", "x"],
|
|
81
|
+
["const size_t", "xstride"],
|
|
82
|
+
["const double *", "w"],
|
|
83
|
+
["const size_t", "wstride"],
|
|
84
|
+
["const double *", "y"],
|
|
85
|
+
["const size_t", "ystride"],
|
|
86
|
+
["size_t", "n"],
|
|
87
|
+
["double *", "c0"],
|
|
88
|
+
["double *", "c1"],
|
|
89
|
+
["double *", "cov00"],
|
|
90
|
+
["double *", "cov01"],
|
|
91
|
+
["double *", "cov11"],
|
|
92
|
+
["double *", "chisq"]],
|
|
93
|
+
:desc=>
|
|
94
|
+
"This function computes the best-fit linear regression coefficients\n" +
|
|
95
|
+
"(c0, c1) of the model Y = c_0 + c_1 X for the weighted\n" +
|
|
96
|
+
"dataset (x, y), two vectors of length n with strides\n" +
|
|
97
|
+
"xstride and ystride. The vector w, of length n\n" +
|
|
98
|
+
"and stride wstride, specifies the weight of each datapoint. The\n" +
|
|
99
|
+
"weight is the reciprocal of the variance for each datapoint in y.\n" +
|
|
100
|
+
"The covariance matrix for the parameters (c0, c1) is\n" +
|
|
101
|
+
"computed using the weights and returned via the parameters\n" +
|
|
102
|
+
"(cov00, cov01, cov11). The weighted sum of squares\n" +
|
|
103
|
+
"of the residuals from the best-fit line, \\chi^2, is returned in\n" +
|
|
104
|
+
"chisq."},
|
|
105
|
+
{:func_name=>"gsl_fit_wmul",
|
|
106
|
+
:func_type=>"int",
|
|
107
|
+
:args=>
|
|
108
|
+
[["const double *", "x"],
|
|
109
|
+
["const size_t", "xstride"],
|
|
110
|
+
["const double *", "w"],
|
|
111
|
+
["const size_t", "wstride"],
|
|
112
|
+
["const double *", "y"],
|
|
113
|
+
["const size_t", "ystride"],
|
|
114
|
+
["size_t", "n"],
|
|
115
|
+
["double *", "c1"],
|
|
116
|
+
["double *", "cov11"],
|
|
117
|
+
["double *", "sumsq"]],
|
|
118
|
+
:desc=>
|
|
119
|
+
"This function computes the best-fit linear regression coefficient\n" +
|
|
120
|
+
"c1 of the model Y = c_1 X for the weighted datasets\n" +
|
|
121
|
+
"(x, y), two vectors of length n with strides\n" +
|
|
122
|
+
"xstride and ystride. The vector w, of length n\n" +
|
|
123
|
+
"and stride wstride, specifies the weight of each datapoint. The\n" +
|
|
124
|
+
"weight is the reciprocal of the variance for each datapoint in y.\n" +
|
|
125
|
+
"The variance of the parameter c1 is computed using the weights\n" +
|
|
126
|
+
"and returned via the parameter cov11. The weighted sum of\n" +
|
|
127
|
+
"squares of the residuals from the best-fit line, \\chi^2, is\n" +
|
|
128
|
+
"returned in chisq."}]
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
[{:func_name=>"gsl_fit_linear",
|
|
2
|
+
:func_type=>"int",
|
|
3
|
+
:args=>
|
|
4
|
+
[["const double *", "x"],
|
|
5
|
+
["const size_t", "xstride"],
|
|
6
|
+
["const double *", "y"],
|
|
7
|
+
["const size_t", "ystride"],
|
|
8
|
+
["size_t", "n"],
|
|
9
|
+
["double *", "c0"],
|
|
10
|
+
["double *", "c1"],
|
|
11
|
+
["double *", "cov00"],
|
|
12
|
+
["double *", "cov01"],
|
|
13
|
+
["double *", "cov11"],
|
|
14
|
+
["double *", "sumsq"]],
|
|
15
|
+
:desc=>
|
|
16
|
+
"This function computes the best-fit linear regression coefficients\n" +
|
|
17
|
+
"(c0, c1) of the model Y = c_0 + c_1 X for the dataset\n" +
|
|
18
|
+
"(x, y), two vectors of length n with strides\n" +
|
|
19
|
+
"xstride and ystride. The errors on y are assumed unknown so \n" +
|
|
20
|
+
"the variance-covariance matrix for the\n" +
|
|
21
|
+
"parameters (c0, c1) is estimated from the scatter of the\n" +
|
|
22
|
+
"points around the best-fit line and returned via the parameters\n" +
|
|
23
|
+
"(cov00, cov01, cov11). \n" +
|
|
24
|
+
"The sum of squares of the residuals from the best-fit line is returned\n" +
|
|
25
|
+
"in sumsq. Note: the correlation coefficient of the data can be computed using\n" +
|
|
26
|
+
"gsl_stats_correlation, it does not depend on the fit."},
|
|
27
|
+
{:func_name=>"gsl_fit_linear_est",
|
|
28
|
+
:func_type=>"int",
|
|
29
|
+
:args=>
|
|
30
|
+
[["double", "x"],
|
|
31
|
+
["double", "c0"],
|
|
32
|
+
["double", "c1"],
|
|
33
|
+
["double", "cov00"],
|
|
34
|
+
["double", "cov01"],
|
|
35
|
+
["double", "cov11"],
|
|
36
|
+
["double *", "y"],
|
|
37
|
+
["double *", "y_err"]],
|
|
38
|
+
:desc=>
|
|
39
|
+
"This function uses the best-fit linear regression coefficients\n" +
|
|
40
|
+
"c0, c1 and their covariance\n" +
|
|
41
|
+
"cov00, cov01, cov11 to compute the fitted function\n" +
|
|
42
|
+
"y and its standard deviation y_err for the model Y = c_0 + c_1 X\n" +
|
|
43
|
+
"at the point x."},
|
|
44
|
+
{:func_name=>"gsl_fit_mul",
|
|
45
|
+
:func_type=>"int",
|
|
46
|
+
:args=>
|
|
47
|
+
[["const double *", "x"],
|
|
48
|
+
["const size_t", "xstride"],
|
|
49
|
+
["const double *", "y"],
|
|
50
|
+
["const size_t", "ystride"],
|
|
51
|
+
["size_t", "n"],
|
|
52
|
+
["double *", "c1"],
|
|
53
|
+
["double *", "cov11"],
|
|
54
|
+
["double *", "sumsq"]],
|
|
55
|
+
:desc=>
|
|
56
|
+
"This function computes the best-fit linear regression coefficient\n" +
|
|
57
|
+
"c1 of the model Y = c_1 X for the datasets (x,\n" +
|
|
58
|
+
"y), two vectors of length n with strides xstride and\n" +
|
|
59
|
+
"ystride. The errors on y are assumed unknown so the \n" +
|
|
60
|
+
"variance of the parameter c1 is estimated from\n" +
|
|
61
|
+
"the scatter of the points around the best-fit line and returned via the\n" +
|
|
62
|
+
"parameter cov11. The sum of squares of the residuals from the\n" +
|
|
63
|
+
"best-fit line is returned in sumsq."},
|
|
64
|
+
{:func_name=>"gsl_fit_mul_est",
|
|
65
|
+
:func_type=>"int",
|
|
66
|
+
:args=>
|
|
67
|
+
[["double", "x"],
|
|
68
|
+
["double", "c1"],
|
|
69
|
+
["double", "cov11"],
|
|
70
|
+
["double *", "y"],
|
|
71
|
+
["double *", "y_err"]],
|
|
72
|
+
:desc=>
|
|
73
|
+
"This function uses the best-fit linear regression coefficient c1\n" +
|
|
74
|
+
"and its covariance cov11 to compute the fitted function\n" +
|
|
75
|
+
"y and its standard deviation y_err for the model Y = c_1 X\n" +
|
|
76
|
+
"at the point x."},
|
|
77
|
+
{:func_name=>"gsl_fit_wlinear",
|
|
78
|
+
:func_type=>"int",
|
|
79
|
+
:args=>
|
|
80
|
+
[["const double *", "x"],
|
|
81
|
+
["const size_t", "xstride"],
|
|
82
|
+
["const double *", "w"],
|
|
83
|
+
["const size_t", "wstride"],
|
|
84
|
+
["const double *", "y"],
|
|
85
|
+
["const size_t", "ystride"],
|
|
86
|
+
["size_t", "n"],
|
|
87
|
+
["double *", "c0"],
|
|
88
|
+
["double *", "c1"],
|
|
89
|
+
["double *", "cov00"],
|
|
90
|
+
["double *", "cov01"],
|
|
91
|
+
["double *", "cov11"],
|
|
92
|
+
["double *", "chisq"]],
|
|
93
|
+
:desc=>
|
|
94
|
+
"This function computes the best-fit linear regression coefficients\n" +
|
|
95
|
+
"(c0, c1) of the model Y = c_0 + c_1 X for the weighted\n" +
|
|
96
|
+
"dataset (x, y), two vectors of length n with strides\n" +
|
|
97
|
+
"xstride and ystride. The vector w, of length n\n" +
|
|
98
|
+
"and stride wstride, specifies the weight of each datapoint. The\n" +
|
|
99
|
+
"weight is the reciprocal of the variance for each datapoint in y.\n" +
|
|
100
|
+
"The covariance matrix for the parameters (c0, c1) is\n" +
|
|
101
|
+
"computed using the weights and returned via the parameters\n" +
|
|
102
|
+
"(cov00, cov01, cov11). The weighted sum of squares\n" +
|
|
103
|
+
"of the residuals from the best-fit line, \\chi^2, is returned in\n" +
|
|
104
|
+
"chisq."},
|
|
105
|
+
{:func_name=>"gsl_fit_wmul",
|
|
106
|
+
:func_type=>"int",
|
|
107
|
+
:args=>
|
|
108
|
+
[["const double *", "x"],
|
|
109
|
+
["const size_t", "xstride"],
|
|
110
|
+
["const double *", "w"],
|
|
111
|
+
["const size_t", "wstride"],
|
|
112
|
+
["const double *", "y"],
|
|
113
|
+
["const size_t", "ystride"],
|
|
114
|
+
["size_t", "n"],
|
|
115
|
+
["double *", "c1"],
|
|
116
|
+
["double *", "cov11"],
|
|
117
|
+
["double *", "sumsq"]],
|
|
118
|
+
:desc=>
|
|
119
|
+
"This function computes the best-fit linear regression coefficient\n" +
|
|
120
|
+
"c1 of the model Y = c_1 X for the weighted datasets\n" +
|
|
121
|
+
"(x, y), two vectors of length n with strides\n" +
|
|
122
|
+
"xstride and ystride. The vector w, of length n\n" +
|
|
123
|
+
"and stride wstride, specifies the weight of each datapoint. The\n" +
|
|
124
|
+
"weight is the reciprocal of the variance for each datapoint in y.\n" +
|
|
125
|
+
"The variance of the parameter c1 is computed using the weights\n" +
|
|
126
|
+
"and returned via the parameter cov11. The weighted sum of\n" +
|
|
127
|
+
"squares of the residuals from the best-fit line, \\chi^2, is\n" +
|
|
128
|
+
"returned in chisq."}]
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
[{:func_name=>"gsl_fit_linear",
|
|
2
|
+
:func_type=>"int",
|
|
3
|
+
:args=>
|
|
4
|
+
[["const double *", "x"],
|
|
5
|
+
["const size_t", "xstride"],
|
|
6
|
+
["const double *", "y"],
|
|
7
|
+
["const size_t", "ystride"],
|
|
8
|
+
["size_t", "n"],
|
|
9
|
+
["double *", "c0"],
|
|
10
|
+
["double *", "c1"],
|
|
11
|
+
["double *", "cov00"],
|
|
12
|
+
["double *", "cov01"],
|
|
13
|
+
["double *", "cov11"],
|
|
14
|
+
["double *", "sumsq"]],
|
|
15
|
+
:desc=>
|
|
16
|
+
"This function computes the best-fit linear regression coefficients\n" +
|
|
17
|
+
"(c0,c1) of the model Y = c_0 + c_1 X for the dataset\n" +
|
|
18
|
+
"(x, y), two vectors of length n with strides\n" +
|
|
19
|
+
"xstride and ystride. The errors on y are assumed unknown so \n" +
|
|
20
|
+
"the variance-covariance matrix for the\n" +
|
|
21
|
+
"parameters (c0, c1) is estimated from the scatter of the\n" +
|
|
22
|
+
"points around the best-fit line and returned via the parameters\n" +
|
|
23
|
+
"(cov00, cov01, cov11). \n" +
|
|
24
|
+
"The sum of squares of the residuals from the best-fit line is returned\n" +
|
|
25
|
+
"in sumsq. Note: the correlation coefficient of the data can be computed using gsl_stats_correlation (Correlation), it does not depend on the fit."},
|
|
26
|
+
{:func_name=>"gsl_fit_linear_est",
|
|
27
|
+
:func_type=>"int",
|
|
28
|
+
:args=>
|
|
29
|
+
[["double", "x"],
|
|
30
|
+
["double", "c0"],
|
|
31
|
+
["double", "c1"],
|
|
32
|
+
["double", "cov00"],
|
|
33
|
+
["double", "cov01"],
|
|
34
|
+
["double", "cov11"],
|
|
35
|
+
["double *", "y"],
|
|
36
|
+
["double *", "y_err"]],
|
|
37
|
+
:desc=>
|
|
38
|
+
"This function uses the best-fit linear regression coefficients\n" +
|
|
39
|
+
"c0, c1 and their covariance\n" +
|
|
40
|
+
"cov00, cov01, cov11 to compute the fitted function\n" +
|
|
41
|
+
"y and its standard deviation y_err for the model Y =\n" +
|
|
42
|
+
"c_0 + c_1 X at the point x."},
|
|
43
|
+
{:func_name=>"gsl_fit_mul",
|
|
44
|
+
:func_type=>"int",
|
|
45
|
+
:args=>
|
|
46
|
+
[["const double *", "x"],
|
|
47
|
+
["const size_t", "xstride"],
|
|
48
|
+
["const double *", "y"],
|
|
49
|
+
["const size_t", "ystride"],
|
|
50
|
+
["size_t", "n"],
|
|
51
|
+
["double *", "c1"],
|
|
52
|
+
["double *", "cov11"],
|
|
53
|
+
["double *", "sumsq"]],
|
|
54
|
+
:desc=>
|
|
55
|
+
"This function computes the best-fit linear regression coefficient\n" +
|
|
56
|
+
"c1 of the model Y = c_1 X for the datasets (x,\n" +
|
|
57
|
+
"y), two vectors of length n with strides xstride and\n" +
|
|
58
|
+
"ystride. The errors on y are assumed unknown so the \n" +
|
|
59
|
+
"variance of the parameter c1 is estimated from\n" +
|
|
60
|
+
"the scatter of the points around the best-fit line and returned via the\n" +
|
|
61
|
+
"parameter cov11. The sum of squares of the residuals from the\n" +
|
|
62
|
+
"best-fit line is returned in sumsq."},
|
|
63
|
+
{:func_name=>"gsl_fit_mul_est",
|
|
64
|
+
:func_type=>"int",
|
|
65
|
+
:args=>
|
|
66
|
+
[["double", "x"],
|
|
67
|
+
["double", "c1"],
|
|
68
|
+
["double", "cov11"],
|
|
69
|
+
["double *", "y"],
|
|
70
|
+
["double *", "y_err"]],
|
|
71
|
+
:desc=>
|
|
72
|
+
"This function uses the best-fit linear regression coefficient c1\n" +
|
|
73
|
+
"and its covariance cov11 to compute the fitted function\n" +
|
|
74
|
+
"y and its standard deviation y_err for the model Y =\n" +
|
|
75
|
+
"c_1 X at the point x."},
|
|
76
|
+
{:func_name=>"gsl_fit_wlinear",
|
|
77
|
+
:func_type=>"int",
|
|
78
|
+
:args=>
|
|
79
|
+
[["const double *", "x"],
|
|
80
|
+
["const size_t", "xstride"],
|
|
81
|
+
["const double *", "w"],
|
|
82
|
+
["const size_t", "wstride"],
|
|
83
|
+
["const double *", "y"],
|
|
84
|
+
["const size_t", "ystride"],
|
|
85
|
+
["size_t", "n"],
|
|
86
|
+
["double *", "c0"],
|
|
87
|
+
["double *", "c1"],
|
|
88
|
+
["double *", "cov00"],
|
|
89
|
+
["double *", "cov01"],
|
|
90
|
+
["double *", "cov11"],
|
|
91
|
+
["double *", "chisq"]],
|
|
92
|
+
:desc=>
|
|
93
|
+
"This function computes the best-fit linear regression coefficients\n" +
|
|
94
|
+
"(c0,c1) of the model Y = c_0 + c_1 X for the weighted\n" +
|
|
95
|
+
"dataset (x, y), two vectors of length n with strides\n" +
|
|
96
|
+
"xstride and ystride. The vector w, of length n\n" +
|
|
97
|
+
"and stride wstride, specifies the weight of each datapoint. The\n" +
|
|
98
|
+
"weight is the reciprocal of the variance for each datapoint in y.\n" +
|
|
99
|
+
"\n" +
|
|
100
|
+
"The covariance matrix for the parameters (c0, c1) is\n" +
|
|
101
|
+
"computed using the weights and returned via the parameters\n" +
|
|
102
|
+
"(cov00, cov01, cov11). The weighted sum of squares\n" +
|
|
103
|
+
"of the residuals from the best-fit line, \\chi^2, is returned in\n" +
|
|
104
|
+
"chisq."},
|
|
105
|
+
{:func_name=>"gsl_fit_wmul",
|
|
106
|
+
:func_type=>"int",
|
|
107
|
+
:args=>
|
|
108
|
+
[["const double *", "x"],
|
|
109
|
+
["const size_t", "xstride"],
|
|
110
|
+
["const double *", "w"],
|
|
111
|
+
["const size_t", "wstride"],
|
|
112
|
+
["const double *", "y"],
|
|
113
|
+
["const size_t", "ystride"],
|
|
114
|
+
["size_t", "n"],
|
|
115
|
+
["double *", "c1"],
|
|
116
|
+
["double *", "cov11"],
|
|
117
|
+
["double *", "sumsq"]],
|
|
118
|
+
:desc=>
|
|
119
|
+
"This function computes the best-fit linear regression coefficient\n" +
|
|
120
|
+
"c1 of the model Y = c_1 X for the weighted datasets\n" +
|
|
121
|
+
"(x, y), two vectors of length n with strides\n" +
|
|
122
|
+
"xstride and ystride. The vector w, of length n\n" +
|
|
123
|
+
"and stride wstride, specifies the weight of each datapoint. The\n" +
|
|
124
|
+
"weight is the reciprocal of the variance for each datapoint in y.\n" +
|
|
125
|
+
"\n" +
|
|
126
|
+
"The variance of the parameter c1 is computed using the weights\n" +
|
|
127
|
+
"and returned via the parameter cov11. The weighted sum of\n" +
|
|
128
|
+
"squares of the residuals from the best-fit line, \\chi^2, is\n" +
|
|
129
|
+
"returned in chisq."}]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
static void
|
|
2
|
+
iter_<%=c_func%>(na_loop_t *const lp)
|
|
3
|
+
{
|
|
4
|
+
size_t n;
|
|
5
|
+
char *p1,*p2;
|
|
6
|
+
double *p3,*p4,*p5,*p6,*p7,*p8;
|
|
7
|
+
ssize_t s1, s2;
|
|
8
|
+
|
|
9
|
+
n = lp->args[0].shape[0];
|
|
10
|
+
INIT_PTR(lp, 0, p1, s1);
|
|
11
|
+
INIT_PTR(lp, 1, p2, s2);
|
|
12
|
+
p3 = (double*)GET_PTR(lp,2);
|
|
13
|
+
p4 = (double*)GET_PTR(lp,3);
|
|
14
|
+
p5 = (double*)GET_PTR(lp,4);
|
|
15
|
+
p6 = (double*)GET_PTR(lp,5);
|
|
16
|
+
p7 = (double*)GET_PTR(lp,6);
|
|
17
|
+
p8 = (double*)GET_PTR(lp,7);
|
|
18
|
+
|
|
19
|
+
<%=func_name%>((double*)p1,s1/sizeof(double),
|
|
20
|
+
(double*)p2,s2/sizeof(double),
|
|
21
|
+
n,p3,p4,p5,p6,p7,p8);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
@overload <%=name%>(<%=args[0][1]%>,<%=args[2][1]%>)
|
|
26
|
+
@param [DFloat] <%=args[0][1]%> (input array)
|
|
27
|
+
@param [DFloat] <%=args[2][1]%> (input array)
|
|
28
|
+
@return [GSL::Fit::<%=result_class%>] result Struct with members: <%=args[5][1]%>, <%=args[6][1]%>, <%=args[7][1]%>, <%=args[8][1]%>, <%=args[9][1]%>, <%=args[10][1]%>.
|
|
29
|
+
|
|
30
|
+
<%=desc%>
|
|
31
|
+
|
|
32
|
+
*/
|
|
33
|
+
static VALUE
|
|
34
|
+
<%=c_func(2)%>(VALUE mod, VALUE v1, VALUE v2)
|
|
35
|
+
{
|
|
36
|
+
VALUE r, result;
|
|
37
|
+
ndfunc_arg_in_t ain[2] = {{cDF,1},{cDF,1}};
|
|
38
|
+
ndfunc_arg_out_t aout[6] = {{cDF,0},{cDF,0},{cDF,0},{cDF,0},{cDF,0},{cDF,0}};
|
|
39
|
+
ndfunc_t ndf = { iter_<%=c_func%>, NO_LOOP|NDF_EXTRACT,
|
|
40
|
+
2, 6, ain, aout };
|
|
41
|
+
narray_t *x, *y;
|
|
42
|
+
|
|
43
|
+
GetNArray(v1,x);
|
|
44
|
+
GetNArray(v2,y);
|
|
45
|
+
CHECK_GE_1D(x);
|
|
46
|
+
CHECK_GE_1D(y);
|
|
47
|
+
CHECK_SIZE_EQ(VEC_SIZE(x),VEC_SIZE(y),"x size does not match y size");
|
|
48
|
+
|
|
49
|
+
r = na_ndloop(&ndf, 2, v1, v2);
|
|
50
|
+
result = rb_class_new_instance(6, RARRAY_PTR(r), c<%=result_class%>);
|
|
51
|
+
RB_GC_GUARD(r);
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
static void
|
|
2
|
+
iter_<%=c_func%>(na_loop_t *const lp)
|
|
3
|
+
{
|
|
4
|
+
size_t i;
|
|
5
|
+
char *p1,*p2,*p3,*p4,*p5,*p6,*p7,*p8;
|
|
6
|
+
ssize_t s1, s2, s3, s4, s5, s6, s7, s8;
|
|
7
|
+
double x,c0,c1,cov00,cov01,cov11,y,ye;
|
|
8
|
+
|
|
9
|
+
INIT_COUNTER(lp, i);
|
|
10
|
+
INIT_PTR(lp, 0, p1, s1);
|
|
11
|
+
INIT_PTR(lp, 1, p2, s2);
|
|
12
|
+
INIT_PTR(lp, 2, p3, s3);
|
|
13
|
+
INIT_PTR(lp, 3, p4, s4);
|
|
14
|
+
INIT_PTR(lp, 4, p5, s5);
|
|
15
|
+
INIT_PTR(lp, 5, p6, s6);
|
|
16
|
+
INIT_PTR(lp, 6, p7, s7);
|
|
17
|
+
INIT_PTR(lp, 7, p8, s8);
|
|
18
|
+
|
|
19
|
+
for (; i--; ) {
|
|
20
|
+
GET_DATA_STRIDE(p1,s1,double,x);
|
|
21
|
+
GET_DATA_STRIDE(p2,s2,double,c0);
|
|
22
|
+
GET_DATA_STRIDE(p3,s3,double,c1);
|
|
23
|
+
GET_DATA_STRIDE(p4,s4,double,cov00);
|
|
24
|
+
GET_DATA_STRIDE(p5,s5,double,cov01);
|
|
25
|
+
GET_DATA_STRIDE(p6,s6,double,cov11);
|
|
26
|
+
<%=func_name%>(x, c0, c1, cov00, cov01, cov11, &y, &ye);
|
|
27
|
+
SET_DATA_STRIDE(p7,s7,double,y);
|
|
28
|
+
SET_DATA_STRIDE(p8,s8,double,ye);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
@overload <%=name%>(<%=args[0][1]%>,linear_result)
|
|
34
|
+
@param [DFloat] <%=args[0][1]%>
|
|
35
|
+
@param [(L|Wl)inearResult] linear_result Result of GSL::Fit.linear|wlinear
|
|
36
|
+
@return [[DFloat,DFloat]] array of (<%=args[6][1]%>, <%=args[7][1]%>).
|
|
37
|
+
|
|
38
|
+
<%=desc%>
|
|
39
|
+
|
|
40
|
+
*/
|
|
41
|
+
static VALUE
|
|
42
|
+
<%=c_func(2)%>(VALUE mod, VALUE v1, VALUE v2)
|
|
43
|
+
{
|
|
44
|
+
ndfunc_arg_in_t ain[6] = {{cDF,0},{cDF,0},{cDF,0},{cDF,0},{cDF,0},{cDF,0}};
|
|
45
|
+
ndfunc_arg_out_t aout[2] = {{cDF,0},{cDF,0}};
|
|
46
|
+
ndfunc_t ndf = { iter_<%=c_func%>, STRIDE_LOOP_NIP|NDF_EXTRACT,
|
|
47
|
+
6, 2, ain, aout };
|
|
48
|
+
VALUE c0, c1, cov00, cov01, cov11;
|
|
49
|
+
|
|
50
|
+
c0 = RSTRUCT_GET(v2,0);
|
|
51
|
+
c1 = RSTRUCT_GET(v2,1);
|
|
52
|
+
cov00 = RSTRUCT_GET(v2,2);
|
|
53
|
+
cov01 = RSTRUCT_GET(v2,3);
|
|
54
|
+
cov11 = RSTRUCT_GET(v2,4);
|
|
55
|
+
return na_ndloop(&ndf, 6, v1, c0, c1, cov00, cov01, cov11);
|
|
56
|
+
}
|