gsl 1.12.108
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +29 -0
- data/Rakefile +54 -0
- data/VERSION +2 -0
- data/ext/MANIFEST +119 -0
- data/ext/alf.c +206 -0
- data/ext/array.c +666 -0
- data/ext/array_complex.c +247 -0
- data/ext/blas.c +29 -0
- data/ext/blas1.c +731 -0
- data/ext/blas2.c +1093 -0
- data/ext/blas3.c +881 -0
- data/ext/block.c +44 -0
- data/ext/block_source.c +886 -0
- data/ext/bspline.c +130 -0
- data/ext/bundle.c +3 -0
- data/ext/cdf.c +754 -0
- data/ext/cheb.c +542 -0
- data/ext/combination.c +283 -0
- data/ext/common.c +325 -0
- data/ext/complex.c +1004 -0
- data/ext/const.c +673 -0
- data/ext/const_additional.c +120 -0
- data/ext/cqp.c +283 -0
- data/ext/deriv.c +195 -0
- data/ext/dht.c +361 -0
- data/ext/diff.c +166 -0
- data/ext/dirac.c +395 -0
- data/ext/eigen.c +2373 -0
- data/ext/error.c +194 -0
- data/ext/extconf.rb +281 -0
- data/ext/fcmp.c +66 -0
- data/ext/fft.c +1092 -0
- data/ext/fit.c +205 -0
- data/ext/fresnel.c +312 -0
- data/ext/function.c +524 -0
- data/ext/geometry.c +139 -0
- data/ext/graph.c +1638 -0
- data/ext/gsl.c +271 -0
- data/ext/gsl_narray.c +653 -0
- data/ext/histogram.c +1995 -0
- data/ext/histogram2d.c +1068 -0
- data/ext/histogram3d.c +884 -0
- data/ext/histogram3d_source.c +750 -0
- data/ext/histogram_find.c +101 -0
- data/ext/histogram_oper.c +159 -0
- data/ext/ieee.c +98 -0
- data/ext/integration.c +1138 -0
- data/ext/interp.c +512 -0
- data/ext/jacobi.c +739 -0
- data/ext/linalg.c +4047 -0
- data/ext/linalg_complex.c +741 -0
- data/ext/math.c +725 -0
- data/ext/matrix.c +39 -0
- data/ext/matrix_complex.c +1732 -0
- data/ext/matrix_double.c +560 -0
- data/ext/matrix_int.c +256 -0
- data/ext/matrix_source.c +2733 -0
- data/ext/min.c +250 -0
- data/ext/monte.c +992 -0
- data/ext/multifit.c +1879 -0
- data/ext/multimin.c +808 -0
- data/ext/multimin_fsdf.c +156 -0
- data/ext/multiroots.c +955 -0
- data/ext/ndlinear.c +321 -0
- data/ext/nmf.c +167 -0
- data/ext/nmf_wrap.c +72 -0
- data/ext/ntuple.c +469 -0
- data/ext/odeiv.c +959 -0
- data/ext/ool.c +879 -0
- data/ext/oper_complex_source.c +253 -0
- data/ext/permutation.c +596 -0
- data/ext/poly.c +42 -0
- data/ext/poly2.c +265 -0
- data/ext/poly_source.c +1885 -0
- data/ext/qrng.c +171 -0
- data/ext/randist.c +1873 -0
- data/ext/rational.c +480 -0
- data/ext/rng.c +612 -0
- data/ext/root.c +408 -0
- data/ext/sf.c +1494 -0
- data/ext/sf_airy.c +200 -0
- data/ext/sf_bessel.c +867 -0
- data/ext/sf_clausen.c +28 -0
- data/ext/sf_coulomb.c +206 -0
- data/ext/sf_coupling.c +118 -0
- data/ext/sf_dawson.c +29 -0
- data/ext/sf_debye.c +157 -0
- data/ext/sf_dilog.c +42 -0
- data/ext/sf_elementary.c +44 -0
- data/ext/sf_ellint.c +206 -0
- data/ext/sf_elljac.c +29 -0
- data/ext/sf_erfc.c +93 -0
- data/ext/sf_exp.c +164 -0
- data/ext/sf_expint.c +211 -0
- data/ext/sf_fermi_dirac.c +148 -0
- data/ext/sf_gamma.c +344 -0
- data/ext/sf_gegenbauer.c +96 -0
- data/ext/sf_hyperg.c +197 -0
- data/ext/sf_laguerre.c +112 -0
- data/ext/sf_lambert.c +47 -0
- data/ext/sf_legendre.c +367 -0
- data/ext/sf_log.c +104 -0
- data/ext/sf_mathieu.c +238 -0
- data/ext/sf_power.c +46 -0
- data/ext/sf_psi.c +98 -0
- data/ext/sf_synchrotron.c +48 -0
- data/ext/sf_transport.c +76 -0
- data/ext/sf_trigonometric.c +207 -0
- data/ext/sf_zeta.c +119 -0
- data/ext/signal.c +310 -0
- data/ext/siman.c +718 -0
- data/ext/sort.c +208 -0
- data/ext/spline.c +395 -0
- data/ext/stats.c +799 -0
- data/ext/sum.c +168 -0
- data/ext/tamu_anova.c +56 -0
- data/ext/tensor.c +38 -0
- data/ext/tensor_source.c +1123 -0
- data/ext/vector.c +38 -0
- data/ext/vector_complex.c +2236 -0
- data/ext/vector_double.c +1433 -0
- data/ext/vector_int.c +204 -0
- data/ext/vector_source.c +3329 -0
- data/ext/wavelet.c +937 -0
- data/include/rb_gsl.h +151 -0
- data/include/rb_gsl_array.h +238 -0
- data/include/rb_gsl_cheb.h +21 -0
- data/include/rb_gsl_common.h +343 -0
- data/include/rb_gsl_complex.h +25 -0
- data/include/rb_gsl_const.h +29 -0
- data/include/rb_gsl_dirac.h +13 -0
- data/include/rb_gsl_eigen.h +17 -0
- data/include/rb_gsl_fft.h +62 -0
- data/include/rb_gsl_fit.h +25 -0
- data/include/rb_gsl_function.h +27 -0
- data/include/rb_gsl_graph.h +70 -0
- data/include/rb_gsl_histogram.h +63 -0
- data/include/rb_gsl_histogram3d.h +97 -0
- data/include/rb_gsl_integration.h +17 -0
- data/include/rb_gsl_interp.h +46 -0
- data/include/rb_gsl_linalg.h +25 -0
- data/include/rb_gsl_math.h +26 -0
- data/include/rb_gsl_odeiv.h +21 -0
- data/include/rb_gsl_poly.h +71 -0
- data/include/rb_gsl_rational.h +37 -0
- data/include/rb_gsl_rng.h +21 -0
- data/include/rb_gsl_root.h +22 -0
- data/include/rb_gsl_sf.h +119 -0
- data/include/rb_gsl_statistics.h +17 -0
- data/include/rb_gsl_tensor.h +45 -0
- data/include/rb_gsl_with_narray.h +22 -0
- data/include/templates_off.h +87 -0
- data/include/templates_on.h +241 -0
- data/lib/gsl/gnuplot.rb +41 -0
- data/lib/gsl/oper.rb +68 -0
- data/lib/ool.rb +22 -0
- data/lib/ool/conmin.rb +30 -0
- metadata +224 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl_complex.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2004 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
11
|
+
*/
|
12
|
+
|
13
|
+
#ifndef ___RB_GSL_COMPLEX_H___
|
14
|
+
#define ___RB_GSL_COMPLEX_H___
|
15
|
+
|
16
|
+
#include <math.h>
|
17
|
+
#include "ruby.h"
|
18
|
+
#include <gsl/gsl_complex.h>
|
19
|
+
#include <gsl/gsl_complex_math.h>
|
20
|
+
|
21
|
+
EXTERN VALUE cgsl_complex;
|
22
|
+
VALUE rb_gsl_complex_pow(int argc, VALUE *argv, VALUE obj);
|
23
|
+
VALUE rb_gsl_complex_pow_real(int argc, VALUE *argv, VALUE obj);
|
24
|
+
|
25
|
+
#endif
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2004 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
11
|
+
*/
|
12
|
+
|
13
|
+
#ifndef ___RB_GSL_CONST_H___
|
14
|
+
#define ___RB_GSL_CONST_H___
|
15
|
+
|
16
|
+
#include "ruby.h"
|
17
|
+
#include "rb_gsl.h"
|
18
|
+
#ifdef GSL_CONST_OLD
|
19
|
+
#include <gsl/gsl_const_mks.h>
|
20
|
+
#include <gsl/gsl_const_cgs.h>
|
21
|
+
#else
|
22
|
+
#include <gsl/gsl_const_mksa.h>
|
23
|
+
#include <gsl/gsl_const_cgsm.h>
|
24
|
+
#endif
|
25
|
+
#include <gsl/gsl_const_num.h>
|
26
|
+
|
27
|
+
EXTERN VALUE mgsl_const_mks, mgsl_const_cgs;
|
28
|
+
|
29
|
+
#endif
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#ifndef ___RB_GSL_DIRAC_H___
|
2
|
+
#define ___RB_GSL_DIRAC_H___
|
3
|
+
|
4
|
+
#include "rb_gsl.h"
|
5
|
+
#include "rb_gsl_common.h"
|
6
|
+
#include "rb_gsl_complex.h"
|
7
|
+
#include "rb_gsl_array.h"
|
8
|
+
#include <stdio.h>
|
9
|
+
#include <stdlib.h>
|
10
|
+
#include <string.h>
|
11
|
+
#include <math.h>
|
12
|
+
|
13
|
+
#endif
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl_eigen.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2004 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY
|
10
|
+
*/
|
11
|
+
|
12
|
+
#ifndef ___RB_GSL_EIGEN_H___
|
13
|
+
#define ___RB_GSL_EIGEN_H___
|
14
|
+
|
15
|
+
#include "gsl/gsl_eigen.h"
|
16
|
+
|
17
|
+
#endif
|
@@ -0,0 +1,62 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl_fft.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2004 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or FFTNESS FOR A PARTICULAR PURPOSE.
|
11
|
+
*/
|
12
|
+
|
13
|
+
#ifndef ___RB_GSL_FFT_H___
|
14
|
+
#define ___RB_GSL_FFT_H___
|
15
|
+
|
16
|
+
|
17
|
+
#include <stdio.h>
|
18
|
+
#include <math.h>
|
19
|
+
#include "ruby.h"
|
20
|
+
#include <gsl/gsl_vector.h>
|
21
|
+
#include <gsl/gsl_errno.h>
|
22
|
+
#include <gsl/gsl_fft.h>
|
23
|
+
#include <gsl/gsl_fft_complex.h>
|
24
|
+
#include <gsl/gsl_fft_real.h>
|
25
|
+
#include <gsl/gsl_fft_halfcomplex.h>
|
26
|
+
#include "rb_gsl_array.h"
|
27
|
+
#include "rb_gsl.h"
|
28
|
+
|
29
|
+
#include "rb_gsl_complex.h"
|
30
|
+
#include "rb_gsl_array.h"
|
31
|
+
#ifdef HAVE_NARRAY_H
|
32
|
+
#include "narray.h"
|
33
|
+
#endif
|
34
|
+
|
35
|
+
typedef struct
|
36
|
+
{
|
37
|
+
size_t n;
|
38
|
+
size_t nf;
|
39
|
+
size_t factor[64];
|
40
|
+
gsl_complex *twiddle[64];
|
41
|
+
gsl_complex *trig;
|
42
|
+
} GSL_FFT_Wavetable;
|
43
|
+
|
44
|
+
typedef struct
|
45
|
+
{
|
46
|
+
size_t n;
|
47
|
+
double *scratch;
|
48
|
+
} GSL_FFT_Workspace;
|
49
|
+
|
50
|
+
enum {
|
51
|
+
RB_GSL_FFT_INPLACE,
|
52
|
+
RB_GSL_FFT_COPY,
|
53
|
+
};
|
54
|
+
|
55
|
+
EXTERN VALUE mgsl_fft;
|
56
|
+
EXTERN VALUE cgsl_fft_wavetable;
|
57
|
+
EXTERN VALUE cgsl_fft_wavetable_factor;
|
58
|
+
EXTERN VALUE cgsl_fft_complex_wavetable, cgsl_fft_complex_workspace;
|
59
|
+
EXTERN VALUE cgsl_fft_real_wavetable, cgsl_fft_halfcomplex_wavetable;
|
60
|
+
EXTERN VALUE cgsl_fft_real_workspace;
|
61
|
+
|
62
|
+
#endif
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl_fit.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2004 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
11
|
+
*/
|
12
|
+
|
13
|
+
#ifndef ___RB_GSL_FIT_H___
|
14
|
+
#define ___RB_GSL_FIT_H___
|
15
|
+
|
16
|
+
#include "ruby.h"
|
17
|
+
#include <gsl/gsl_blas.h>
|
18
|
+
#include <gsl/gsl_fit.h>
|
19
|
+
#include <gsl/gsl_multifit.h>
|
20
|
+
#include <gsl/gsl_multifit_nlin.h>
|
21
|
+
#include "rb_gsl_array.h"
|
22
|
+
|
23
|
+
EXTERN VALUE mgsl_multifit;
|
24
|
+
|
25
|
+
#endif
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl_function.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2004 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
11
|
+
*/
|
12
|
+
|
13
|
+
#ifndef ___RB_GSL_FUNCTION_H___
|
14
|
+
#define ___RB_GSL_FUNCTION_H___
|
15
|
+
|
16
|
+
#include "ruby.h"
|
17
|
+
#include <gsl/gsl_vector.h>
|
18
|
+
#include <gsl/gsl_integration.h>
|
19
|
+
#include <gsl/gsl_math.h>
|
20
|
+
#include "rb_gsl.h"
|
21
|
+
|
22
|
+
EXTERN VALUE cgsl_function;
|
23
|
+
EXTERN VALUE cgsl_function_fdf;
|
24
|
+
extern ID RBGSL_ID_call, RBGSL_ID_arity;
|
25
|
+
void gsl_function_mark(gsl_function *f);
|
26
|
+
void gsl_function_free(gsl_function *f);
|
27
|
+
#endif
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl_graph.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2004 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or CHEBNESS FOR A PARTICULAR PURPOSE.
|
11
|
+
*/
|
12
|
+
|
13
|
+
#ifndef ___RB_GSL_GRAPH_H___
|
14
|
+
#define ___RB_GSL_GRAPH_H___
|
15
|
+
|
16
|
+
#include "rb_gsl.h"
|
17
|
+
#include "rb_gsl_array.h"
|
18
|
+
#include "rb_gsl_common.h"
|
19
|
+
|
20
|
+
typedef struct __rb_gsl_plot {
|
21
|
+
VALUE xdata, ydata;
|
22
|
+
VALUE T;
|
23
|
+
VALUE E;
|
24
|
+
VALUE f;
|
25
|
+
VALUE F;
|
26
|
+
VALUE g;
|
27
|
+
VALUE h;
|
28
|
+
VALUE k;
|
29
|
+
VALUE K;
|
30
|
+
VALUE l;
|
31
|
+
VALUE L;
|
32
|
+
VALUE N;
|
33
|
+
VALUE r;
|
34
|
+
VALUE R;
|
35
|
+
VALUE s;
|
36
|
+
VALUE t;
|
37
|
+
VALUE u;
|
38
|
+
VALUE w;
|
39
|
+
VALUE x;
|
40
|
+
VALUE y;
|
41
|
+
VALUE bg;
|
42
|
+
VALUE bitmap_size;
|
43
|
+
VALUE frame;
|
44
|
+
VALUE frame_line_width;
|
45
|
+
VALUE max_line_length;
|
46
|
+
VALUE page_size;
|
47
|
+
VALUE pen_colors;
|
48
|
+
VALUE rotation;
|
49
|
+
VALUE title_font_name;
|
50
|
+
VALUE title_font_size;
|
51
|
+
VALUE rotate_y_label;
|
52
|
+
VALUE I;
|
53
|
+
VALUE B;
|
54
|
+
VALUE m;
|
55
|
+
VALUE S;
|
56
|
+
VALUE W;
|
57
|
+
VALUE q;
|
58
|
+
VALUE C;
|
59
|
+
VALUE symbol_font_name;
|
60
|
+
VALUE reposition;
|
61
|
+
VALUE blankout;
|
62
|
+
VALUE O;
|
63
|
+
VALUE X, Y;
|
64
|
+
|
65
|
+
} gsl_graph;
|
66
|
+
|
67
|
+
gsl_graph* gsl_graph_new();
|
68
|
+
void gsl_graph_free(gsl_graph *g);
|
69
|
+
|
70
|
+
#endif
|
@@ -0,0 +1,63 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl_histogram.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNU General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
11
|
+
*/
|
12
|
+
|
13
|
+
#ifndef ___RB_GSL_HISTOGRAM_H___
|
14
|
+
#define ___RB_GSL_HISTOGRAM_H___
|
15
|
+
|
16
|
+
#include <gsl/gsl_vector.h>
|
17
|
+
#include <gsl/gsl_histogram.h>
|
18
|
+
#include <gsl/gsl_histogram2d.h>
|
19
|
+
#include "rb_gsl.h"
|
20
|
+
|
21
|
+
EXTERN VALUE cgsl_histogram;
|
22
|
+
EXTERN VALUE cgsl_histogram_range;
|
23
|
+
EXTERN VALUE cgsl_histogram_bin;
|
24
|
+
EXTERN VALUE cgsl_histogram2d;
|
25
|
+
EXTERN VALUE cgsl_histogram2d_view;
|
26
|
+
|
27
|
+
typedef struct {
|
28
|
+
gsl_histogram h;
|
29
|
+
} mygsl_histogram2d_view;
|
30
|
+
|
31
|
+
#ifndef HISTOGRAM2D_P
|
32
|
+
#define HISTOGRAM2D_P(x) (rb_obj_is_kind_of(x,cgsl_histogram2d)?1:0)
|
33
|
+
#endif
|
34
|
+
|
35
|
+
#ifndef CHECK_HISTOGRAM2D
|
36
|
+
#define CHECK_HISTOGRAM2D(x) if(!rb_obj_is_kind_of(x,cgsl_histogram2d))\
|
37
|
+
rb_raise(rb_eTypeError, "wrong type (Histogram2d expected)");
|
38
|
+
#endif
|
39
|
+
|
40
|
+
|
41
|
+
#ifndef HISTOGRAM3D_P
|
42
|
+
#define HISTOGRAM3D_P(x) (rb_obj_is_kind_of(x,cgsl_histogram3d)?1:0)
|
43
|
+
#endif
|
44
|
+
|
45
|
+
#ifndef CHECK_HISTOGRAM3D
|
46
|
+
#define CHECK_HISTOGRAM3D(x) if(!rb_obj_is_kind_of(x,cgsl_histogram3d))\
|
47
|
+
rb_raise(rb_eTypeError, "wrong type (Histogram3d expected)");
|
48
|
+
#endif
|
49
|
+
|
50
|
+
#include "rb_gsl_histogram3d.h"
|
51
|
+
|
52
|
+
int
|
53
|
+
mygsl_histogram_equal_bins_p (const gsl_histogram * h1, const gsl_histogram * h2);
|
54
|
+
int
|
55
|
+
mygsl_histogram_add (gsl_histogram * h1, const gsl_histogram * h2);
|
56
|
+
int
|
57
|
+
mygsl_histogram_sub (gsl_histogram * h1, const gsl_histogram * h2);
|
58
|
+
int
|
59
|
+
mygsl_histogram_mul (gsl_histogram * h1, const gsl_histogram * h2);
|
60
|
+
int
|
61
|
+
mygsl_histogram_div (gsl_histogram * h1, const gsl_histogram * h2);
|
62
|
+
|
63
|
+
#endif
|
@@ -0,0 +1,97 @@
|
|
1
|
+
#ifndef ___RB_GSL_HISTOGRAM3D_H___
|
2
|
+
#define ___RB_GSL_HISTOGRAM3D_H___
|
3
|
+
|
4
|
+
typedef struct {
|
5
|
+
size_t nx, ny, nz;
|
6
|
+
double * xrange ;
|
7
|
+
double * yrange ;
|
8
|
+
double * zrange ;
|
9
|
+
double * bin ;
|
10
|
+
} mygsl_histogram3d ;
|
11
|
+
|
12
|
+
typedef struct {
|
13
|
+
gsl_histogram2d h;
|
14
|
+
} mygsl_histogram3d_view;
|
15
|
+
|
16
|
+
|
17
|
+
mygsl_histogram3d* mygsl_histogram3d_alloc(const size_t nx, const size_t ny,
|
18
|
+
const size_t nz);
|
19
|
+
void mygsl_histogram3d_free (mygsl_histogram3d * h);
|
20
|
+
mygsl_histogram3d* mygsl_histogram3d_calloc_uniform(const size_t nx,
|
21
|
+
const size_t ny,
|
22
|
+
const size_t nz,
|
23
|
+
const double xmin,
|
24
|
+
const double xmax,
|
25
|
+
const double ymin,
|
26
|
+
const double ymax,
|
27
|
+
const double zmin,
|
28
|
+
const double zmax);
|
29
|
+
mygsl_histogram3d* mygsl_histogram3d_calloc(const size_t nx,
|
30
|
+
const size_t ny,
|
31
|
+
const size_t nz);
|
32
|
+
int mygsl_histogram3d_set_ranges_uniform (mygsl_histogram3d * h,
|
33
|
+
double xmin, double xmax,
|
34
|
+
double ymin, double ymax,
|
35
|
+
double zmin, double zmax);
|
36
|
+
int mygsl_histogram3d_set_ranges (mygsl_histogram3d * h,
|
37
|
+
const double xrange[], size_t xsize,
|
38
|
+
const double yrange[], size_t ysize,
|
39
|
+
const double zrange[], size_t zsize);
|
40
|
+
int mygsl_histogram3d_memcpy(mygsl_histogram3d * dest, const mygsl_histogram3d * src);
|
41
|
+
mygsl_histogram3d* mygsl_histogram3d_clone(const mygsl_histogram3d * src);
|
42
|
+
int mygsl_histogram3d_fread(FILE * stream, mygsl_histogram3d * h);
|
43
|
+
int mygsl_histogram3d_fwrite(FILE * stream, const mygsl_histogram3d * h);
|
44
|
+
int mygsl_histogram3d_increment(mygsl_histogram3d * h, double x, double y, double z);
|
45
|
+
int mygsl_histogram3d_accumulate (mygsl_histogram3d * h,
|
46
|
+
double x, double y, double z, double weight);
|
47
|
+
int mygsl_histogram3d_increment2(mygsl_histogram3d * h,
|
48
|
+
double x, double y, double z);
|
49
|
+
int mygsl_histogram3d_accumulate2(mygsl_histogram3d * h,
|
50
|
+
double x, double y, double z, double weight);
|
51
|
+
double mygsl_histogram3d_get (const mygsl_histogram3d * h, const size_t i,
|
52
|
+
const size_t j, const size_t k);
|
53
|
+
int mygsl_histogram3d_get_xrange(const mygsl_histogram3d * h, const size_t i,
|
54
|
+
double *xlower, double *xupper);
|
55
|
+
int mygsl_histogram3d_get_yrange(const mygsl_histogram3d * h, const size_t j,
|
56
|
+
double *ylower, double *yupper);
|
57
|
+
int mygsl_histogram3d_get_zrange(const mygsl_histogram3d * h, const size_t k,
|
58
|
+
double *zlower, double *zupper);
|
59
|
+
int mygsl_histogram3d_find (const mygsl_histogram3d * h,
|
60
|
+
const double x, const double y, const double z,
|
61
|
+
size_t * i, size_t * j, size_t *k);
|
62
|
+
gsl_histogram2d* mygsl_histogram3d_xyproject(const mygsl_histogram3d * h3,
|
63
|
+
size_t kstart, size_t kend);
|
64
|
+
gsl_histogram2d* mygsl_histogram3d_xzproject(const mygsl_histogram3d * h3,
|
65
|
+
size_t jstart, size_t jend);
|
66
|
+
gsl_histogram2d* mygsl_histogram3d_yzproject(const mygsl_histogram3d * h3,
|
67
|
+
size_t istart, size_t iend);
|
68
|
+
int mygsl_histogram3d_scale(mygsl_histogram3d * h, double scale);
|
69
|
+
int mygsl_histogram3d_shift(mygsl_histogram3d * h, double shift);
|
70
|
+
double mygsl_histogram3d_xmax(const mygsl_histogram3d * h);
|
71
|
+
double mygsl_histogram3d_xmin(const mygsl_histogram3d * h);
|
72
|
+
double mygsl_histogram3d_ymax(const mygsl_histogram3d * h);
|
73
|
+
double mygsl_histogram3d_ymin(const mygsl_histogram3d * h);
|
74
|
+
double mygsl_histogram3d_zmax(const mygsl_histogram3d * h);
|
75
|
+
double mygsl_histogram3d_zmin(const mygsl_histogram3d * h);
|
76
|
+
double mygsl_histogram3d_max_val(const mygsl_histogram3d * h);
|
77
|
+
void mygsl_histogram3d_max_bin(const mygsl_histogram3d * h,
|
78
|
+
size_t *imax_out, size_t *jmax_out, size_t *kmax_out);
|
79
|
+
double mygsl_histogram3d_min_val(const mygsl_histogram3d * h);
|
80
|
+
void mygsl_histogram3d_min_bin(const mygsl_histogram3d * h,
|
81
|
+
size_t *imin_out, size_t *jmin_out, size_t *kmin_out);
|
82
|
+
double mygsl_histogram3d_sum (const mygsl_histogram3d * h);
|
83
|
+
double mygsl_histogram3d_xmean (const mygsl_histogram3d * h);
|
84
|
+
double mygsl_histogram3d_ymean (const mygsl_histogram3d * h);
|
85
|
+
double mygsl_histogram3d_zmean (const mygsl_histogram3d * h);
|
86
|
+
double mygsl_histogram3d_xsigma(const mygsl_histogram3d * h);
|
87
|
+
double mygsl_histogram3d_ysigma(const mygsl_histogram3d * h);
|
88
|
+
double mygsl_histogram3d_zsigma(const mygsl_histogram3d * h);
|
89
|
+
void mygsl_histogram3d_reset(mygsl_histogram3d * h);
|
90
|
+
int mygsl_histogram3d_equal_bins_p(const mygsl_histogram3d * h1,
|
91
|
+
const mygsl_histogram3d * h2);
|
92
|
+
int mygsl_histogram3d_add(mygsl_histogram3d * h1, const mygsl_histogram3d * h2);
|
93
|
+
int mygsl_histogram3d_sub(mygsl_histogram3d * h1, const mygsl_histogram3d * h2);
|
94
|
+
int mygsl_histogram3d_mul(mygsl_histogram3d * h1, const mygsl_histogram3d * h2);
|
95
|
+
int mygsl_histogram3d_div(mygsl_histogram3d * h1, const mygsl_histogram3d * h2);
|
96
|
+
|
97
|
+
#endif
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/*
|
2
|
+
rb_gsl_integration.h
|
3
|
+
Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
|
4
|
+
(C) Copyright 2001-2004 by Yoshiki Tsunesada
|
5
|
+
|
6
|
+
Ruby/GSL is free software: you can redistribute it and/or modify it
|
7
|
+
under the terms of the GNUintegration General Public License.
|
8
|
+
This library is distributed in the hope that it will be useful, but
|
9
|
+
WITHOUT ANY WARRANTY
|
10
|
+
*/
|
11
|
+
|
12
|
+
#ifndef ___RB_GSL_INTEGRATION_H___
|
13
|
+
#define ___RB_GSL_INTEGRATION_H___
|
14
|
+
|
15
|
+
#include "gsl/gsl_integration.h"
|
16
|
+
|
17
|
+
#endif
|