3
<title>Histogram Operations - GNU Scientific Library -- Reference Manual</title>
4
<meta http-equiv="Content-Type" content="text/html">
5
<meta name="description" content="GNU Scientific Library -- Reference Manual">
6
<meta name="generator" content="makeinfo 4.8">
7
<link title="Top" rel="start" href="index.html#Top">
8
<link rel="up" href="Histograms.html#Histograms" title="Histograms">
9
<link rel="prev" href="Histogram-Statistics.html#Histogram-Statistics" title="Histogram Statistics">
10
<link rel="next" href="Reading-and-writing-histograms.html#Reading-and-writing-histograms" title="Reading and writing histograms">
11
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
13
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 The GSL Team.
15
Permission is granted to copy, distribute and/or modify this document
16
under the terms of the GNU Free Documentation License, Version 1.2 or
17
any later version published by the Free Software Foundation; with the
18
Invariant Sections being ``GNU General Public License'' and ``Free Software
19
Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'',
20
and with the Back-Cover Text being (a) (see below). A copy of the
21
license is included in the section entitled ``GNU Free Documentation
24
(a) The Back-Cover Text is: ``You have freedom to copy and modify this
25
GNU Manual, like GNU software.''-->
26
<meta http-equiv="Content-Style-Type" content="text/css">
27
<style type="text/css"><!--
28
pre.display { font-family:inherit }
29
pre.format { font-family:inherit }
30
pre.smalldisplay { font-family:inherit; font-size:smaller }
31
pre.smallformat { font-family:inherit; font-size:smaller }
32
pre.smallexample { font-size:smaller }
33
pre.smalllisp { font-size:smaller }
34
span.sc { font-variant:small-caps }
35
span.roman { font-family:serif; font-weight:normal; }
36
span.sansserif { font-family:sans-serif; font-weight:normal; }
42
<a name="Histogram-Operations"></a>
43
Next: <a rel="next" accesskey="n" href="Reading-and-writing-histograms.html#Reading-and-writing-histograms">Reading and writing histograms</a>,
44
Previous: <a rel="previous" accesskey="p" href="Histogram-Statistics.html#Histogram-Statistics">Histogram Statistics</a>,
45
Up: <a rel="up" accesskey="u" href="Histograms.html#Histograms">Histograms</a>
49
<h3 class="section">21.7 Histogram Operations</h3>
52
— Function: int <b>gsl_histogram_equal_bins_p</b> (<var>const gsl_histogram * h1, const gsl_histogram * h2</var>)<var><a name="index-gsl_005fhistogram_005fequal_005fbins_005fp-1783"></a></var><br>
53
<blockquote><p>This function returns 1 if the all of the individual bin
54
ranges of the two histograms are identical, and 0
56
</p></blockquote></div>
59
— Function: int <b>gsl_histogram_add</b> (<var>gsl_histogram * h1, const gsl_histogram * h2</var>)<var><a name="index-gsl_005fhistogram_005fadd-1784"></a></var><br>
60
<blockquote><p>This function adds the contents of the bins in histogram <var>h2</var> to the
61
corresponding bins of histogram <var>h1</var>, i.e. h'_1(i) = h_1(i) +
62
h_2(i). The two histograms must have identical bin ranges.
63
</p></blockquote></div>
66
— Function: int <b>gsl_histogram_sub</b> (<var>gsl_histogram * h1, const gsl_histogram * h2</var>)<var><a name="index-gsl_005fhistogram_005fsub-1785"></a></var><br>
67
<blockquote><p>This function subtracts the contents of the bins in histogram <var>h2</var>
68
from the corresponding bins of histogram <var>h1</var>, i.e. h'_1(i) =
69
h_1(i) - h_2(i). The two histograms must have identical bin ranges.
70
</p></blockquote></div>
73
— Function: int <b>gsl_histogram_mul</b> (<var>gsl_histogram * h1, const gsl_histogram * h2</var>)<var><a name="index-gsl_005fhistogram_005fmul-1786"></a></var><br>
74
<blockquote><p>This function multiplies the contents of the bins of histogram <var>h1</var>
75
by the contents of the corresponding bins in histogram <var>h2</var>,
76
i.e. h'_1(i) = h_1(i) * h_2(i). The two histograms must have
78
</p></blockquote></div>
81
— Function: int <b>gsl_histogram_div</b> (<var>gsl_histogram * h1, const gsl_histogram * h2</var>)<var><a name="index-gsl_005fhistogram_005fdiv-1787"></a></var><br>
82
<blockquote><p>This function divides the contents of the bins of histogram <var>h1</var> by
83
the contents of the corresponding bins in histogram <var>h2</var>,
84
i.e. h'_1(i) = h_1(i) / h_2(i). The two histograms must have
86
</p></blockquote></div>
89
— Function: int <b>gsl_histogram_scale</b> (<var>gsl_histogram * h, double scale</var>)<var><a name="index-gsl_005fhistogram_005fscale-1788"></a></var><br>
90
<blockquote><p>This function multiplies the contents of the bins of histogram <var>h</var>
91
by the constant <var>scale</var>, i.e. <!-- {$h'_1(i) = h_1(i) * \hbox{\it scale}$} -->
92
h'_1(i) = h_1(i) * scale.
93
</p></blockquote></div>
96
— Function: int <b>gsl_histogram_shift</b> (<var>gsl_histogram * h, double offset</var>)<var><a name="index-gsl_005fhistogram_005fshift-1789"></a></var><br>
97
<blockquote><p>This function shifts the contents of the bins of histogram <var>h</var> by
98
the constant <var>offset</var>, i.e. <!-- {$h'_1(i) = h_1(i) + \hbox{\it offset}$} -->
99
h'_1(i) = h_1(i) + offset.
100
</p></blockquote></div>