|
Packit |
67cb25 |
/* histogram/gsl_histogram2d.h
|
|
Packit |
67cb25 |
*
|
|
Packit |
67cb25 |
* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough
|
|
Packit |
67cb25 |
*
|
|
Packit |
67cb25 |
* This program is free software; you can redistribute it and/or modify
|
|
Packit |
67cb25 |
* it under the terms of the GNU General Public License as published by
|
|
Packit |
67cb25 |
* the Free Software Foundation; either version 3 of the License, or (at
|
|
Packit |
67cb25 |
* your option) any later version.
|
|
Packit |
67cb25 |
*
|
|
Packit |
67cb25 |
* This program is distributed in the hope that it will be useful, but
|
|
Packit |
67cb25 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
67cb25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
67cb25 |
* General Public License for more details.
|
|
Packit |
67cb25 |
*
|
|
Packit |
67cb25 |
* You should have received a copy of the GNU General Public License
|
|
Packit |
67cb25 |
* along with this program; if not, write to the Free Software
|
|
Packit |
67cb25 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
Packit |
67cb25 |
*/
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#ifndef __GSL_HISTOGRAM2D_H__
|
|
Packit |
67cb25 |
#define __GSL_HISTOGRAM2D_H__
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#include <stdlib.h>
|
|
Packit |
67cb25 |
#include <stdio.h>
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#undef __BEGIN_DECLS
|
|
Packit |
67cb25 |
#undef __END_DECLS
|
|
Packit |
67cb25 |
#ifdef __cplusplus
|
|
Packit |
67cb25 |
# define __BEGIN_DECLS extern "C" {
|
|
Packit |
67cb25 |
# define __END_DECLS }
|
|
Packit |
67cb25 |
#else
|
|
Packit |
67cb25 |
# define __BEGIN_DECLS /* empty */
|
|
Packit |
67cb25 |
# define __END_DECLS /* empty */
|
|
Packit |
67cb25 |
#endif
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
__BEGIN_DECLS
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
typedef struct {
|
|
Packit |
67cb25 |
size_t nx, ny ;
|
|
Packit |
67cb25 |
double * xrange ;
|
|
Packit |
67cb25 |
double * yrange ;
|
|
Packit |
67cb25 |
double * bin ;
|
|
Packit |
67cb25 |
} gsl_histogram2d ;
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
typedef struct {
|
|
Packit |
67cb25 |
size_t nx, ny ;
|
|
Packit |
67cb25 |
double * xrange ;
|
|
Packit |
67cb25 |
double * yrange ;
|
|
Packit |
67cb25 |
double * sum ;
|
|
Packit |
67cb25 |
} gsl_histogram2d_pdf ;
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
gsl_histogram2d * gsl_histogram2d_alloc (const size_t nx, const size_t ny);
|
|
Packit |
67cb25 |
gsl_histogram2d * gsl_histogram2d_calloc (const size_t nx, const size_t ny);
|
|
Packit |
67cb25 |
gsl_histogram2d * gsl_histogram2d_calloc_uniform (const size_t nx, const size_t ny,
|
|
Packit |
67cb25 |
const double xmin, const double xmax,
|
|
Packit |
67cb25 |
const double ymin, const double ymax);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
void gsl_histogram2d_free (gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int gsl_histogram2d_increment (gsl_histogram2d * h, double x, double y);
|
|
Packit |
67cb25 |
int gsl_histogram2d_accumulate (gsl_histogram2d * h,
|
|
Packit |
67cb25 |
double x, double y, double weight);
|
|
Packit |
67cb25 |
int gsl_histogram2d_find (const gsl_histogram2d * h,
|
|
Packit |
67cb25 |
const double x, const double y, size_t * i, size_t * j);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double gsl_histogram2d_get (const gsl_histogram2d * h, const size_t i, const size_t j);
|
|
Packit |
67cb25 |
int gsl_histogram2d_get_xrange (const gsl_histogram2d * h, const size_t i,
|
|
Packit |
67cb25 |
double * xlower, double * xupper);
|
|
Packit |
67cb25 |
int gsl_histogram2d_get_yrange (const gsl_histogram2d * h, const size_t j,
|
|
Packit |
67cb25 |
double * ylower, double * yupper);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double gsl_histogram2d_xmax (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
double gsl_histogram2d_xmin (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
size_t gsl_histogram2d_nx (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double gsl_histogram2d_ymax (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
double gsl_histogram2d_ymin (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
size_t gsl_histogram2d_ny (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
void gsl_histogram2d_reset (gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
gsl_histogram2d *
|
|
Packit |
67cb25 |
gsl_histogram2d_calloc_range(size_t nx, size_t ny,
|
|
Packit |
67cb25 |
double *xrange, double *yrange);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_set_ranges_uniform (gsl_histogram2d * h,
|
|
Packit |
67cb25 |
double xmin, double xmax,
|
|
Packit |
67cb25 |
double ymin, double ymax);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_set_ranges (gsl_histogram2d * h,
|
|
Packit |
67cb25 |
const double xrange[], size_t xsize,
|
|
Packit |
67cb25 |
const double yrange[], size_t ysize);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_memcpy(gsl_histogram2d *dest, const gsl_histogram2d *source);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
gsl_histogram2d *
|
|
Packit |
67cb25 |
gsl_histogram2d_clone(const gsl_histogram2d * source);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double
|
|
Packit |
67cb25 |
gsl_histogram2d_max_val(const gsl_histogram2d *h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
void
|
|
Packit |
67cb25 |
gsl_histogram2d_max_bin (const gsl_histogram2d *h, size_t *i, size_t *j);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double
|
|
Packit |
67cb25 |
gsl_histogram2d_min_val(const gsl_histogram2d *h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
void
|
|
Packit |
67cb25 |
gsl_histogram2d_min_bin (const gsl_histogram2d *h, size_t *i, size_t *j);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double
|
|
Packit |
67cb25 |
gsl_histogram2d_xmean (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double
|
|
Packit |
67cb25 |
gsl_histogram2d_ymean (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double
|
|
Packit |
67cb25 |
gsl_histogram2d_xsigma (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double
|
|
Packit |
67cb25 |
gsl_histogram2d_ysigma (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double
|
|
Packit |
67cb25 |
gsl_histogram2d_cov (const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
double
|
|
Packit |
67cb25 |
gsl_histogram2d_sum (const gsl_histogram2d *h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_equal_bins_p(const gsl_histogram2d *h1,
|
|
Packit |
67cb25 |
const gsl_histogram2d *h2) ;
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_add(gsl_histogram2d *h1, const gsl_histogram2d *h2);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_sub(gsl_histogram2d *h1, const gsl_histogram2d *h2);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_mul(gsl_histogram2d *h1, const gsl_histogram2d *h2);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_div(gsl_histogram2d *h1, const gsl_histogram2d *h2);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_scale(gsl_histogram2d *h, double scale);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int
|
|
Packit |
67cb25 |
gsl_histogram2d_shift(gsl_histogram2d *h, double shift);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
int gsl_histogram2d_fwrite (FILE * stream, const gsl_histogram2d * h) ;
|
|
Packit |
67cb25 |
int gsl_histogram2d_fread (FILE * stream, gsl_histogram2d * h);
|
|
Packit |
67cb25 |
int gsl_histogram2d_fprintf (FILE * stream, const gsl_histogram2d * h,
|
|
Packit |
67cb25 |
const char * range_format,
|
|
Packit |
67cb25 |
const char * bin_format);
|
|
Packit |
67cb25 |
int gsl_histogram2d_fscanf (FILE * stream, gsl_histogram2d * h);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
gsl_histogram2d_pdf * gsl_histogram2d_pdf_alloc (const size_t nx, const size_t ny);
|
|
Packit |
67cb25 |
int gsl_histogram2d_pdf_init (gsl_histogram2d_pdf * p, const gsl_histogram2d * h);
|
|
Packit |
67cb25 |
void gsl_histogram2d_pdf_free (gsl_histogram2d_pdf * p);
|
|
Packit |
67cb25 |
int gsl_histogram2d_pdf_sample (const gsl_histogram2d_pdf * p,
|
|
Packit |
67cb25 |
double r1, double r2,
|
|
Packit |
67cb25 |
double * x, double * y);
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
__END_DECLS
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#endif /* __GSL_HISTOGRAM2D_H__ */
|
|
Packit |
67cb25 |
|