1 %module
"Math::GSL::Histogram"
3 %include
"gsl_typemaps.i"
6 #include
"gsl/gsl_histogram.h"
9 %include
"gsl/gsl_histogram.h"
16 gsl_histogram_calloc_uniform
18 gsl_histogram_increment
19 gsl_histogram_accumulate
22 gsl_histogram_get_range
27 gsl_histogram_calloc_range
28 gsl_histogram_set_ranges
29 gsl_histogram_set_ranges_uniform
36 gsl_histogram_equal_bins_p
50 gsl_histogram_pdf_alloc
51 gsl_histogram_pdf_init
52 gsl_histogram_pdf_free
53 gsl_histogram_pdf_sample
55 %EXPORT_TAGS
= ( all
=> [ @EXPORT_OK
] );
60 use Math
::GSL
::Histogram qw
/:all
/;
62 my $H
= gsl_histogram_alloc
(100);
63 gsl_histogram_set_ranges_uniform
($H
,0,101);
64 gsl_histogram_increment
($H
, -50 ); # ignored
65 gsl_histogram_increment
($H
, 70 );
66 gsl_histogram_increment
($H
, 85.2 );
68 my $G
= gsl_histogram_clone
($H
);
69 my $value
= gsl_histogram_get
($G
, 70);
70 my
($max
,$min
) = (gsl_histogram_min_val
($H
), gsl_histogram_max_val
($H
) );
71 my $sum
= gsl_histogram_sum
($H
);