/usr/include/openturns/swig/Histogram_doc.i is in libopenturns-dev 1.9-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | %feature("docstring") OT::Histogram
"Histogram distribution.
Available constructors:
Histogram(*first, l, h*)
Parameters
----------
first : float
Lower bound.
width : positive sequence of float
:math:`\\\\ell_i` is the width of the class :math:`i`.
height : positive sequence of float
:math:`h_i` is the frequency of the class :math:`i`.
Notes
-----
Its probability density function is defined as:
.. math::
f_X(x) = \\\\sum_{i=1}^{n}H_i\\\\;\\\\boldsymbol{1}_{[x_i,x_{i+1}]}(x)
where :math:`H_i=h_i/S` is the relative frequency,
with :math:`S=\\\\sum_{i=1}^n h_i\\\\,\\\\ell_i` the total frequency of data.
:math:`\\\\ell_i = x_{i+1} - x_i , 1\\\\leq i \\\\leq n` and :math:`n` is the size of the
width collection :math:`\\\\ell`.
Its first moments are:
.. math::
:nowrap:
\\\\begin{eqnarray*}
\\\\Expect{X} & = & \\\\frac{1}{2 \\\\sum_{i=1}^n h_i\\\\,\\\\ell_i}
\\\\sum_{i=1}^n h_i\\\\,\\\\ell_i (x_{i+1} + x_i)\\\\\\\\
\\\\Var{X} & = & \\\\frac{1}{3 \\\\sum_{i=1}^n h_i\\\\,\\\\ell_i}
\\\\sum_{i=1}^n h_i\\\\,\\\\ell_i (x_{i+1}^2 + x_i\\\\,x_{i+1} + x_i^2)
\\\\end{eqnarray*}
Examples
--------
Create a distribution:
>>> import openturns as ot
>>> l = [1.0, 0.7, 1.2, 0.9]
>>> h = [0.5, 1.5, 3.5, 2.5]
>>> distribution = ot.Histogram(-1.5, l, h)"
// ---------------------------------------------------------------------
%feature("docstring") OT::Histogram::getFirst
"Accessor to the distribution's lower bound.
Returns
-------
first : float
Lower bound."
// ---------------------------------------------------------------------
%feature("docstring") OT::Histogram::getWidth
"Accessor to the width.
Returns
-------
width : :class:`~openturns.Point`
The collection of :math:`\\\\ell_i`, the width of class `i`."
// ---------------------------------------------------------------------
%feature("docstring") OT::Histogram::getHeight
"Accessor to the height.
Returns
-------
height : :class:`~openturns.Point`
The collection of :math:`h_i`, the height of class `i`."
// ---------------------------------------------------------------------
%feature("docstring") OT::Histogram::setFirst
"Accessor to the lower bound.
Parameters
----------
first : float
Lower bound."
// ---------------------------------------------------------------------
%feature("docstring") OT::Histogram::setData
"Accessor to the widths and heights.
Parameters
----------
width : :class:`~openturns.Point`
The collection of :math:`\\\\ell_i`, the width of class `i`.
height : :class:`~openturns.Point`
The collection of :math:`h_i`, the height of class `i`."
|