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,66 @@
|
|
|
1
|
+
static VALUE cLinearResult;
|
|
2
|
+
|
|
3
|
+
static void
|
|
4
|
+
iter_<%=c_func%>(na_loop_t *const lp)
|
|
5
|
+
{
|
|
6
|
+
gsl_matrix X;
|
|
7
|
+
gsl_vector y;
|
|
8
|
+
gsl_vector c;
|
|
9
|
+
gsl_matrix cov;
|
|
10
|
+
double *chisq;
|
|
11
|
+
<%=struct%> *ws = (<%=struct%>*)(lp->opt_ptr);
|
|
12
|
+
|
|
13
|
+
SET_GSL_MATRIX_FROM_LOOPT(lp,0,X);
|
|
14
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,1,y);
|
|
15
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,2,c);
|
|
16
|
+
SET_GSL_MATRIX_FROM_LOOPT(lp,3,cov);
|
|
17
|
+
chisq = (double*)NDL_PTR(lp,4);
|
|
18
|
+
|
|
19
|
+
<%=func_name%>(&X,&y,&c,&cov,chisq,ws);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
@overload <%=name%>(<%=args[0][1]%>,<%=args[1][1]%>)
|
|
24
|
+
@param [DFloat] <%=args[0][1]%> (input matrix) predictor variables
|
|
25
|
+
@param [DFloat] <%=args[1][1]%> (input vector) observation
|
|
26
|
+
@return [GSL::Multifit::LinearResult] result Struct with members: <%=args[2][1]%>, <%=args[3][1]%>, <%=args[4][1]%>.
|
|
27
|
+
|
|
28
|
+
<%=desc%>
|
|
29
|
+
|
|
30
|
+
*/
|
|
31
|
+
static VALUE
|
|
32
|
+
<%=c_func(2)%>(VALUE mod, VALUE v1, VALUE v2)
|
|
33
|
+
{
|
|
34
|
+
size_t c_shape[1], cov_shape[2];
|
|
35
|
+
ndfunc_arg_in_t ain[2] = {{cDF,2},{cDF,1}};
|
|
36
|
+
ndfunc_arg_out_t aout[3] = {{cDF,1,c_shape},{cDF,2,cov_shape},{cDF,0}};
|
|
37
|
+
ndfunc_t ndf = { iter_<%=c_func%>, NO_LOOP|NDF_EXTRACT,
|
|
38
|
+
2, 3, ain, aout };
|
|
39
|
+
VALUE vws, r, result;
|
|
40
|
+
narray_t *X, *y;
|
|
41
|
+
size_t n, p;
|
|
42
|
+
<%=struct%> *ws;
|
|
43
|
+
|
|
44
|
+
GetNArray(v1,X);
|
|
45
|
+
GetNArray(v2,y);
|
|
46
|
+
CHECK_GE_2D(X);
|
|
47
|
+
CHECK_GE_1D(y);
|
|
48
|
+
n = MAT_SIZE1(X);
|
|
49
|
+
p = MAT_SIZE2(X);
|
|
50
|
+
CHECK_SIZE_EQ(n,VEC_SIZE(y),"y size does not match X column size");
|
|
51
|
+
|
|
52
|
+
c_shape[0] = cov_shape[0] = cov_shape[1] = p;
|
|
53
|
+
|
|
54
|
+
ws = gsl_multifit_linear_alloc(n,p);
|
|
55
|
+
if (!ws)
|
|
56
|
+
rb_raise(rb_eNoMemError,"fail to allocate struct");
|
|
57
|
+
vws = TypedData_Wrap_Struct(<%=class_var%>, &<%=data_type_var%>, (void*)ws);
|
|
58
|
+
|
|
59
|
+
r = na_ndloop3(&ndf, ws, 2, v1, v2);
|
|
60
|
+
|
|
61
|
+
result = rb_class_new_instance(3, RARRAY_PTR(r), cLinearResult);
|
|
62
|
+
|
|
63
|
+
RB_GC_GUARD(vws);
|
|
64
|
+
RB_GC_GUARD(r);
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
static void
|
|
2
|
+
iter_<%=c_func%>(na_loop_t *const lp)
|
|
3
|
+
{
|
|
4
|
+
gsl_vector x;
|
|
5
|
+
gsl_vector c;
|
|
6
|
+
gsl_matrix cov;
|
|
7
|
+
double y, yerr;
|
|
8
|
+
|
|
9
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,0,x);
|
|
10
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,1,c);
|
|
11
|
+
SET_GSL_MATRIX_FROM_LOOPT(lp,2,cov);
|
|
12
|
+
|
|
13
|
+
<%=func_name%>(&x, &c, &cov, &y, &yerr);
|
|
14
|
+
|
|
15
|
+
*(double*)NDL_PTR(lp,3) = y;
|
|
16
|
+
*(double*)NDL_PTR(lp,4) = yerr;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
@overload <%=name%>(<%=args[0][1]%>,<%=args[1][1]%>,<%=args[2][1]%>)
|
|
21
|
+
@param [DFloat] <%=args[0][1]%> (input vector) observations
|
|
22
|
+
@param [DFloat] <%=args[1][1]%> (input vector) solusions
|
|
23
|
+
@param [DFloat] <%=args[2][1]%> (input matrix) covariance
|
|
24
|
+
@return [[DFloat,DFloat]] array of (<%=args[3][1]%>, <%=args[4][1]%>).
|
|
25
|
+
|
|
26
|
+
<%=desc%>
|
|
27
|
+
|
|
28
|
+
*/
|
|
29
|
+
static VALUE
|
|
30
|
+
<%=c_func(3)%>(VALUE mod, VALUE v1, VALUE v2, VALUE v3)
|
|
31
|
+
{
|
|
32
|
+
ndfunc_arg_in_t ain[3] = {{cDF,1},{cDF,1},{cDF,2}};
|
|
33
|
+
ndfunc_arg_out_t aout[2] = {{cDF,0},{cDF,0}};
|
|
34
|
+
ndfunc_t ndf = { iter_<%=c_func%>, NO_LOOP|NDF_EXTRACT,
|
|
35
|
+
3, 2, ain, aout };
|
|
36
|
+
narray_t *x, *c, *cov;
|
|
37
|
+
|
|
38
|
+
GetNArray(v1,x);
|
|
39
|
+
GetNArray(v2,c);
|
|
40
|
+
GetNArray(v3,cov);
|
|
41
|
+
CHECK_GE_1D(x);
|
|
42
|
+
CHECK_GE_1D(c);
|
|
43
|
+
CHECK_GE_2D(cov);
|
|
44
|
+
CHECK_SIZE_EQ(VEC_SIZE(x),VEC_SIZE(c),"x size does not match c size");
|
|
45
|
+
CHECK_SIZE_EQ(MAT_SIZE1(cov),MAT_SIZE2(cov),"cov is not square matrix");
|
|
46
|
+
CHECK_SIZE_EQ(VEC_SIZE(c),MAT_SIZE1(cov),"c size does not match cov row size");
|
|
47
|
+
return na_ndloop(&ndf, 3, v1, v2, v3);
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
static void
|
|
2
|
+
iter_<%=c_func%>(na_loop_t *const lp)
|
|
3
|
+
{
|
|
4
|
+
gsl_matrix x;
|
|
5
|
+
gsl_vector y;
|
|
6
|
+
gsl_vector c;
|
|
7
|
+
gsl_vector r;
|
|
8
|
+
|
|
9
|
+
SET_GSL_MATRIX_FROM_LOOPT(lp,0,x);
|
|
10
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,1,y);
|
|
11
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,2,c);
|
|
12
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,3,r);
|
|
13
|
+
|
|
14
|
+
<%=func_name%>(&x, &y, &c, &r);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
@overload <%=name%>(<%=args[0][1]%>,<%=args[1][1]%>,<%=args[2][1]%>)
|
|
19
|
+
@param [DFloat] <%=args[0][1]%> (input matrix) design matrix
|
|
20
|
+
@param [DFloat] <%=args[1][1]%> (input vector) rhs vector
|
|
21
|
+
@param [DFloat] <%=args[2][1]%> (input vector) fit coefficients
|
|
22
|
+
@return [DFloat] returns <%=args[3][1]%>
|
|
23
|
+
|
|
24
|
+
<%=desc%>
|
|
25
|
+
|
|
26
|
+
*/
|
|
27
|
+
static VALUE
|
|
28
|
+
<%=c_func(3)%>(VALUE mod, VALUE v1, VALUE v2, VALUE v3)
|
|
29
|
+
{
|
|
30
|
+
size_t shape[1];
|
|
31
|
+
ndfunc_arg_in_t ain[3] = {{cDF,2},{cDF,1},{cDF,1}};
|
|
32
|
+
ndfunc_arg_out_t aout[1] = {{cDF,1,shape}};
|
|
33
|
+
ndfunc_t ndf = { iter_<%=c_func%>, NO_LOOP|NDF_EXTRACT,
|
|
34
|
+
3, 1, ain, aout };
|
|
35
|
+
narray_t *x, *y, *c;
|
|
36
|
+
|
|
37
|
+
GetNArray(v1,x);
|
|
38
|
+
GetNArray(v2,y);
|
|
39
|
+
GetNArray(v3,c);
|
|
40
|
+
CHECK_GE_2D(x);
|
|
41
|
+
CHECK_GE_1D(y);
|
|
42
|
+
CHECK_GE_1D(c);
|
|
43
|
+
CHECK_SIZE_EQ(MAT_SIZE1(x),VEC_SIZE(y),"y size does not match x row size");
|
|
44
|
+
CHECK_SIZE_EQ(MAT_SIZE2(x),VEC_SIZE(c),"c size does not match x column size");
|
|
45
|
+
shape[0] = VEC_SIZE(y);
|
|
46
|
+
return na_ndloop(&ndf, 3, v1, v2, v3);
|
|
47
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
static void
|
|
2
|
+
iter_<%=c_func%>(na_loop_t *const lp)
|
|
3
|
+
{
|
|
4
|
+
gsl_matrix X;
|
|
5
|
+
gsl_vector y;
|
|
6
|
+
gsl_vector w;
|
|
7
|
+
gsl_vector c;
|
|
8
|
+
gsl_matrix cov;
|
|
9
|
+
double *chisq;
|
|
10
|
+
<%=struct%> *ws = (<%=struct%>*)(lp->opt_ptr);
|
|
11
|
+
|
|
12
|
+
SET_GSL_MATRIX_FROM_LOOPT(lp,0,X);
|
|
13
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,1,y);
|
|
14
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,2,w);
|
|
15
|
+
SET_GSL_VECTOR_FROM_LOOPT(lp,3,c);
|
|
16
|
+
SET_GSL_MATRIX_FROM_LOOPT(lp,4,cov);
|
|
17
|
+
chisq = (double*)NDL_PTR(lp,5);
|
|
18
|
+
|
|
19
|
+
<%=func_name%>(&X,&y,&w,&c,&cov,chisq,ws);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
@overload <%=name%>(<%=args[0][1]%>,<%=args[1][1]%>,<%=args[2][1]%>)
|
|
24
|
+
@param [DFloat] <%=args[0][1]%> (input matrix) predictor variables
|
|
25
|
+
@param [DFloat] <%=args[1][1]%> (input vector) observations
|
|
26
|
+
@param [DFloat] <%=args[2][1]%> (input vector) weights
|
|
27
|
+
@return [GSL::Multifit::LinearResult] result Struct with members: <%=args[3][1]%>, <%=args[4][1]%>, <%=args[5][1]%>.
|
|
28
|
+
|
|
29
|
+
<%=desc%>
|
|
30
|
+
|
|
31
|
+
*/
|
|
32
|
+
static VALUE
|
|
33
|
+
<%=c_func(3)%>(VALUE mod, VALUE v1, VALUE v2, VALUE v3)
|
|
34
|
+
{
|
|
35
|
+
size_t c_shape[1], cov_shape[2];
|
|
36
|
+
ndfunc_arg_in_t ain[3] = {{cDF,2},{cDF,1},{cDF,1}};
|
|
37
|
+
ndfunc_arg_out_t aout[3] = {{cDF,1,c_shape},{cDF,2,cov_shape},{cDF,0}};
|
|
38
|
+
ndfunc_t ndf = { iter_<%=c_func%>, NO_LOOP|NDF_EXTRACT,
|
|
39
|
+
3, 3, ain, aout };
|
|
40
|
+
VALUE vws, r, result;
|
|
41
|
+
narray_t *X, *y, *w;
|
|
42
|
+
size_t n, p;
|
|
43
|
+
<%=struct%> *ws;
|
|
44
|
+
|
|
45
|
+
GetNArray(v1,X);
|
|
46
|
+
GetNArray(v2,y);
|
|
47
|
+
GetNArray(v3,w);
|
|
48
|
+
CHECK_GE_2D(X);
|
|
49
|
+
CHECK_GE_1D(y);
|
|
50
|
+
CHECK_GE_1D(w);
|
|
51
|
+
n = MAT_SIZE1(X);
|
|
52
|
+
p = MAT_SIZE2(X);
|
|
53
|
+
CHECK_SIZE_EQ(n,VEC_SIZE(y),"y size does not match X column size");
|
|
54
|
+
CHECK_SIZE_EQ(n,VEC_SIZE(w),"w size does not match X column size");
|
|
55
|
+
|
|
56
|
+
c_shape[0] = cov_shape[0] = cov_shape[1] = p;
|
|
57
|
+
|
|
58
|
+
ws = gsl_multifit_linear_alloc(n,p);
|
|
59
|
+
if (!ws)
|
|
60
|
+
rb_raise(rb_eNoMemError,"fail to allocate struct");
|
|
61
|
+
vws = TypedData_Wrap_Struct(<%=class_var%>, &<%=data_type_var%>, (void*)ws);
|
|
62
|
+
|
|
63
|
+
r = na_ndloop3(&ndf, ws, 3, v1, v2, v3);
|
|
64
|
+
|
|
65
|
+
result = rb_class_new_instance(3, RARRAY_PTR(r), cLinearResult);
|
|
66
|
+
|
|
67
|
+
RB_GC_GUARD(vws);
|
|
68
|
+
RB_GC_GUARD(r);
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["gsl_multifit_nlinear_trust"]
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
[{:func_name=>"gsl_multilarge_linear_L_decomp",
|
|
2
|
+
:func_type=>"int",
|
|
3
|
+
:args=>[["gsl_matrix *", "L"], ["gsl_vector *", "tau"]],
|
|
4
|
+
:desc=>
|
|
5
|
+
"This function calculates the QR decomposition of the m-by-p\n" +
|
|
6
|
+
"regularization matrix L. L must have m \\ge p. On output,\n" +
|
|
7
|
+
"the Householder scalars are stored in the vector tau of size p.\n" +
|
|
8
|
+
"These outputs will be used by gsl_multilarge_linear_wstdform2 to complete the\n" +
|
|
9
|
+
"transformation to standard form."},
|
|
10
|
+
{:func_name=>"gsl_multilarge_linear_accumulate",
|
|
11
|
+
:func_type=>"int",
|
|
12
|
+
:args=>
|
|
13
|
+
[["gsl_matrix *", "X"],
|
|
14
|
+
["gsl_vector *", "y"],
|
|
15
|
+
["gsl_multilarge_linear_workspace *", "w"]],
|
|
16
|
+
:desc=>
|
|
17
|
+
"This function accumulates the standard form block (X,y) into the\n" +
|
|
18
|
+
"current least squares system. X and y have the same number\n" +
|
|
19
|
+
"of rows, which can be arbitrary. X must have p columns.\n" +
|
|
20
|
+
"For the TSQR method, X and y are destroyed on output.\n" +
|
|
21
|
+
"For the normal equations method, they are both unchanged."},
|
|
22
|
+
{:func_name=>"gsl_multilarge_linear_alloc",
|
|
23
|
+
:func_type=>"gsl_multilarge_linear_workspace *",
|
|
24
|
+
:args=>[["const gsl_multilarge_linear_type *", "T"], ["const size_t", "p"]],
|
|
25
|
+
:desc=>
|
|
26
|
+
"This function allocates a workspace for solving large linear least squares\n" +
|
|
27
|
+
"systems. The least squares matrix X has p columns,\n" +
|
|
28
|
+
"but may have any number of rows.\n" +
|
|
29
|
+
".. type:: gsl_multilarge_linear_type"},
|
|
30
|
+
{:func_name=>"gsl_multilarge_linear_free",
|
|
31
|
+
:func_type=>"void",
|
|
32
|
+
:args=>[["gsl_multilarge_linear_workspace *", "w"]],
|
|
33
|
+
:desc=>
|
|
34
|
+
"This function frees the memory associated with the\n" + "workspace w."},
|
|
35
|
+
{:func_name=>"gsl_multilarge_linear_genform1",
|
|
36
|
+
:func_type=>"int",
|
|
37
|
+
:args=>
|
|
38
|
+
[["const gsl_vector *", "L"],
|
|
39
|
+
["const gsl_vector *", "cs"],
|
|
40
|
+
["gsl_vector *", "c"],
|
|
41
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
42
|
+
:desc=>
|
|
43
|
+
"After a regularized system has been solved with\n" +
|
|
44
|
+
"L = \\diag(\\l_0,\\l_1,...,\\l_{p-1}),\n" +
|
|
45
|
+
"this function backtransforms the standard form solution vector cs\n" +
|
|
46
|
+
"to recover the solution vector of the original problem c. The\n" +
|
|
47
|
+
"diagonal matrix elements l_i are provided in\n" +
|
|
48
|
+
"the vector L. It is allowed to have c = cs for an\n" +
|
|
49
|
+
"in-place transform."},
|
|
50
|
+
{:func_name=>"gsl_multilarge_linear_genform2",
|
|
51
|
+
:func_type=>"int",
|
|
52
|
+
:args=>
|
|
53
|
+
[["const gsl_matrix *", "LQR"],
|
|
54
|
+
["const gsl_vector *", "Ltau"],
|
|
55
|
+
["const gsl_vector *", "cs"],
|
|
56
|
+
["gsl_vector *", "c"],
|
|
57
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
58
|
+
:desc=>
|
|
59
|
+
"After a regularized system has been solved with a regularization matrix L,\n" +
|
|
60
|
+
"specified by (LQR, Ltau), this function backtransforms the standard form\n" +
|
|
61
|
+
"solution cs\n" +
|
|
62
|
+
"to recover the solution vector of the original problem, which is stored in c,\n" +
|
|
63
|
+
"of length p."},
|
|
64
|
+
{:func_name=>"gsl_multilarge_linear_lcurve",
|
|
65
|
+
:func_type=>"int",
|
|
66
|
+
:args=>
|
|
67
|
+
[["gsl_vector *", "reg_param"],
|
|
68
|
+
["gsl_vector *", "rho"],
|
|
69
|
+
["gsl_vector *", "eta"],
|
|
70
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
71
|
+
:desc=>
|
|
72
|
+
"This function computes the L-curve for a large least squares system\n" +
|
|
73
|
+
"after it has been fully accumulated into the workspace work.\n" +
|
|
74
|
+
"The output vectors reg_param, rho, and eta must all\n" +
|
|
75
|
+
"be the same size, and will contain the regularization parameters\n" +
|
|
76
|
+
"\\lambda_i, residual norms ||y - X c_i||, and solution\n" +
|
|
77
|
+
"norms || L c_i || which compose the L-curve, where c_i\n" +
|
|
78
|
+
"is the regularized solution vector corresponding to \\lambda_i.\n" +
|
|
79
|
+
"The user may determine the number of points on the L-curve by\n" +
|
|
80
|
+
"adjusting the size of these input arrays. For the TSQR method,\n" +
|
|
81
|
+
"the regularization parameters \\lambda_i are estimated from the\n" +
|
|
82
|
+
"singular values of the triangular R factor. For the normal\n" +
|
|
83
|
+
"equations method, they are estimated from the eigenvalues of the\n" +
|
|
84
|
+
"X^T X matrix."},
|
|
85
|
+
{:func_name=>"gsl_multilarge_linear_name",
|
|
86
|
+
:func_type=>"const char *",
|
|
87
|
+
:args=>[["gsl_multilarge_linear_workspace *", "w"]],
|
|
88
|
+
:desc=>
|
|
89
|
+
"This function returns a string pointer to the name\n" +
|
|
90
|
+
"of the multilarge solver."},
|
|
91
|
+
{:func_name=>"gsl_multilarge_linear_rcond",
|
|
92
|
+
:func_type=>"int",
|
|
93
|
+
:args=>
|
|
94
|
+
[["double *", "rcond"], ["gsl_multilarge_linear_workspace *", "work"]],
|
|
95
|
+
:desc=>
|
|
96
|
+
"This function computes the reciprocal condition number, stored in\n" +
|
|
97
|
+
"rcond, of the least squares matrix after it has been accumulated\n" +
|
|
98
|
+
"into the workspace work. For the TSQR algorithm, this is\n" +
|
|
99
|
+
"accomplished by calculating the SVD of the R factor, which\n" +
|
|
100
|
+
"has the same singular values as the matrix X. For the normal\n" +
|
|
101
|
+
"equations method, this is done by computing the eigenvalues of\n" +
|
|
102
|
+
"X^T X, which could be inaccurate for ill-conditioned matrices\n" +
|
|
103
|
+
"X."},
|
|
104
|
+
{:func_name=>"gsl_multilarge_linear_reset",
|
|
105
|
+
:func_type=>"int",
|
|
106
|
+
:args=>[["gsl_multilarge_linear_workspace *", "w"]],
|
|
107
|
+
:desc=>
|
|
108
|
+
"This function resets the workspace w so\n" +
|
|
109
|
+
"it can begin to accumulate a new least squares\n" +
|
|
110
|
+
"system."},
|
|
111
|
+
{:func_name=>"gsl_multilarge_linear_solve",
|
|
112
|
+
:func_type=>"int",
|
|
113
|
+
:args=>
|
|
114
|
+
[["const double", "lambda"],
|
|
115
|
+
["gsl_vector *", "c"],
|
|
116
|
+
["double *", "rnorm"],
|
|
117
|
+
["double *", "snorm"],
|
|
118
|
+
["gsl_multilarge_linear_workspace *", "w"]],
|
|
119
|
+
:desc=>
|
|
120
|
+
"After all blocks (X_i,y_i) have been accumulated into\n" +
|
|
121
|
+
"the large least squares system, this function will compute\n" +
|
|
122
|
+
"the solution vector which is stored in c on output.\n" +
|
|
123
|
+
"The regularization parameter \\lambda is provided in\n" +
|
|
124
|
+
"lambda. On output, rnorm contains the residual norm\n" +
|
|
125
|
+
"||y - X c||_W and snorm contains the solution\n" +
|
|
126
|
+
"norm ||L c||."},
|
|
127
|
+
{:func_name=>"gsl_multilarge_linear_stdform1",
|
|
128
|
+
:func_type=>"int",
|
|
129
|
+
:args=>
|
|
130
|
+
[["const gsl_vector *", "L"],
|
|
131
|
+
["const gsl_matrix *", "X"],
|
|
132
|
+
["const gsl_vector *", "y"],
|
|
133
|
+
["gsl_matrix *", "Xs"],
|
|
134
|
+
["gsl_vector *", "ys"],
|
|
135
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
136
|
+
:desc=>
|
|
137
|
+
"These functions define a regularization matrix\n" +
|
|
138
|
+
"L = \\diag(l_0,l_1,...,l_{p-1}).\n" +
|
|
139
|
+
"The diagonal matrix element l_i is provided by the\n" +
|
|
140
|
+
"i-th element of the input vector L.\n" +
|
|
141
|
+
"The block (X, y) is converted to standard form and\n" +
|
|
142
|
+
"the parameters (\\tilde{X}, \\tilde{y}) are stored in Xs\n" +
|
|
143
|
+
"and ys on output. Xs and ys have the same dimensions as\n" +
|
|
144
|
+
"X and y. Optional data weights may be supplied in the\n" +
|
|
145
|
+
"vector w. In order to apply this transformation,\n" +
|
|
146
|
+
"L^{-1} must exist and so none of the l_i\n" +
|
|
147
|
+
"may be zero. After the standard form system has been solved,\n" +
|
|
148
|
+
"use gsl_multilarge_linear_genform1 to recover the original solution vector.\n" +
|
|
149
|
+
"It is allowed to have X = Xs and y = ys for an\n" +
|
|
150
|
+
"in-place transform."},
|
|
151
|
+
{:func_name=>"gsl_multilarge_linear_stdform2",
|
|
152
|
+
:func_type=>"int",
|
|
153
|
+
:args=>
|
|
154
|
+
[["const gsl_matrix *", "LQR"],
|
|
155
|
+
["const gsl_vector *", "Ltau"],
|
|
156
|
+
["const gsl_matrix *", "X"],
|
|
157
|
+
["const gsl_vector *", "y"],
|
|
158
|
+
["gsl_matrix *", "Xs"],
|
|
159
|
+
["gsl_vector *", "ys"],
|
|
160
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
161
|
+
:desc=>
|
|
162
|
+
"These functions convert a block of rows (X, y, w) to standard\n" +
|
|
163
|
+
"form (\\tilde{X}, \\tilde{y}) which are stored in Xs and ys\n" +
|
|
164
|
+
"respectively. X, y, and w must all have the same number of rows.\n" +
|
|
165
|
+
"The m-by-p regularization matrix L is specified by the inputs\n" +
|
|
166
|
+
"LQR and Ltau, which are outputs from gsl_multilarge_linear_L_decomp.\n" +
|
|
167
|
+
"Xs and ys have the same dimensions as X and y. After the\n" +
|
|
168
|
+
"standard form system has been solved, use gsl_multilarge_linear_genform2 to\n" +
|
|
169
|
+
"recover the original solution vector. Optional data weights may be supplied in the\n" +
|
|
170
|
+
"vector w, where W = \\diag(w)."},
|
|
171
|
+
{:func_name=>"gsl_multilarge_linear_wstdform1",
|
|
172
|
+
:func_type=>"int",
|
|
173
|
+
:args=>
|
|
174
|
+
[["const gsl_vector *", "L"],
|
|
175
|
+
["const gsl_matrix *", "X"],
|
|
176
|
+
["const gsl_vector *", "w"],
|
|
177
|
+
["const gsl_vector *", "y"],
|
|
178
|
+
["gsl_matrix *", "Xs"],
|
|
179
|
+
["gsl_vector *", "ys"],
|
|
180
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
181
|
+
:desc=>
|
|
182
|
+
"These functions define a regularization matrix\n" +
|
|
183
|
+
"L = \\diag(l_0,l_1,...,l_{p-1}).\n" +
|
|
184
|
+
"The diagonal matrix element l_i is provided by the\n" +
|
|
185
|
+
"i-th element of the input vector L.\n" +
|
|
186
|
+
"The block (X, y) is converted to standard form and\n" +
|
|
187
|
+
"the parameters (\\tilde{X}, \\tilde{y}) are stored in Xs\n" +
|
|
188
|
+
"and ys on output. Xs and ys have the same dimensions as\n" +
|
|
189
|
+
"X and y. Optional data weights may be supplied in the\n" +
|
|
190
|
+
"vector w. In order to apply this transformation,\n" +
|
|
191
|
+
"L^{-1} must exist and so none of the l_i\n" +
|
|
192
|
+
"may be zero. After the standard form system has been solved,\n" +
|
|
193
|
+
"use gsl_multilarge_linear_genform1 to recover the original solution vector.\n" +
|
|
194
|
+
"It is allowed to have X = Xs and y = ys for an\n" +
|
|
195
|
+
"in-place transform."},
|
|
196
|
+
{:func_name=>"gsl_multilarge_linear_wstdform2",
|
|
197
|
+
:func_type=>"int",
|
|
198
|
+
:args=>
|
|
199
|
+
[["const gsl_matrix *", "LQR"],
|
|
200
|
+
["const gsl_vector *", "Ltau"],
|
|
201
|
+
["const gsl_matrix *", "X"],
|
|
202
|
+
["const gsl_vector *", "w"],
|
|
203
|
+
["const gsl_vector *", "y"],
|
|
204
|
+
["gsl_matrix *", "Xs"],
|
|
205
|
+
["gsl_vector *", "ys"],
|
|
206
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
207
|
+
:desc=>
|
|
208
|
+
"These functions convert a block of rows (X, y, w) to standard\n" +
|
|
209
|
+
"form (\\tilde{X}, \\tilde{y}) which are stored in Xs and ys\n" +
|
|
210
|
+
"respectively. X, y, and w must all have the same number of rows.\n" +
|
|
211
|
+
"The m-by-p regularization matrix L is specified by the inputs\n" +
|
|
212
|
+
"LQR and Ltau, which are outputs from gsl_multilarge_linear_L_decomp.\n" +
|
|
213
|
+
"Xs and ys have the same dimensions as X and y. After the\n" +
|
|
214
|
+
"standard form system has been solved, use gsl_multilarge_linear_genform2 to\n" +
|
|
215
|
+
"recover the original solution vector. Optional data weights may be supplied in the\n" +
|
|
216
|
+
"vector w, where W = \\diag(w)."}]
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
[{:func_name=>"gsl_multilarge_linear_L_decomp",
|
|
2
|
+
:func_type=>"int",
|
|
3
|
+
:args=>[["gsl_matrix *", "L"], ["gsl_vector *", "tau"]],
|
|
4
|
+
:desc=>
|
|
5
|
+
"This function calculates the QR decomposition of the m-by-p\n" +
|
|
6
|
+
"regularization matrix L. L must have m \\ge p. On output,\n" +
|
|
7
|
+
"the Householder scalars are stored in the vector tau of size p.\n" +
|
|
8
|
+
"These outputs will be used by gsl_multilarge_linear_wstdform2 to complete the\n" +
|
|
9
|
+
"transformation to standard form."},
|
|
10
|
+
{:func_name=>"gsl_multilarge_linear_accumulate",
|
|
11
|
+
:func_type=>"int",
|
|
12
|
+
:args=>
|
|
13
|
+
[["gsl_matrix *", "X"],
|
|
14
|
+
["gsl_vector *", "y"],
|
|
15
|
+
["gsl_multilarge_linear_workspace *", "w"]],
|
|
16
|
+
:desc=>
|
|
17
|
+
"This function accumulates the standard form block (X,y) into the\n" +
|
|
18
|
+
"current least squares system. X and y have the same number\n" +
|
|
19
|
+
"of rows, which can be arbitrary. X must have p columns.\n" +
|
|
20
|
+
"For the TSQR method, X and y are destroyed on output.\n" +
|
|
21
|
+
"For the normal equations method, they are both unchanged."},
|
|
22
|
+
{:func_name=>"gsl_multilarge_linear_alloc",
|
|
23
|
+
:func_type=>"gsl_multilarge_linear_workspace *",
|
|
24
|
+
:args=>[["const gsl_multilarge_linear_type *", "T"], ["const size_t", "p"]],
|
|
25
|
+
:desc=>
|
|
26
|
+
"This function allocates a workspace for solving large linear least squares\n" +
|
|
27
|
+
"systems. The least squares matrix X has p columns,\n" +
|
|
28
|
+
"but may have any number of rows.\n" +
|
|
29
|
+
".. type:: gsl_multilarge_linear_type"},
|
|
30
|
+
{:func_name=>"gsl_multilarge_linear_free",
|
|
31
|
+
:func_type=>"void",
|
|
32
|
+
:args=>[["gsl_multilarge_linear_workspace *", "w"]],
|
|
33
|
+
:desc=>
|
|
34
|
+
"This function frees the memory associated with the\n" + "workspace w."},
|
|
35
|
+
{:func_name=>"gsl_multilarge_linear_genform1",
|
|
36
|
+
:func_type=>"int",
|
|
37
|
+
:args=>
|
|
38
|
+
[["const gsl_vector *", "L"],
|
|
39
|
+
["const gsl_vector *", "cs"],
|
|
40
|
+
["gsl_vector *", "c"],
|
|
41
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
42
|
+
:desc=>
|
|
43
|
+
"After a regularized system has been solved with\n" +
|
|
44
|
+
"L = \\diag(\\l_0,\\l_1,...,\\l_{p-1}),\n" +
|
|
45
|
+
"this function backtransforms the standard form solution vector cs\n" +
|
|
46
|
+
"to recover the solution vector of the original problem c. The\n" +
|
|
47
|
+
"diagonal matrix elements l_i are provided in\n" +
|
|
48
|
+
"the vector L. It is allowed to have c = cs for an\n" +
|
|
49
|
+
"in-place transform."},
|
|
50
|
+
{:func_name=>"gsl_multilarge_linear_genform2",
|
|
51
|
+
:func_type=>"int",
|
|
52
|
+
:args=>
|
|
53
|
+
[["const gsl_matrix *", "LQR"],
|
|
54
|
+
["const gsl_vector *", "Ltau"],
|
|
55
|
+
["const gsl_vector *", "cs"],
|
|
56
|
+
["gsl_vector *", "c"],
|
|
57
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
58
|
+
:desc=>
|
|
59
|
+
"After a regularized system has been solved with a regularization matrix L,\n" +
|
|
60
|
+
"specified by (LQR, Ltau), this function backtransforms the standard form\n" +
|
|
61
|
+
"solution cs\n" +
|
|
62
|
+
"to recover the solution vector of the original problem, which is stored in c,\n" +
|
|
63
|
+
"of length p."},
|
|
64
|
+
{:func_name=>"gsl_multilarge_linear_lcurve",
|
|
65
|
+
:func_type=>"int",
|
|
66
|
+
:args=>
|
|
67
|
+
[["gsl_vector *", "reg_param"],
|
|
68
|
+
["gsl_vector *", "rho"],
|
|
69
|
+
["gsl_vector *", "eta"],
|
|
70
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
71
|
+
:desc=>
|
|
72
|
+
"This function computes the L-curve for a large least squares system\n" +
|
|
73
|
+
"after it has been fully accumulated into the workspace work.\n" +
|
|
74
|
+
"The output vectors reg_param, rho, and eta must all\n" +
|
|
75
|
+
"be the same size, and will contain the regularization parameters\n" +
|
|
76
|
+
"\\lambda_i, residual norms ||y - X c_i||, and solution\n" +
|
|
77
|
+
"norms || L c_i || which compose the L-curve, where c_i\n" +
|
|
78
|
+
"is the regularized solution vector corresponding to \\lambda_i.\n" +
|
|
79
|
+
"The user may determine the number of points on the L-curve by\n" +
|
|
80
|
+
"adjusting the size of these input arrays. For the TSQR method,\n" +
|
|
81
|
+
"the regularization parameters \\lambda_i are estimated from the\n" +
|
|
82
|
+
"singular values of the triangular R factor. For the normal\n" +
|
|
83
|
+
"equations method, they are estimated from the eigenvalues of the\n" +
|
|
84
|
+
"X^T X matrix."},
|
|
85
|
+
{:func_name=>"gsl_multilarge_linear_name",
|
|
86
|
+
:func_type=>"const char *",
|
|
87
|
+
:args=>[["gsl_multilarge_linear_workspace *", "w"]],
|
|
88
|
+
:desc=>
|
|
89
|
+
"This function returns a string pointer to the name\n" +
|
|
90
|
+
"of the multilarge solver."},
|
|
91
|
+
{:func_name=>"gsl_multilarge_linear_rcond",
|
|
92
|
+
:func_type=>"int",
|
|
93
|
+
:args=>
|
|
94
|
+
[["double *", "rcond"], ["gsl_multilarge_linear_workspace *", "work"]],
|
|
95
|
+
:desc=>
|
|
96
|
+
"This function computes the reciprocal condition number, stored in\n" +
|
|
97
|
+
"rcond, of the least squares matrix after it has been accumulated\n" +
|
|
98
|
+
"into the workspace work. For the TSQR algorithm, this is\n" +
|
|
99
|
+
"accomplished by calculating the SVD of the R factor, which\n" +
|
|
100
|
+
"has the same singular values as the matrix X. For the normal\n" +
|
|
101
|
+
"equations method, this is done by computing the eigenvalues of\n" +
|
|
102
|
+
"X^T X, which could be inaccurate for ill-conditioned matrices\n" +
|
|
103
|
+
"X."},
|
|
104
|
+
{:func_name=>"gsl_multilarge_linear_reset",
|
|
105
|
+
:func_type=>"int",
|
|
106
|
+
:args=>[["gsl_multilarge_linear_workspace *", "w"]],
|
|
107
|
+
:desc=>
|
|
108
|
+
"This function resets the workspace w so\n" +
|
|
109
|
+
"it can begin to accumulate a new least squares\n" +
|
|
110
|
+
"system."},
|
|
111
|
+
{:func_name=>"gsl_multilarge_linear_solve",
|
|
112
|
+
:func_type=>"int",
|
|
113
|
+
:args=>
|
|
114
|
+
[["const double", "lambda"],
|
|
115
|
+
["gsl_vector *", "c"],
|
|
116
|
+
["double *", "rnorm"],
|
|
117
|
+
["double *", "snorm"],
|
|
118
|
+
["gsl_multilarge_linear_workspace *", "w"]],
|
|
119
|
+
:desc=>
|
|
120
|
+
"After all blocks (X_i,y_i) have been accumulated into\n" +
|
|
121
|
+
"the large least squares system, this function will compute\n" +
|
|
122
|
+
"the solution vector which is stored in c on output.\n" +
|
|
123
|
+
"The regularization parameter \\lambda is provided in\n" +
|
|
124
|
+
"lambda. On output, rnorm contains the residual norm\n" +
|
|
125
|
+
"||y - X c||_W and snorm contains the solution\n" +
|
|
126
|
+
"norm ||L c||."},
|
|
127
|
+
{:func_name=>"gsl_multilarge_linear_stdform1",
|
|
128
|
+
:func_type=>"int",
|
|
129
|
+
:args=>
|
|
130
|
+
[["const gsl_vector *", "L"],
|
|
131
|
+
["const gsl_matrix *", "X"],
|
|
132
|
+
["const gsl_vector *", "y"],
|
|
133
|
+
["gsl_matrix *", "Xs"],
|
|
134
|
+
["gsl_vector *", "ys"],
|
|
135
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
136
|
+
:desc=>
|
|
137
|
+
"These functions define a regularization matrix\n" +
|
|
138
|
+
"L = \\diag(l_0,l_1,...,l_{p-1}).\n" +
|
|
139
|
+
"The diagonal matrix element l_i is provided by the\n" +
|
|
140
|
+
"i-th element of the input vector L.\n" +
|
|
141
|
+
"The block (X, y) is converted to standard form and\n" +
|
|
142
|
+
"the parameters (\\tilde{X}, \\tilde{y}) are stored in Xs\n" +
|
|
143
|
+
"and ys on output. Xs and ys have the same dimensions as\n" +
|
|
144
|
+
"X and y. Optional data weights may be supplied in the\n" +
|
|
145
|
+
"vector w. In order to apply this transformation,\n" +
|
|
146
|
+
"L^{-1} must exist and so none of the l_i\n" +
|
|
147
|
+
"may be zero. After the standard form system has been solved,\n" +
|
|
148
|
+
"use gsl_multilarge_linear_genform1 to recover the original solution vector.\n" +
|
|
149
|
+
"It is allowed to have X = Xs and y = ys for an\n" +
|
|
150
|
+
"in-place transform."},
|
|
151
|
+
{:func_name=>"gsl_multilarge_linear_stdform2",
|
|
152
|
+
:func_type=>"int",
|
|
153
|
+
:args=>
|
|
154
|
+
[["const gsl_matrix *", "LQR"],
|
|
155
|
+
["const gsl_vector *", "Ltau"],
|
|
156
|
+
["const gsl_matrix *", "X"],
|
|
157
|
+
["const gsl_vector *", "y"],
|
|
158
|
+
["gsl_matrix *", "Xs"],
|
|
159
|
+
["gsl_vector *", "ys"],
|
|
160
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
161
|
+
:desc=>
|
|
162
|
+
"These functions convert a block of rows (X, y, w) to standard\n" +
|
|
163
|
+
"form (\\tilde{X}, \\tilde{y}) which are stored in Xs and ys\n" +
|
|
164
|
+
"respectively. X, y, and w must all have the same number of rows.\n" +
|
|
165
|
+
"The m-by-p regularization matrix L is specified by the inputs\n" +
|
|
166
|
+
"LQR and Ltau, which are outputs from gsl_multilarge_linear_L_decomp.\n" +
|
|
167
|
+
"Xs and ys have the same dimensions as X and y. After the\n" +
|
|
168
|
+
"standard form system has been solved, use gsl_multilarge_linear_genform2 to\n" +
|
|
169
|
+
"recover the original solution vector. Optional data weights may be supplied in the\n" +
|
|
170
|
+
"vector w, where W = \\diag(w)."},
|
|
171
|
+
{:func_name=>"gsl_multilarge_linear_wstdform1",
|
|
172
|
+
:func_type=>"int",
|
|
173
|
+
:args=>
|
|
174
|
+
[["const gsl_vector *", "L"],
|
|
175
|
+
["const gsl_matrix *", "X"],
|
|
176
|
+
["const gsl_vector *", "w"],
|
|
177
|
+
["const gsl_vector *", "y"],
|
|
178
|
+
["gsl_matrix *", "Xs"],
|
|
179
|
+
["gsl_vector *", "ys"],
|
|
180
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
181
|
+
:desc=>
|
|
182
|
+
"These functions define a regularization matrix\n" +
|
|
183
|
+
"L = \\diag(l_0,l_1,...,l_{p-1}).\n" +
|
|
184
|
+
"The diagonal matrix element l_i is provided by the\n" +
|
|
185
|
+
"i-th element of the input vector L.\n" +
|
|
186
|
+
"The block (X, y) is converted to standard form and\n" +
|
|
187
|
+
"the parameters (\\tilde{X}, \\tilde{y}) are stored in Xs\n" +
|
|
188
|
+
"and ys on output. Xs and ys have the same dimensions as\n" +
|
|
189
|
+
"X and y. Optional data weights may be supplied in the\n" +
|
|
190
|
+
"vector w. In order to apply this transformation,\n" +
|
|
191
|
+
"L^{-1} must exist and so none of the l_i\n" +
|
|
192
|
+
"may be zero. After the standard form system has been solved,\n" +
|
|
193
|
+
"use gsl_multilarge_linear_genform1 to recover the original solution vector.\n" +
|
|
194
|
+
"It is allowed to have X = Xs and y = ys for an\n" +
|
|
195
|
+
"in-place transform."},
|
|
196
|
+
{:func_name=>"gsl_multilarge_linear_wstdform2",
|
|
197
|
+
:func_type=>"int",
|
|
198
|
+
:args=>
|
|
199
|
+
[["const gsl_matrix *", "LQR"],
|
|
200
|
+
["const gsl_vector *", "Ltau"],
|
|
201
|
+
["const gsl_matrix *", "X"],
|
|
202
|
+
["const gsl_vector *", "w"],
|
|
203
|
+
["const gsl_vector *", "y"],
|
|
204
|
+
["gsl_matrix *", "Xs"],
|
|
205
|
+
["gsl_vector *", "ys"],
|
|
206
|
+
["gsl_multilarge_linear_workspace *", "work"]],
|
|
207
|
+
:desc=>
|
|
208
|
+
"These functions convert a block of rows (X, y, w) to standard\n" +
|
|
209
|
+
"form (\\tilde{X}, \\tilde{y}) which are stored in Xs and ys\n" +
|
|
210
|
+
"respectively. X, y, and w must all have the same number of rows.\n" +
|
|
211
|
+
"The m-by-p regularization matrix L is specified by the inputs\n" +
|
|
212
|
+
"LQR and Ltau, which are outputs from gsl_multilarge_linear_L_decomp.\n" +
|
|
213
|
+
"Xs and ys have the same dimensions as X and y. After the\n" +
|
|
214
|
+
"standard form system has been solved, use gsl_multilarge_linear_genform2 to\n" +
|
|
215
|
+
"recover the original solution vector. Optional data weights may be supplied in the\n" +
|
|
216
|
+
"vector w, where W = \\diag(w)."}]
|