Sha256: c528a2e1cb9092729d613d4933f71143f9409e2f6f7087236d50f4e164ec40ff

Contents?: true

Size: 1.78 KB

Versions: 18

Compression:

Stored size: 1.78 KB

Contents

/*
  rb_gsl_histogram.h
  Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
    (C) Copyright 2001 by Yoshiki Tsunesada

  Ruby/GSL is free software: you can redistribute it and/or modify it
  under the terms of the GNU General Public License.
  This library is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#ifndef ___RB_GSL_HISTOGRAM_H___
#define ___RB_GSL_HISTOGRAM_H___

#include <gsl/gsl_vector.h>
#include <gsl/gsl_histogram.h>
#include <gsl/gsl_histogram2d.h>
#include "rb_gsl.h"

EXTERN VALUE cgsl_histogram;
EXTERN VALUE cgsl_histogram_range;
EXTERN VALUE cgsl_histogram_bin;
EXTERN VALUE cgsl_histogram2d;
EXTERN VALUE cgsl_histogram2d_view;

typedef struct {
  gsl_histogram h;
} mygsl_histogram2d_view;

#ifndef HISTOGRAM2D_P
#define HISTOGRAM2D_P(x) (rb_obj_is_kind_of(x,cgsl_histogram2d)?1:0)
#endif

#ifndef CHECK_HISTOGRAM2D
#define CHECK_HISTOGRAM2D(x) if(!rb_obj_is_kind_of(x,cgsl_histogram2d))\
    rb_raise(rb_eTypeError, "wrong type (Histogram2d expected)");
#endif


#ifndef HISTOGRAM3D_P
#define HISTOGRAM3D_P(x) (rb_obj_is_kind_of(x,cgsl_histogram3d)?1:0)
#endif

#ifndef CHECK_HISTOGRAM3D
#define CHECK_HISTOGRAM3D(x) if(!rb_obj_is_kind_of(x,cgsl_histogram3d))\
    rb_raise(rb_eTypeError, "wrong type (Histogram3d expected)");
#endif

#include "rb_gsl_histogram3d.h"

int
mygsl_histogram_equal_bins_p (const gsl_histogram * h1, const gsl_histogram * h2);
int 
mygsl_histogram_add (gsl_histogram * h1, const gsl_histogram * h2);
int 
mygsl_histogram_sub (gsl_histogram * h1, const gsl_histogram * h2);
int 
mygsl_histogram_mul (gsl_histogram * h1, const gsl_histogram * h2);
int 
mygsl_histogram_div (gsl_histogram * h1, const gsl_histogram * h2);

#endif

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
rb-gsl-1.16.0.4 ext/gsl/include/rb_gsl_histogram.h
rb-gsl-1.16.0.3 ext/gsl/include/rb_gsl_histogram.h
rb-gsl-1.16.0.3.rc1 ext/gsl/include/rb_gsl_histogram.h
gsl-nmatrix-1.15.3.2 include/rb_gsl_histogram.h
gsl-nmatrix-1.15.3.1 include/rb_gsl_histogram.h
rb-gsl-1.16.0.2 ext/gsl/include/rb_gsl_histogram.h
rb-gsl-1.16.0.1 ext/gsl/include/rb_gsl_histogram.h
rb-gsl-1.16.0 include/rb_gsl_histogram.h
rb-gsl-1.15.3.2 include/rb_gsl_histogram.h
rb-gsl-1.15.3.1 include/rb_gsl_histogram.h
blackwinter-gsl-1.15.3.2 include/rb_gsl_histogram.h
gsl-nmatrix-1.15.3.0 include/rb_gsl_histogram.h
gsl-1.15.3 include/rb_gsl_histogram.h
gsl-1.14.7 include/rb_gsl_histogram.h
gsl-1.14.6 include/rb_gsl_histogram.h
gsl-1.14.5 include/rb_gsl_histogram.h
gsl-1.12.109 include/rb_gsl_histogram.h
gsl-1.12.108 include/rb_gsl_histogram.h