Math::GSL::Histogram2D - Create and manipulate histograms of data in 2 dimensions
use Math::GSL::Histogram2D qw/:all/; # raw interface my $H = gsl_histogram2d_alloc(100, 100); gsl_histogram2d_set_ranges_uniform($H,0,101, 0, 101); gsl_histogram2d_increment($H, -50, -12); # ignored gsl_histogram2d_increment($H, 70 ); gsl_histogram2d_increment($H, 85.2 ); my $G = gsl_histogram2d_clone($H); my $value = gsl_histogram2d_get($G, 70, 33); my ($max,$min) = (gsl_histogram2d_min_val($H), gsl_histogram2d_max_val($H) ); my $sum = gsl_histogram2d_sum($H);
This subsystem allows the creation and manipulation of 2D histograms. Currently, only a raw interface exists.
gsl_histogram2d_alloc($nx, $ny)
gsl_histogram2d_calloc
gsl_histogram2d_calloc_uniform
gsl_histogram2d_free($h)
gsl_histogram2d_increment($h, $xmin, $xmax, $ymin, $ymax)
gsl_histogram2d_accumulate($h, $x, $y, $weight)
gsl_histogram2d_find($h, $x, $y)
gsl_histogram2d_get($h, $i, $j)
gsl_histogram2d_get_xrange($h, $i)
gsl_histogram2d_get_yrange($h, $j)
gsl_histogram2d_xmax($h)
gsl_histogram2d_xmin($h)
gsl_histogram2d_nx($h)
gsl_histogram2d_ymax($h)
gsl_histogram2d_ymin($h)
gsl_histogram2d_ny($h)
gsl_histogram2d_reset($h)
gsl_histogram2d_calloc_range
gsl_histogram2d_set_ranges($h, $xrange, $xsize, $yrange, $ysize)
gsl_histogram2d_set_ranges_uniform($h, $xmin, $xmax, $ymin, $ymax)
gsl_histogram2d_memcpy($dest, $src)
gsl_histogram2d_clone($src)
This function returns a pointer to a newly created Math::GSL::Histogram2D::gsl_histogram2d which is an exact copy of the histogram $src. NOTE: Ranges must be set with a function like gsl_histogram2d_set_ranges_uniform or this function will return undef.
gsl_histogram2d_set_ranges_uniform
gsl_histogram2d_max_val($h)
gsl_histogram2d_max_bin($h)
gsl_histogram2d_min_val($h)
gsl_histogram2d_min_bin($h)
gsl_histogram2d_xmean($h)
gsl_histogram2d_ymean($h)
gsl_histogram2d_xsigma($h)
gsl_histogram2d_ysigma($h)
gsl_histogram2d_cov($h)
gsl_histogram2d_sum($h)
gsl_histogram2d_equal_bins_p($h1, $h2)
gsl_histogram2d_add($h1, $h2)
gsl_histogram2d_sub($h1, $h2)
gsl_histogram2d_mul($h1, $h2)
gsl_histogram2d_div($h1, $h2)
gsl_histogram2d_scale($h, $scale)
gsl_histogram2d_shift($h, $offset)
gsl_histogram2d_fwrite($stream $h)
gsl_histogram2d_fread($stream $h)
gsl_histogram2d_fprintf($stream, $h, $range_format, $bin_format)
Each line contains the lower and upper limits of the bin and the contents of the bin. Since the upper limits of the each bin are the lower limits of the neighboring bins there is duplication of these values but this allows the histogram to be manipulated with line-oriented tools.
gsl_histogram2d_fscanf($stream, $h)
gsl_histogram2d_pdf_alloc($nx, $ny)
gsl_histogram2d_pdf_init($p, $h)
gsl_histogram2d_pdf_free($p)
gsl_histogram2d_pdf_sample($p, $r1, $r2)
Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
Copyright (C) 2008-2011 Jonathan "Duke" Leto and Thierry Moisan
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
3 POD Errors
The following errors were encountered while parsing the POD:
Expected text after =item, not a bullet
To install Math::GSL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::GSL
CPAN shell
perl -MCPAN -e shell install Math::GSL
For more information on module installation, please visit the detailed CPAN module installation guide.